Log in

View Full Version : Container types and efficiency


NerdWithNoLife
7th April 2010, 16:21
This may be dumb, but my question is: How much does the container type affect CPU efficiency? Or is it what's on the inside that counts?

I've become more and more involved in live web streaming and I'll hear people say things like "We're going to H.264 so it will be way more efficient than flash. The CPU difference is dramatic." And I think "most flash these days is H.264."

Assuming the same H.264/AAC stream inside, does it make a big difference whether viewers are watching an MP4, flash file, or H.264 (though an H.264 file would be video only, right?)?

But it's also very possible I'm just naive. Which is why I ask the guys who really know their stuff. :)

nurbs
7th April 2010, 18:18
I guess the difference in decoding time between a .flv, .mp4 or .mkv container will be minimal compared to what the actual content takes. Also you can use .mp4 files with AVC and AAC in flash. IIRC Adobe even recommends the MP4 container over FLV for that use.

GodofaGap
9th April 2010, 08:05
I've tried to benchmark decoding the same streams in AVI, MKV and MP4 once, but only found negligible differences.

roozhou
13th April 2010, 04:01
IMO the difference in filesize overhead is much more visible than decoding efficiency.

kidjan
13th April 2010, 04:05
This may be dumb, but my question is: How much does the container type affect CPU efficiency? Or is it what's on the inside that counts?

CPU efficiency? That's going to depend on the specific implementation (i.e. ffmpeg's container code may be different from mp4v2 which is probably completely different from AVI writers). But in general, I think you can expect container activity to be a rounding error compared to compressing or decompressing audio/video data.

Now there is slight bandwidth overhead with some container formats (I recall AVI had slightly higher overhead than MP4, for example), but it's also not particularly significant.


Assuming the same H.264/AAC stream inside, does it make a big difference whether viewers are watching an MP4, flash file, or H.264 (though an H.264 file would be video only, right?)?

No, totally insignificant. Especially compared to something like H264 encoder choice. You're going to get substantially better performance out of an encoder like x264 compared to a bad encoder implementation. The difference in container format is more of a compatibility/ease of use question for users, but for online media that's largely irrelevant.