Having been inspired by the video streams provided at the 25C3 in Berlin I've always been curious about what is necessary to stream live videos from a V4L2 through icecast2 using the free OGG/Theora format.
It turned out to be relatively easy by using VLC to to the whole conversation and feeding the stream to icecast2:
cvlc v4l2:///dev/video0 --sout \ "#transcode{vcodec=theo,vb=200,scale=1,width=320,height=240,acodec=none}:\ duplicate{dst=std{access=shout,mux=ogg,dst=source:\<secret>@uni.fladi.at:8000/<mount>.ogg},dst=display}"
/dev/video0 ist the V4L2 device (in my case a USB webcam) and uni.fladi.at is my icecast2 server. As sound was not necessary for me I disabled it (acodec=none) but it can be enabled easily (acodec=vorb,ab=48,channels=2,samplerate=44100). The bitrate for the videostream is relatively low due to yet unsolved problems that prevent the stream from being decoded by the viewer.
Add a comment