Page 1 of 1

Saving a stream

Posted: 23 Jun 2009 14:37
by kryptonite
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!

Re: Saving a stream

Posted: 23 Jun 2009 14:45
by Jean-Baptiste Kempf
Add a duplicate and a dst=display

Re: Saving a stream

Posted: 23 Jun 2009 15:24
by kryptonite
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!

Re: Saving a stream

Posted: 24 Jun 2009 09:33
by kryptonite
Got it working: ":sout=#duplicate{dst=display,dst=std{access=file,mux=ps,dst=d:\\CWrecTest.avi}}"
Thanks!

Re: Saving a stream

Posted: 14 Aug 2009 09:48
by jasonMarZ
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!!!