RTSP 流、转码和保存到文件的正确方法是什么?

What is the proper way to RTSP stream, transcode and save to file?

在显示 rstp 流的同时,我们正在尝试转码,并将其记录到文件中以备后用。

VLC 2.1.1 似乎在使用

时有效
vlc rtsp-stream :sout=#transcode{vcodec=mp1v,vb=700,scale=1}:duplicate{dst=display,dst=std{access=file,mux=asf,dst="C:\file.mpg"}}"

这似乎在 VLC 2.2.4

上被破坏了

VLC 维基上的文档似乎已过时。

vcodec/mux 配对的差异以及使用 samplerate 而不是 vb 似乎可以解决问题。

vlc rtsp-stream :sout=#transcode{vcodec=mp4v,scale=0.5,samplerate=44100}:duplicate{dst=display,dst=std{access=file,mux=mp4,dst='C:\file.mpg'}}"