watch ziln.co.nz rtmp streams in mplayer

ziln.co.nz publishes its streams via Shockwave player using javascript similar to this:

<script type="text/javascript" src="http://www.ziln.co.nz/player/swfobject.js"></script>  
<script type="text/javascript">
var so = new SWFObject("http://www.ziln.co.nz/player/player_live.swf", "mymovie", "1024","768", "8", "#000000");
        so.addParam("quality", "high");
   so.addParam("wmode", "transparent");
so.addVariable("stream128","aljazeera1");
so.addVariable("stream256","aljazeera2");
so.addVariable("stream384","aljazeera3");
so.addVariable("prerollfile","http://www.ziln.co.nz/ziln_cms/ads/ziln/Ziln_ad-2_640x360new5.1_1274234880.swf");
so.addVariable("preroll_time","1");
so.addParam("allowFullScreen","true");
so.write("flashcontent");
</script>

The flash player is very heavy on CPU (~70% or more on my macbook pro.)

vlc and mplayer are meant to support rtmp streaming, but dont seem to accept the live=1 url parameter.

However, you can watch streams from ziln.co.nz (or other rtmp streaming sites) with this command:

rtmpdump -r rtmp://flash1.e-cast.co.nz:80/live/aljazeera3 -v --flv - | mplayer -nocorrect-pts -autosync 1 -nocache -

This is much better with mplayer using only ~17% CPU. :)
You may need to tune the autosync and mc parameters, or select a lower bitrate stream depending on your connection/hardware.

To pull the rtmp stream URL from other Shockwave-based sites, you can use Wireshark or another sniffer/dissector.

Comments