用VLC做流媒體服務器命令

VLC(VideoLan)是一個開源播放器,可以播放本地文件,接受UDP,HTTP,RTP等流媒體數據,同時也可以作爲流媒體服務器,將本地媒體文件流化成流媒體數據流,

具體命令總結如下:

1. one stream input
   vlc -vvv sport.mp4 --input-repeat=2 --sout udp://192.168.0.1:1234

將本地文件sport.mp4流化成流媒體數據,通過UDP發送到192.168.0.1的1234端口


2. two streams input
   vlc -vvv  test.mp4 sport.mp4 --no-repeat --sout udp://192.168.0.1:1234

將本地文件test.mp4和sport.mp4先後流化成流媒體數據,通過UDP發送到192.168.0.1的1234端口


3. start-time      - set start position of playing
   stop-time       - set stop position of playing
   no-repeat       - play one time
   play-and-exit   - exit after playing


   vlc -vvv test.mp4 --start-time 0s --stop-time 10s --no-repeat --play-and-exit --sout udp://192.168.0.1:1234


4. receive data and save into a ts file
   vlc -vvv udp://@:1234 --sout '#std{access=file,mux=ts,dst=test.ts}'

從本地UDP的1234端口接受數據流,通過UDP發送到192.168.0.1的1234端口


5. 使用VLC做轉碼,然後發送到不同的地址端口去

vlc -vvv /home/ss/test.ts --network-caching=10 --sout '#transcode{vcodec=h264,venc=x264{keyint=25,idrinit=25,bframes=0,ref=1,hrd=cbr,crf=28,vb=4500,preset=ultrafast,tune=zerolatency,vbv-maxrate=1234},fps=25.00,threads=48,deinterlace,audio-sync}:duplicate{dst=std{access=udp,dst=192.168.0.108:1234},dst=udp{caching=10,mux=ts,dst=192.168.0.116:5500,name="testTS2"}}'

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章