Streaming-V4L: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
Line 63: Line 63:
===Stream from television===
===Stream from television===


Use this to find tv channel frequencies===
Use this to find tv channel frequencies:


scantv - scan a v4l device for TV stations
scantv - scan a v4l device for TV stations

Revision as of 06:19, 2 March 2006

Introduction

Streaming applications can use v4l devices to broadcast audio and video over the Internet.

Software

Guides

VLC instructions

Note if these commands don't work, you may need to upgrade your VLC. This was done on Debian sid using vlc 0.8.5-svn20060212-0 from the nightly builds for 386 and amd64.

Stream a file to a designated machine

Skip the gui with "-I dummy".

   vlc file.avi -I dummy --sout udp://123.45.678.9:8080 --loop

The more recent syntax also works -- note the single quotes, and add "vlc:quit" to quit after the file is played:

   vlc file.avi -I dummy --sout '#std{access=udp,mux=ts,dst=123.45.678.9:8080}'  vlc:quit

Receive:

   vlc udp://@:8080

Stream a file to the network

Again, single quotes mandatory:

   vlc file.avi -I dummy --sout '#std{access=mmsh,dst=:8080}' --ttl 12 vlc:quit
   vlc file.avi -I dummy --sout '#std{access=mmsh,dst=:8080}' --ttl 12 --loop

Receive:

   vlc mmsh://servername:8080

Stream from a webcam

   vlc -I dummy -v --noaudio --ttl 12 v4l:/dev/video0:size=320x240 \
   --sout '#std{access=mmsh,dst=:8080}' -V X11 
   vlc -I dummy -v --noaudio --ttl 12 v4l:/dev/video0:size=320x240 \
   --sout '#transcode{vcodec=mp4v,vb=128}:std{access=mmsh,dst=:8080}'

Receive:

   vlc mmsh://123.45.678.9:8080

Stream from television

Use this to find tv channel frequencies:

   scantv - scan a v4l device for TV stations

Stream tv to a single designated machine:

   vlc --color
   v4l:/dev/video2:norm=ntsc:frequency=77250:size=640x480:channel=5:\
   adev=/dev/dsp2:audio=0 --sout #transcode{vcodec=mp4v,acodec=mpga,vb=512,\
   ab=128,samplerate=44100,venc=ffmpeg{keyint=80,hurry-up,vt=800000},\
   deinterlace}:std{access=udp,mux=ts,dst=123.45.678.9:8080} --ttl 12 -I dummy 

Receive:

   vlc udp://@:8080

Stream tv to the network:

   vlc --color
   v4l:/dev/video2:norm=ntsc:frequency=77250:size=640x480:channel=5:\
   adev=/dev/dsp2:audio=0 --sout #transcode{vcodec=mp4v,acodec=mpga,vb=512,\
   ab=128,samplerate=44100,venc=ffmpeg{keyint=80,hurry-up,vt=800000},\
   deinterlace}:std{access=mmsh,dst=:8080} --ttl 12 -I dummy 

Receive:

   vlc mmsh://servername:8080

Tested and works. There are lots of variants of this that don't work -- ymmv.