VLC命令行的应用

vlc -vvv rtsp://218.204.223.237:554/live/1/0547424F573B085C/gsfp90ef4k0a6iap.sdp --sout #transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}:std{access=file{no-overwrite},mux=avi,dst=D:/Chen.avi}

这个就是录制流,把它保存为avi文件的格式(不覆盖原文件),如果要覆盖file那里值把“no-”去掉保存路径为D:/Chen.avi

on the server run:

vlc -vvv file:///D:/test.sdp --sout #rtp{dst=localhost,port=1234,sdp=rtsp://localhost:1234/out.sdp}

on the client:

vlc rtsp://localhost:1234/out.sdp

以上server端就是把test.sdp描述的流导出到本机器上的out.sdp文件(该文件由server自己建立),localhost为本机IP地址,端口为1234。

而client端就可以读取并播放这个rtsp流了,这相当于用vlc为本地的sdp文件创建了一个服务器,而客户端去服务器上读取流

references:

https://www.videolan.org/doc/streaming-howto/en/ch03.html

https://www.videolan.org/doc/streaming-howto/en/ch04.html

原文地址:https://www.cnblogs.com/foohack/p/4761381.html