vlcj Save rtsp stream to file.
Posted: 21 Dec 2012 01:08
Just started using vlcj and I'm trying to save an rtsp stream to file.
Have been looking at the example http://code.google.com/p/vlcj/source/br ... java?r=992 and trying to modify it so instead of forwarding the stream it saves it to a file.
I'm not sure what to change the "options" in "mediaPlayer.playMedia(media, options)" to.
The options from the sample code are: ":sout=#rtp{sdp=rtsp://@127.0.0.1:5555/demo}:no-sout-rtp-sap:no-sout-standard-sap:sout-all:sout-keep"
I changed these to: ":sout=file/ps:stream.mpg:no-sout-rtp-sap:no-sout-standard-sap:sout-all:sout-keep" trying to follow this website http://tldp.org/HOWTO/VideoLAN-HOWTO/x585.html, but that gives the error:
[04ceae18] mux_ps mux: Open
[04ceae18] main mux error: cannot add this stream
[04d9c098] main decoder error: cannot create packetizer output (h263)
I've been looking online, but haven't been able to find any documentation for these options. Does anyone know where I can find some documentation? Or better, what I need to change in the options so the stream is saved to a file?
Thanks in advance!
Have been looking at the example http://code.google.com/p/vlcj/source/br ... java?r=992 and trying to modify it so instead of forwarding the stream it saves it to a file.
I'm not sure what to change the "options" in "mediaPlayer.playMedia(media, options)" to.
The options from the sample code are: ":sout=#rtp{sdp=rtsp://@127.0.0.1:5555/demo}:no-sout-rtp-sap:no-sout-standard-sap:sout-all:sout-keep"
I changed these to: ":sout=file/ps:stream.mpg:no-sout-rtp-sap:no-sout-standard-sap:sout-all:sout-keep" trying to follow this website http://tldp.org/HOWTO/VideoLAN-HOWTO/x585.html, but that gives the error:
[04ceae18] mux_ps mux: Open
[04ceae18] main mux error: cannot add this stream
[04d9c098] main decoder error: cannot create packetizer output (h263)
I've been looking online, but haven't been able to find any documentation for these options. Does anyone know where I can find some documentation? Or better, what I need to change in the options so the stream is saved to a file?
Thanks in advance!