Video Recording Using VLCJ

This forum is about all development around libVLC.
aneeshsebastian
Blank Cone
Blank Cone
Posts: 18
Joined: 16 May 2011 08:03

Video Recording Using VLCJ

Postby aneeshsebastian » 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?

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: Video Recording Using VLCJ

Postby sherington » 16 Apr 2013 17:30

As far as I know, you simply can't enable/disable recording on-the-fly. It has to be setup when you play the media.

fc4976
New Cone
New Cone
Posts: 2
Joined: 16 Apr 2013 11:06

Re: Video Recording Using VLCJ

Postby fc4976 » 17 Apr 2013 04:58

Hi aneeshsebastian:

I just do simliar thing as you, but the difference is I use the living stream WebCam as the video source.

I created two VLC instances, one is for displaying the video on screen, the other is tring to record/stop record video on the fly.

BUT I met a problem, I can't stop the record instance, the stop function is deadlock....

You can refer my post yesterday "libvlc_media_player_stop pending"


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 10 guests