Save an RTP stream without re-encoding?
Posted: 31 May 2011 13:55
Hello,
I'd like to save an H.264 video stream, received over RTP, to a local file, in some container format (for example AVI). I do not want the stream to be recompressed but only wrapped in the container and saved as-is.
I have been able to do this using the GUI, but I want to do it by command line. The steps I perform to do this with the GUI are:
Media > Advanced Open File and add "stream.sdp" OR Media > Open Network Stream and enter an rtsp:// URL
Drop-down at the bottom of the dialog > Convert
Optionally, tick "Display the output" if I want to view video as it's recording
Destination file: output.avi
Profile: add a new profile named "Direct to AVI":
As I said, this method works for me but I haven't figured out how to do it with the command line. The closest I have so far is:
vlc stream.sdp --sout=#transcode{vcodec=h264}:standard{access=file,mux=ffmpeg{mux=avi},dst=output.avi}
(substitute rtsp:// URL for stream.sdp if recording from an RTSP source.)
However this perfoms a re-encoding of the video, which is not what I intended. (Also the result video does not open correctly in Virtualdub - frames appear black.) Does anyone know what the correct syntax would be?
Thanks
itay
I'd like to save an H.264 video stream, received over RTP, to a local file, in some container format (for example AVI). I do not want the stream to be recompressed but only wrapped in the container and saved as-is.
I have been able to do this using the GUI, but I want to do it by command line. The steps I perform to do this with the GUI are:
Media > Advanced Open File and add "stream.sdp" OR Media > Open Network Stream and enter an rtsp:// URL
Drop-down at the bottom of the dialog > Convert
Optionally, tick "Display the output" if I want to view video as it's recording
Destination file: output.avi
Profile: add a new profile named "Direct to AVI":
- Encapsulation: AVI
Video Codec: Check "Video" and "Keep original video track", Codec: H.264.
Audio and subtitles disabled.
As I said, this method works for me but I haven't figured out how to do it with the command line. The closest I have so far is:
vlc stream.sdp --sout=#transcode{vcodec=h264}:standard{access=file,mux=ffmpeg{mux=avi},dst=output.avi}
(substitute rtsp:// URL for stream.sdp if recording from an RTSP source.)
However this perfoms a re-encoding of the video, which is not what I intended. (Also the result video does not open correctly in Virtualdub - frames appear black.) Does anyone know what the correct syntax would be?
Thanks
itay