Open ashanvabs opened 7 years ago
Hi @ashanvabs,
Can you please provide more detailes?
Thanks!
Same Issue in Netbeans 8.2 JDK8... Netbeans project attached ! Any update? ScreenRecorder.zip
Hi @emilioaraujo ,
I work on Linux and I cannot reproduce your issue (maybe is related to Windows).
Do you want to add a PR fixing it?
Cheers!
Why there is still no answer ??
Because I cannot reproduce and nobody contributed yet. @ysnetdogdu do you want to help us on this?👏
I have the same issue, using JDK 12 on Windows
@agomezmoron On windows the file path supplied to the MediaLocator should be of the form: "file://C:/test.mov" in order for this work. However in to make this to work in the VideoRecorder class on line 237 you should use getPath() instead of getAbsolutePath(). I tried it with that small change and supplied the path in the above format and I no longer get the exception. I am not sure if it works on Linux though. Can you check if it still works on linux if you make that small change?
See this: https://www.databaseusers.com/article/8713876/NoDataSinkException%3F
Thanks @nnllnn,
Could you please perform a PR?
Cheers
@nnllnn I tried to replace all getAbsolutePath()
with getPath()
in VideoRecorder class, and rebuild jar, and still get the error, could you share your fix which can make it works in Windows? Many thanks!
hello world
[Ljava.lang.StackTraceElement;@1a399483
Cannot create the DataSink: javax.media.NoDataSinkException: Cannot find a DataSink for: com.sun.media.multiplexer.BasicMux$BasicMuxDataSource@3c130745
Failed to create a DataSink for the given output MediaLocator: D:\video11\hello.mov
null
My JUnit test code
@Test
public void testVideo() throws InterruptedException, MalformedURLException {
System.out.println("hello world");
VideoRecorderConfiguration.setCaptureInterval(50); // 20 frames/sec
VideoRecorderConfiguration.wantToUseFullScreen(true);
VideoRecorderConfiguration.setVideoDirectory(new File("D:\\video11")); // home
VideoRecorderConfiguration.setKeepFrames(false);
VideoRecorder.start("hello");
TimeUnit.SECONDS.sleep(5);
String videoPath = VideoRecorder.stop(); // video created
System.out.println(videoPath);
}
I figured out the problem and raised PR.. see https://github.com/agomezmoron/screen-recorder/pull/12
Hi I'm using java 8 and netbeans to run the project. I have added below code
and I'm getting below error
it's really helpfull if you could help me solve this issue.