MythTV for iPhone

Chris Carey chris.carey at
Fri Apr 25 17:23:48 MDT 2008

On Fri, Apr 11, 2008 at 9:00 AM, Michael Torrie <torriem at> wrote:
> Chris Carey wrote:
>  > You can grab the first released version now - v0.01
>  >
>  Took an initial look and it does appear promising.
>  The stock mythtv web client has a little perl script that rewrites (with
>  mod-rewrite) calls when requesting the flv file so that they are
>  transcoded on the fly.  This would probably work pretty well for this
>  app.  My only complaint with the transcoding script is that it needs a
>  way of caching the flv (or in this case the mp4) file, rather than
>  transcoding it every time it is viewed.  Also if multiple people want to
>  watch the same file, it should be smart enough somehow send the client
>  the same cached copy.  Of course there are other issues here, like
>  streaming a partially transcoded file, etc.
>  Anyway, I may modify the mythweb transcoder script to work here.

The quicktime client on the iPhone requests the mp4 file in partial
content mode (HTTP 206). I'm confused how to implement transcoding on
the fly due to this.

The idea is to trick the phone into thinking the MP4 file already
exists. So we send it to a URL which looks, smells, and tastes like an
MP4, when in fact it's a php page.

First of all, I would need to know the filesize of the yet-to-be
transcoded file in order to respond back to the quicktime on it's
initial request. Then the quicktime will request "give me bytes 0
through 5000", "give me bytes 5001 to 7000", etc,etc. Without having
this file pre-transcoded it boggles my mind how this could be
accomplished. How could I know which set of bytes on the MPG2 file
would correspond with bytes 5001 to 7000 on a file which is yet to be
transcoded to MP4? Any help is much appreciated.


More information about the PLUG mailing list