[vlc-devel] How to record a stream

Anna Richter anna.richter1 at gmx.net
Wed Sep 16 09:59:42 CEST 2009

Hello everybody!

I am writing my master thesis now and a part of it deals with videostreaming. As a server I use the LIVE555MediaServer, which streams audio/video files (MPEG) to a client if the client asks for it. My client is a program in C. It creates a new instance of the VLC Media Player (using the code given in http://wiki.videolan.org/LibVLC_Tutorial), passes the desired rtsp-URL to it and plays the received video file with VLC. Until now I could watch the received video only during the streaming process. If I want to watch this video again after the streaming is over the client program has to require it again from the server. As the next step I need to have the received video on the client pc all the time. So I need not only to play the video during the streaming process from server to client but also to save/to record the received data to a file. It would also be totally sufficient just to record the received data without playing it immidiately.
I can do it with the User Interface of VLC by using vlc>Media>Control/Save. My problem is, that I don't know, how to set the appropriate options in the VLC-Code (http://wiki.videolan.org/LibVLC_Tutorial) in my client program. I found out, that after creating a new instance of the vlc it is possible to specify a lot of options, like fullscreen mode using "--fullscreen", or enabling audio with "--audio". I tried to find similar options for my problem. With "vlc -H" I found out, that there is the option "--record-path <Text>", which can be used to set the path, where the file should be recorded, right? I included it in my program so the option-setting part looks as follows:

/*Starting the VLC with the given URL*/
const char * const vlc_args[] = {
"-I", "dummy", /* Don't use any interface */
"--ignore-config", /* Don't use VLC's config */
"--plugin-path=/set/your/path/to/libvlc/module/if/you/are/on/windows/or/macosx" };
The compiler does not notice any mistakes but after running the programm I still just see the video during the streaming. The file /home/anna/Desktop/bbb4.mpg is not even created. Did I something wrong here?
I searched in the documentation, in the wiki, I used the vlc -H option and I googled for it, but I could not find the solution. It would be so great if somebody could tell me, how to do it, or give me any hint about how to record the streamed video.

Best regards


GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

More information about the vlc-devel mailing list