Saving a stream

This forum is about all development around libVLC.
kryptonite
Blank Cone
Blank Cone
Posts: 52
Joined: 22 May 2009 12:01

Saving a stream

Postby kryptonite » 23 Jun 2009 14:37

I'm at a stage where I can display a live RTSP stream. I now need to save/record it.
After searching a bit, I tried using using ":sout=#duplicate{dst=std{access=file,mux=ps,dst=d:\\CWrecTest.avi}}"
This works, but has a small problem.

My sequence of steps is like:

Code: Select all

libvlc_media_player_set_drawable() libvlc_media_new() libvlc_media_add_option() /* myOpts */ libvlc_media_add_option() /* ":sout=#duplicate{dst=std{access=file,mux=ps,dst=d:\\CWrecTest.avi}}" */ /* without this additional option, the stream is displayed. When I add this, nothing is displayed, but recording happens */ libvlc_media_player_set_media() libvlc_media_release() libvlc_media_player_play()
I need to have the stream displayed continuously, & recording happen as well.
Is there some option I'm missing out on, or the order of options? Or is there an API for the same?

Thanks!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Saving a stream

Postby Jean-Baptiste Kempf » 23 Jun 2009 14:45

Add a duplicate and a dst=display
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

kryptonite
Blank Cone
Blank Cone
Posts: 52
Joined: 22 May 2009 12:01

Re: Saving a stream

Postby kryptonite » 23 Jun 2009 15:24

Thanks for the prompt reply.

I tried putting an additional

Code: Select all

libvlc_media_add_option(":sout=#duplicate{dst=display}")
after the existing one.

Still doesn't display, just recording happens. Tried some other permutations, where display continued, but recording didn't happen.
I'm not too familiar with the format of the string, could you please be a bit more specific?

Thanks!

kryptonite
Blank Cone
Blank Cone
Posts: 52
Joined: 22 May 2009 12:01

Re: Saving a stream

Postby kryptonite » 24 Jun 2009 09:33

Got it working: ":sout=#duplicate{dst=display,dst=std{access=file,mux=ps,dst=d:\\CWrecTest.avi}}"
Thanks!

jasonMarZ
New Cone
New Cone
Posts: 4
Joined: 14 Aug 2009 09:42

Re: Saving a stream

Postby jasonMarZ » 14 Aug 2009 09:48

Did you used plugin to display and record video on web??
I tried this
var options = ":sout=#duplicate{dst=display,dst=std{access=file,mux=mp4,dst=\"C:\\kkkkk.mp4\"}}";
vlc.playlist.clear();
var test = vlc.playlist.add(targetURL, "vlc", options);
vlc.playlist.playItem(test);

and it working,but when play recording file ,it has video but no audio.
I have no idea how it happened!
Is there someone can help me!!!!
Thanks!!!


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 13 guests