Search Posts

my vlc command to stream video to pc/iOS/android

Stream to a mp4

cvlc v4l2:// :v4l2-vdev="/dev/video0" --sout '#transcode{vcodec=h264,vb=512,scale=1,acodec=none,venc=x264{aud,profile=high,level=60,keyint=15,bframes=0,ref=1,nocabac}}:duplicate{dst=std{access=livehttp{seglen=10,delsegs=true,numsegs=5,index=/opt/adobe/ams/webroot/peter.m3u8,index-url=http://192.168.163.201/live/peter.ts},mux=ts{use-key-frames},dst=/opt/adobe/ams/webroot/peter.ts},dst=std{access=http,mux=ts,dst=:8081/peter.mp4}}'

Stream to a FLV 

cvlc v4l2:// :v4l2-vdev="/dev/video0" --sout "#transcode{vcodec=FLV1,acodec=mp3,sameplerate=44100}:std{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=0.0.0.0:8082/peter.flv}"

Stream to a HLS

cvlc v4l2:// :v4l2-vdev="/dev/video0" --sout='#transcode{width=320,height=320,fps=25,vcodec=h264,vb=256,venc=x264{aud,profile=baseline,level=30,keyint=30,ref=1},acodec=mp3,ab=96,channels=2}:std{access=livehttp{seglen=10,delsegs=true,numsegs=3,index=/opt/adobe/ams/webroot/peter.m3u8,index-url=http://192.168.163.201/peter.ts},mux=ts{use-key-frames},dst=/opt/adobe/ams/webroot/peter.ts}'

2 comments on my vlc command to stream video to pc/iOS/android

    1. When you connect your video cam to linux, and if your linux has video4linux driver (http://en.wikipedia.org/wiki/Video4Linux). The driver will create /dev/video0 file, which is the device file to read raw data from your video cam. As you can see in my command above, it read /dev/video0.

      For web base. Apple said iOS will only support HLS in mobile safari, they want to nuke adobe.

      For app, I tried video kit (http://iosvideokit.com), it play well with rtmp.

      For my comment, if you want low latency, choose RTMP.

Leave a Reply to Renê Dettenborn Cancel reply

Your email address will not be published. Required fields are marked *