LearningAPI has moved to a new blog!

The learningapi blog has moved to a new URL. These posts will remain here, but all new content has moved to learningAPI.com: Digital Media, Streaming Video & Educational Technology. You may also subscrdibe to the RSS feed for the new learningAPI.com blog.

September 11, 2008

Tools for testing streaming media

So here's a neat trick for testing how streaming media and web applications perform for users with limited bandwidth connections.  OK...I'm getting some rolling eyes at the premise. "Does anyone have limited bandwidth connections anymore?"  Turns out that, "Yup...they do."  

Two cases in point:  
  • Last fall, the Harvard Alumni Association offered an all-online version of the popular undergraduate course, "Justice" to Harvard alumni and their invited guests.  Over 3000 participants signed up for the term-length 24-lecture course, delivered via Flash streaming (rtmp) video encoded for broadband (~400kbps). Most common technical complaint from users: video performance and rebuffering due to insufficient bandwidth. 

  • So, I've got one of those Verizon Wireless Cellular Modems, a little USB one. Great 500kbps+ broadband in the city, but when I go on one of my frequent trips to coastal Maine, I'm lucky if I get 80kbps.  Actually, I really am lucky, as the alternative is 56k dial-up.  Wide swaths of the geography are not covered by cable or DSL, and cellular is the best I can do.  People have to drive into town to get Wifi at the local cafe, or suffer with a slow connection from home.
So, even among a net-savvy demographic of people who otherwise have resources, there remains a small but significant need for low-bitrate video solutions.  Currently, we're encoding a new set of programs for multiple bitrates all the way from HD to dial-up, and testing has been an issue.  Two techniques have been lifesavers.

For Windows, Netlimiter, an inexpensive bandwidth simulator utility I wrote about on streamingmedia.com (and commented on here) a while back, lets me set my throughput to whatever I like. I can pretend I'm on my coastal-Maine cell-modem, or a dialup, or anything else easily.

For the Mac, it's already built in to the OS's Unix roots.  It's in the ipfw command.  You set up the bandwidth limits by creating filters with bandwidth limits, then associating those filters with the ports you want limited.  Here's how to set up a bandwidth limiter for testing rtmp Flash streaming (port 1935). Note that if you're not logged in as root, you will need to use sudo to run these:

sudo ipfw pipe 1 config bw 400kbps
sudo ipfw add 10 pipe 1 tcp from any to me 1935
sudo ipfw add 11 pipe 1 tcp from any 1935 to me

Change it at will by issuing the pipe command again...

sudo ipfw pipe 1 config bw 1400kbps

You can also introduce simulated network latency, control outbound bandwidth separately from inbound, and control bandwidth to or from a single IP address or subnet.  There's great documentation at Luigi Rizzo's Dummynet site.  Thanks also to Ask Bjorn Hansen for his mini-tutorial on this.

TrackBack URL for this entry:

Listed below are links to weblogs that reference 'Tools for testing streaming media' from learningAPI.com: Media and Learning Technology - Larry Bouthillier.


Thanks for giving all the details.

Post a comment