Streaming video has always been a hassle, and still is.
The way I did it today works pretty well.
Using a DV camera over firewire, I was able to pipe the DV stream through ffmpeg2theora and then to the icecast server.
The command ended up being something like
dvgrab - | ffmpeg2theora -v 2 -x 160 -y 128 -f dv -o /dev/stdout - | oggfwd 10.98.98.101 8000 passwordremoved /live.ogg
Ah, but it’s not that simple.
First, getting dvgrab to work.
With debian testing on my laptop, all the apps like dvgrab and kino used raw1394 - but someone decided to remove the raw1394 because something better exists. Eventually, I ended up stealing the kernel from debian stable and I’ve made a note to compile a brand new one with raw1394. It took a while to figure out that dvgrab wasn’t gonna budge and use something other than raw1394.
Next, you’ll notice the quality on that is very, very low. This is because the CPU on my laptop is a Pentium 3-M 1.2GHz, it just can’t keep up. My solution to this is a filthy hack but it works. Sitting on lan a few feet away from my lappy is my desktop, a 2.4GHz Q6600 Core 2 Quad, so I ended up using netcat to pipe the uncompressed DV data through my lan to the listening netcat, waiting on my workstation. This actually works quite well.
On my desktop, I did a derivative of the command mentioned earlier:
nc -l 8080 | ffmpeg2theora -v 2 -x 480 -y 320 -f dv -o /dev/stdout - | oggfwd 10.98.98.101 8000 passwordremoved /live.ogg
Notice the higher resolution video quality - now bandwidth is the reason to scale it down, not CPU power.
Then, after that command, all I had to do on the laptop was
dvgrab - | nc 192.168.2.248 8080
Even though its TCP and hackish, it works.
Sadly (and obviously), this is not usable to stream from a remote location - when you’re away, the CPU you have - is the CPU you’ll use. I sure could use a new lappy…
The good thing about this is, the quality I encoded in my laptop comes out to around the right amount of bandwidth to be streamed over EV-DO to the icecast server. I haven’t tried that but it could mean awesome ogg/theora cellular video streaming with the expected quality.