8.2. Stream with VLC

Note

You must add --enable-v4l to ./configure to use this feature .


% vlc -vvv v4l:/dev/video:norm=secam:frequency=543250:size=640x480:channel=0:adev=/dev/dsp:audio=0
--sout '#transcode{vcodec=mp4v,acodec=mpga,vb=3000,ab=256,vt=800000,keyint=80,deinterlace}:std{access=udp,mux=ts,url=239.255.12.13}' --ttl 12

where :

  • /dev/video is the device corresponding to your acquisition card or your webcam ,

  • norm=secam is name of the standard of the analogic signal (possible values are pal, secam, and ntsc) ,

  • frequency=543250 is the frequency of the channel in khz (Warning : for VLC < 0.6.1, Frequency is channel frequency in MHz multiplied by 16) ,

  • size=640x480 is the size of the video you want (you can also put the standard size like subqcif (128x96), qsif (160x120), qcif (176x144), sif (320x240), cif (352x288) or vga (640x480)) ,

  • channel=0 is the number of the channel (usually 0 is for tuner, 1 for composite and 2 for svideo) ,

  • adev=/dev/dsp is the audio device ,

  • audio=1 is the number of the audio channel (usually 0 is for mono and 1 for stereo) ,

  • vcodec=mp4v is the video format you want to encode in (mp4v is MPEG-4, mpgv is MPEG-1, and there is also h263, DIV1, DIV2, DIV3, I420, I422, I444, RV24, YUY2),

  • acodec=mpga is the audio format you want to encode in (mpga is MPEG audio layer 2, a52 is A52 i.e. AC3 sound) ,

  • vb=3000 is the video bitrate in Kbit/s ,

  • ab=256 is the audio bitrate in Kbit/s

  • vt=800000 is the video bitrate tolerance in bit/s ,

  • keyint=80 is the maximum interval between two "I" images in number of images ,

  • deinterlace tells VLC to deinterlace the video on the fly ,

  • 192.168.0.42 is either :

    • the IP address of the machine you want to unicast to ;

    • or the DNS name the machine you want to unicast to ;

    • or a multicast IP address .

  • 12 is the value of the TTL (Time To Live) of your IP packets (which means that the stream will be able to cross 11 routers) .

Copyright © 2010-2024 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout