screen-recorder icon indicating copy to clipboard operation
screen-recorder copied to clipboard

I'm getting javax.media.NoDataSinkException

Open maks1mov opened this issue 3 years ago • 6 comments

Please, help!

Cannot create the DataSink: javax.media.NoDataSinkException: Cannot find a DataSink for: com.sun.media.multiplexer.BasicMux$BasicMuxDataSource@31b7dea0 Failed to create a DataSink for the given output MediaLocator: C:\Users\Public\Pictures\debug.mov

My code:

public static void main(String args[]) throws InterruptedException, MalformedURLException {

	
	VideoRecorderConfiguration.wantToUseFullScreen(true);
	VideoRecorderConfiguration.setCaptureInterval(150);
	
	VideoRecorderConfiguration.setVideoDirectory(new File("C:\\Users\\Public\\Pictures"));
	VideoRecorderConfiguration.setKeepFrames(true);
	VideoRecorder.start("debug");

	VideoRecorderTestNGConfiguration.wantToKeepVideoOnSuccess(true);
	
	Thread.sleep(5000);
	VideoRecorder.stop();
}

maks1mov avatar Mar 26 '21 07:03 maks1mov

Looks like this was fixed in #12

Gamebuster19901 avatar Dec 01 '22 06:12 Gamebuster19901

I'm having the same error

Cannot create the DataSink: javax.media.NoDataSinkException: Cannot find a DataSink for: com.sun.media.multiplexer.BasicMux$BasicMuxDataSource@22ead351
Failed to create a DataSink for the given output MediaLocator

Silverin avatar Apr 13 '23 08:04 Silverin

I'm having the same error

Cannot create the DataSink: javax.media.NoDataSinkException: Cannot find a DataSink for: com.sun.media.multiplexer.BasicMux$BasicMuxDataSource@22ead351
Failed to create a DataSink for the given output MediaLocator

Post code

Gamebuster19901-Alt avatar Apr 14 '23 15:04 Gamebuster19901-Alt

if (Helper.checkConfigValue("video", "true")){
            VideoRecorderConfiguration.setCaptureInterval(50); // 20 frames/sec
            VideoRecorderConfiguration.wantToUseFullScreen(true);
            VideoRecorderConfiguration.setVideoDirectory(new File(Paths.get(System.getProperty("user.dir")).toUri()));
            VideoRecorderConfiguration.setKeepFrames(false);
            VideoRecorder.start("test");
}

and then

if (Helper.checkConfigValue("video", "true")){
            String videoPath; // video created
            try {
                videoPath = VideoRecorder.stop();
            } catch (MalformedURLException e) {
                throw new RuntimeException(e);
            }
            System.out.println("path:" + videoPath);
}

SO: Win 11

Silverin avatar Apr 19 '23 08:04 Silverin

if (Helper.checkConfigValue("video", "true")){
            VideoRecorderConfiguration.setCaptureInterval(50); // 20 frames/sec
            VideoRecorderConfiguration.wantToUseFullScreen(true);
            VideoRecorderConfiguration.setVideoDirectory(new File(Paths.get(System.getProperty("user.dir")).toUri()));
            VideoRecorderConfiguration.setKeepFrames(false);
            VideoRecorder.start("test");
}

and then

if (Helper.checkConfigValue("video", "true")){
            String videoPath; // video created
            try {
                videoPath = VideoRecorder.stop();
            } catch (MalformedURLException e) {
                throw new RuntimeException(e);
            }
            System.out.println("path:" + videoPath);
}

SO: Win 11

What is the output of System.getProperty("user.dir")

Gamebuster19901 avatar Apr 19 '23 17:04 Gamebuster19901

What is the output of System.getProperty("user.dir")

It's my project's dir => C:\Silvero\Proyectos\Decathlon\Pedidos

Silverin avatar Apr 20 '23 08:04 Silverin