Video Recording Using VLCJ
Posted: 16 Apr 2013 12:17
Can we do background recording while foreground video play is in progress.
Here I play video in my swing panel using :
mediaPlayer.playMedia("mrl");
For recording I use same API with option arguments
File dir = new File(System.getProperty("user.dir"), "Videos");
dir.mkdirs();
DateFormat df = new SimpleDateFormat("yyyyMMdd-HHmmss");
String fileName = dir.getAbsolutePath() + "/Capture-" + df.format(new Date()) + ".mpg";
String[] options = {
":sout=#transcode{vcodec=h264,vb=4096,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100}:duplicate{dst=file{dst=" + fileName + "},dst=display}"
};
mediaPlayer.playMedia("mrl",options);
When I click on recording button which eventually invoke above said second url, first playMedia("mrl") invocation is interrupted. I use single instance of media player for both play and recording.
Isn't it not expected?
Please give me a quick reply. How can I implement background recording using VLCJ?
Here I play video in my swing panel using :
mediaPlayer.playMedia("mrl");
For recording I use same API with option arguments
File dir = new File(System.getProperty("user.dir"), "Videos");
dir.mkdirs();
DateFormat df = new SimpleDateFormat("yyyyMMdd-HHmmss");
String fileName = dir.getAbsolutePath() + "/Capture-" + df.format(new Date()) + ".mpg";
String[] options = {
":sout=#transcode{vcodec=h264,vb=4096,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100}:duplicate{dst=file{dst=" + fileName + "},dst=display}"
};
mediaPlayer.playMedia("mrl",options);
When I click on recording button which eventually invoke above said second url, first playMedia("mrl") invocation is interrupted. I use single instance of media player for both play and recording.
Isn't it not expected?
Please give me a quick reply. How can I implement background recording using VLCJ?