Tumbled Logic

Apr 5 2009

All you need is some sticky-backed plastic…

This is an exercise for the reader. Some of you might find it fun. Some of you won’t get it in the slightest. It’s just a suggestion as to what you can do, and hint at the sorts of things we should be seeing more of as provided services.

  1. Use iplayer-dl to fetch the iPhone-targetted H.264/AAC version of a programme. Let’s say… b00jmx6y.

  2. Fetch the metadata for this episode from http://www.bbc.co.uk/programmes/b00jmx6y.rdf

  3. Fetch the artwork for this episode from http://www.bbc.co.uk/iplayer/images/episode/b00jmx6y_640_360.jpg

  4. Use (mplayer -identify -frames 0 -vc null -vo null -ao null "$file" | grep ^ID_VIDEO_FPS | sed -e s'/^.*=//' ) 2>/dev/null to get the framerate of the QuickTime movie. It’ll probably be dead on 25fps. I say “probably”. It will be 25fps.

  5. Use mp4info (part of mpeg4ip-utils on Ubuntu) to figure out which track is which. You’ll see a H.264 video track and an AAC audio track.

  6. Use mp4creator (part of mpeg4ip-server on Ubuntu) to extract the two tracks from the QuickTime Movie.

  7. Use mp4creator to remux, with hint tracks, the two tracks back into a true blue .mp4.

  8. Use AtomicParsley to add the artwork from the JPEG that you downloaded, as well as the metadata from the RDF, to the MPEG 4 file.

  9. Put the MP4 file in a location accessible to Darwin Streaming Server.

  10. Add the metadata from the RDF as an entry to a ready-made podcast file you have sat on a web server somewhere. Point the enclosure at a QuickTime movie that you’ll create in a moment. Let’s call it proxy_b00jmx6y.mov.

  11. Run echo 'RTSPtextRTSP://server.example.com/b00jmx6y.mp4' > proxy_b00jmx6y.mov, adjusting the URL to match that used by your DSS installation. Put the .mov in the place you referenced in your podcast XML.

  12. Subscribe to your Podcast in iTunes. iTunes will download the fake .mov (called a Reference Movie), but all playback will happen via RTSP/RTP to your Darwin Streaming Server installation. Your iTunes library can be kept nice and light, and you can delete the MP4 files from your server after a day or so.

  13. Lament the fact that neither the iPhone nor the Apple TV support RTSP or RTP yet, and so if you want to watch your MP4 on either, you’ll have to do it the old-fashioned way.


blog comments powered by Disqus
Page 1 of 1