[mythtv] Adding "HTTP" as source to the IPTV Recorder?

Karl Dietz dekarl at spaetfruehstuecken.org
Mon Dec 12 08:17:09 UTC 2011

On 12.12.2011 00:22, Morten Grouleff wrote:
> I've started looking at the "iptv" recorder, trying to figure out if I could add support for streaming a h264 TS over
> http. What I would like to achieve is the possibility to write a list of http-urls in the m3u file and then use some
> kind of HttpSource for the transport streams. I hope this would be very similar to the "UDP" streaming inputs.

I'm looking for such a solution, too. I'll just write down what I have
researched in the hopes it will give you a head start.

The interesting question is, how do you handle that some URLs deliver
just an endless elementary stream (e.g. shoutcast radio) and others
deliver a playlist of playlists with a chunked transport stream (e.g.
Apple Live Streaming)

The format description, including the variant playlists, etc, is
available from Apple here:

Back when I was looking into writing it myself I started a patch to
support recording from shoutcast servers which could be a starting
point for you. At least it shows how to add a new kind of URL.

btw, there is a third variant where a transport stream is delivered as
endless stream via http, too.

btw², for http live streaming it is legal to *not* have a PAT/PMT, there
is a patch for generating them dynamically for the firewire recorder
which might be useful to support that variant of stream.

> "ffplay" is able to play the stream and reports this when starting my test-stream:
>> Input #0, mpegts, from 'http://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx':
>>    Duration: N/A, start: 16515.528733, bitrate: 256 kb/s
>>    Program 1
>>      Stream #0.0[0x79]: Audio: mp2, 48000 Hz, stereo, s16, 256 kb/s
>>      Stream #0.1[0x6f]: Video: h264, yuv420p, 640x576 [PAR 8:5 DAR 16:9], 25 tbr, 90k tbn, 50 tbc
> Any thoughts on this?

You can use NasaTV as example so others can look at it, too. It even
comes in HD :-)


More information about the mythtv-dev mailing list