Fully open-source video streaming

I found the missing link today for my open-source video streaming project: Xuggle. The Xuggle project includes a version of ffmpeg which can RTMP-stream to the red5 server.

Well, sorta. The red5 server needs to be patched in order to work with Xuggle, An exception occurs otherwise. You grab the patch from here and patch the RTMPProtocolDecoder.java file.

Here’s the command line I use to get Xuggle’s ffmpeg to stream my USB webcam from Linux:

LD_LIBRARY_PATH=/usr/local/xuggler/lib /usr/local/xuggler/bin/ffmpeg -f video4linux2 -s 320×240 -r 15 -i /dev/video0 -f oss -ac 2 -i /dev/dsp1 -f flv rtmp://eddy.neusemedia.com/oflaDemo/streamname

Normally I would use ALSA to grab audio from the USB microphone but Xuggle’s ffmpeg binary wasn’t compiled with ALSA support. Fortunately, the OSS driver works fine.

Here’s the command I use to stream from my ieee1394 (also known as Firewire) video camera:

dvgrab – | LD_LIBRARY_PATH=/usr/local/xuggler/lib /usr/local/xuggler/bin/ffmpeg -f dv -i – -s 320×240 -r 15 -f flv -ar 22050 rtmp://eddy.neusemedia.com/oflaDemo/streamname

This takes audio from the DV camera, but if I wanted to take audio from the USB microphone (or the built-in microphone) I could put in a line like the first one.

The quality is absolutely outstanding! Even on my slow cable modem connection I can push 320×240 15fps video with 22KHz stereo audio to my server. On a beefier Internet connection (like the city’s network at the community center) I could dial it up to even higher quality.

So there you go. Other than the codec (which is not free “as in speech”), all the parts are free. The only cost is the hosting bandwidth. One thing I’d like to find is a good way to take this RTMP stream and push it out a high-quality video card for ingesting into the city’s cable access channel, if need be. That would turn this in to a great solution for the city’s RTN network to offer live coverage of city events. I’m also interested in an RTMFP solution so that the client plugins can share the bandwith, rather than having my server hammered when many people try to watch at once.

Now I know a lot of non-geeks are interested in getting their own streaming television, so I’ll get to work on writing up a howto with minimal jargon.

Free media streaming, solved!

On a happier note, tonight I figured out the last piece of the puzzle of my free media streaming project! I have paired the red5 Flash media server with Adobe Flash Media Live Encoder to create stunning live video, all ad-free. The total cost of my software: $0. It’s just what I’ve been looking for.

I began by downloading and compiling the red5 software on my hosted CentOS server. This involved running a few “yum” commands to install the necessary Java dependencies but that was little challenge. Then I walked away from the project for a bit and when I returned I could not remember how to start red5. After a few more Googles, I discovered red5 had to be started from the /usr/lib/red5 directory on my server.
Continue reading

Cutting the cable

A friend of mine, fed up with the high cost, just canceled his cable television service after another friend showed him how he could watch his shows on the Internet or through streaming services like Netflix. Another friend got a Netflix-streaming Blu-Ray player for Christmas and is considering doing the same. They both will likely save a bunch of money.

Netflix reported yesterday that they’ve reached the 20 million subscriber mark. They have a $10 billion market value: more than some Hollywood studios. Netflix’s stock jumped over $16 to close just shy of $200 a share on the news.

As I’ve been saying many times, cable television is going through a sea change in how it does business. If cable doesn’t offer a-la-carte programming, people (formerly known as “consumers”) will get it through Netflix or through other Internet sources.

Space station spotting

International Space Station


I’ve been having fun tracking the International Space Station using the free Linux satellite tracking package Gnome Predict. This morning’s pass was exceptionally good, with the space station sailing almost directly over my home in Raleigh.

I took a series of long-exposure photographs to try to capture the station’s path across the sky but the station’s high path presented a problem. My 18mm lens was not nearly as wide as it needed to be to capture the almost 180 degree arc the station traveled in. Thus, I had to hastily reposition my camera and tripod in the dark as the station progressed through the sky and simply hope for the best.

The truth is, I should have gotten up about 10 minutes sooner in order to get things set up, but I misremembered the approach time.

If I get into this hobby further (and I think I will) I will have to get one of those equatorial mounts in order to keep the stars from blurring as the Earth rotates. Time to start saving up, I guess!

For those of you who have not yet discovered Linux, you can also track the ISS at the legendary site Heavens Above or at SightSpaceStation.

Stuxnet – Wikipedia, the free encyclopedia

Fascinating. This reminds me a of a hacker attack the CIA allegedly pulled on a Soviet gas pipeline way back in 1982.

Stuxnet is a computer worm targeted at industrial equipment that was first discovered in July 2010 by VirusBlokAda, a security firm based in Belarus. While it is not the first time that hackers have targeted industrial systems, it is the first discovered worm that spies on and reprograms industrial systems, and the first to include a programmable logic controller (PLC) rootkit.It was specifically written to attack Supervisory Control And Data Acquisition (SCADA) systems used to control and monitor industrial processes. Stuxnet includes the capability to reprogram the PLCs and hide its changes.

The worm’s probable target is said to have been high value infrastructures in Iran using Siemens control systems. According to news reports the infestation by this worm might have damaged Iran’s nuclear facilities in Natanz and eventually delayed the start up of Iran’s Bushehr Nuclear Power Plant. Although Siemens initially had stated that the worm had not caused any damage, on November 29, Iran confirmed that its nuclear program had indeed been damaged by Stuxnet.

via Stuxnet – Wikipedia, the free encyclopedia.

Facebook backups

One of the knocks I had against Facebook when I first started using it is that it’s a walled garden: it’s fun to play inside but there’s little sharing with the outside world. I didn’t want to invest all this time in Facebook without being able to take my work (or, um … should I say “play”) with me should I one day decide to part ways with Facebook.

It used to be that there was no good way to do this, but not any more! On a recent scan of my Facebook settings I discovered a feature I hadn’t seen before: a way to download Facebook information!
Continue reading

Open source streaming

As you may know, I’ve been streaming my monthly East CAC meetings through Livestream.Com. This is less than ideal because of all the advertisements that get tacked on to my videos. For a year now I’ve been looking for an open source solution to replace Livestream and I think I found it.

The solution is called Red5. It’s an open source implementation of a Adobe Flash server, written in Java. It’s capable of streaming Flash video out to clients from a Linux server and seems pretty battle-tested.
Continue reading

Thunderstorms Shoot Antimatter Beams Into Space

Thunderstorms can shoot beams of antimatter into space—and the beams are so intense they can be spotted by spacecraft thousands of miles away, scientists have announced.

Most so-called normal matter is made of subatomic particles such as electrons and protons. Antimatter, on the other hand, is made of particles that have the same masses and spins as their counterparts but with opposite charges and magnetic properties.

Continue reading

Amazon Video on Demand

Now that I’ve played around with the Roku for a few weeks I decided to check out the Amazon Video on Demand (or VOD) store. Amazon offers fairly new movies for “rental” or “purchase,” and through the magic of Roku these rentals get automatically billed to your Amazon account. They have content for standard-definition as well as high-definition. I checked out a few of their free offerings (an HD promo for The Office) and was impressed by the quality.
Continue reading