[foms] Proposal: adaptive streaming using open codecs

Steve Lhomme slhomme at matroska.org
Tue Nov 23 12:05:40 PST 2010


On Sat, Nov 20, 2010 at 12:30 PM, Silvia Pfeiffer
<silviapfeiffer1 at gmail.com> wrote:
> On Sat, Nov 20, 2010 at 9:27 PM, Steve Lhomme <slhomme at matroska.org> wrote:
>> On Fri, Nov 19, 2010 at 12:56 PM, Pierre-Yves KEREMBELLEC
>> <pierre-yves.kerembellec at dailymotion.com> wrote:
>>>  In most formats there are file/codec headers that you don't want to repeat
>>>  in every chunk (seems to be true for mp4 and WebM).
>>>
>>> Agreed for MP4, but for "streamable" containers (like MPEG-TS of FLV), the
>>> overhead is really minimal for most codecs.
>>> And it would probably ease implementation (and debugging) this way.
>>
>> Does anyone know of any tool that can take a MP4 and split it in
>> "adaptative friendly" chuncks ? I'd like to make a comparison between
>> MP4 and Matroska on that.
>
> This helped me:
> http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-%20segmenter/comment-page-1/
> Has a link to a segmenter.

OK I followed this guide and encoded (a part of) Big Buck Bunny in the
specified TS format (64 kbps for MP3 audio, 96kbps for H264 video) and
then used the segmenter to cut the files.

I got 30 TS chunks that together take 10,405,236 bytes.

Using a recent build of FFMPEG I remuxed the same content to mp4 (call
ffmpeg -y -i big_chunk-1.ts -acodec copy -vcodec copy big_chunk-1.mp4)
and to Matroska (call ffmpeg -y -i big_chunk-1.ts -acodec copy -vcodec
copy big_chunk-1.mkv).
The sum of the mp4 files takes 6,440,705 bytes and the sum of the mkv
files takes 6,409,470 bytes. Not much difference.
I also tried passing these mkv files through 'mkclean --remux
--unsafe' to have something suitable for (non lossy) streaming with
the smallest overhead, in the end the sum is 6,401,707 bytes.

All these files contain exactly the same H264 and MP3 data. (unless
remuxing the TS in FFMPEG is not correct and loses frames).

So that proves one thing, MPEG TS is a big waste of bandwidth and
should be avoided at all costs. MP4 and Matroska produce similar
overhead, with a little advantage to Matroska. Plus Matroska has the
big advantage of supporting VP8+Vorbis, aka WebM.

-- 
Steve Lhomme
Matroska association Charmain


More information about the foms mailing list