Archive for the ‘wireless’ Category

Live LILUG Stream: The aftermath.

Wednesday, April 9th, 2008

Streaming last nights LILUG meeting (see last post) did not go as well as I had hoped for it to go. I guess the main problem was that I had never actually tried it on my laptop - so there was not a trace of gstreamer on the whole dang system… I ended up even having to compile gst-entrans to get it working. I had a nice placeholder looping intro video (a rickroll with some overlayed text) that lasted for most of the meeting streaming from my desktop computer. My laptop wasn’t powerful enough to encode the video in real time at the quality I had it set to, by the time I thought to lower the settings it was already the end of the meeting. The stream at the end of the meeting (of people just sitting and talking) apparently worked very well, varied from 60-100kbit (I believe, according to vlc) and was quite watchable. Next time I’ll borrow someone elses laptop (configured before!) probably, and use that to stream it.. Next meeting should go better. =]

Fun with icecast

Saturday, March 8th, 2008

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.

Get OGG Eliminate DRM!