PDA

View Full Version : Is there a Containers Shootout?


ukb007
15th November 2004, 06:26
Hi, PROs.

It seems there are a number of good containers available. Perhaps an average user needn't use all of them for his videos. I guess thousands will benefit from a Container Comparison, like Doom9's well-known codec shootouts.

Regards.

Teegedeck
15th November 2004, 09:48
There is little to test, it is a more a matter of preferences, I think. For example, some prefer AVI for 'compatiblity', while others shun it for using 'hacks' to incorporate more advanced features; some praise MKV for its features, some OGM for its clean structure, some embrace MP4 in the expectation of it becoming the universal standard etc. etc.

stephanV
15th November 2004, 11:08
Alexnoe has written a container comparison for OGM, AVI and MKV.

Link (http://www-user.tu-chemnitz.de/~noe/Video-Zeug/)

It is mostly a document for reasons not to use OGM, but it is based on facts and does provide a lot of general information if you can read through the other things.

I think a container comparison (intended as a shoot-out) would be more difficult than e.g. a video codec comparison. In the case of a video codec comparison one might say that quality is highly subjective, on the other hand most people recognize quality when they see it. The disagreement about it is more caused by sentimental reasons than by those of good judgment. After all, most of the modern codecs are not bad; it is more good against better.

For containers a lot of considerations come into place:
- What platform am I aiming at?
- What types of streams do I want to use?
- What programs can/do I want to use?

Different containers give different opportunities and you will get to the right container by answering above questions (in the order you find important).

A video codec shoot-out has a simple objective: to determine which codec produces the best quality. You could consider encoding speed and CPU requirements as secondary objectives.

I think for a container such an objective is much more difficult to define. Is having more features more important than wide support or ease of use? I don't know.

quake74
18th November 2004, 06:06
There is some information at http://ld-anime.faireal.net/ too. Again, mainly just reasons because mkv is better than ogm, but sitll informative.

alexnoe
18th November 2004, 19:20
A video codec shoot-out has a simple objective: to determine which codec produces the best quality. You could consider encoding speed and CPU requirements as secondary objectives.Only if you leave out real-time capturing.... you see, even a codec comparision would be more complex than it appears at first glance

stephanV
19th November 2004, 10:15
mmmmmmmmmmmmmmmmmmmm... of course all of this was said in the context of doom9's comparisons and he apparently doesnt deal with capturing.

That said, capturing is indeed more difficult as some people capture with huffyuv and others with DivX. Comparing one with the other is impossible.

ukb007
20th November 2004, 02:50
From what many of my friends say, MKV is good, but geekish (i.e., new, technical, exotic, distant) and AVI is good and usual. OGM may probably catch up a little later.

I don't want to start a war, but maybe a poll could be arranged among these three, eh?

Regards.

stephanV
20th November 2004, 17:22
I think such a poll would be of little use... i for one certainly wouldnt start to use a container because it is what the majority of people use.

alexnoe
20th November 2004, 17:23
You can't make such a poll with moderators around that are idiots

Neo Neko
20th November 2004, 20:49
Originally posted by alexnoe
You can't make such a poll with moderators around that are idiots

Alex you know better than that. Please refrain from doing that again.

As to a poll I would not have any real objection. As long as we could just keep it to a what do you use and what for type basis. And not a my format is better than your format kinda thing. But frankly I don't think a poll is going to be very helpfull. For instance I use no less than 3 containers quite regularly. I have several editing tools that only read AVI for the most part. So capturing and editing is generally done with AVI. When I get videos containing MPEG streams such as Xvid and MP3 I generally convert them to MP4 to take full advantage of auto AR resizing smaller file size etc. For my own DVD rips etc I use matroska because I use some non-MP4 compliant things like Vorbis audio or embedded subs and image attachments. Plus it has easy editing of the files metadata and embeded chapter support. OGM ..... well I don't use it any more. I was one of the first testers when tobias first released his filters and it has come a long way. But he has given it up and it stalled quite some time ago. It has some similar features to matroska. But has proven less versetile and less reliable than I would like.

ukb007
21st November 2004, 02:02
You wrote:

When I get videos containing MPEG streams such as Xvid and MP3 I generally convert them to MP4 to take full advantage of auto AR resizing smaller file size etc.

I have backed my DVDs in .avi (XviD and mp3). Do you tell me it's somewhat better now to convert those avis into mp4? And doing so I'll get an even smaller file-size with (perhaps) no loss of quality ?

Maybe I don't get it fully yet [I've read bond's FAQ], but aren't we, then, better off doing DVD > mp4 in the first place and write on CDs?

And programs like AGK do such a great job of DVD > XviD conversion as if life depended on it; why aren't there such commotion about DVD > mp4 conversions? lenox's AGK thread has number of responses that probably runs into 6 figures!

But, as I have said, I probably still don't get it. That's possible.

Regards.

frodoontop
21st November 2004, 15:21
mp4 is just a container format. Because it uses less overhead than avi, the resulting files are a tiny bit smaller. No transcoding would be needed, just copy the video stream to an other container.

Neo Neko
21st November 2004, 22:01
Originally posted by ukb007

I have backed my DVDs in .avi (XviD and mp3). Do you tell me it's somewhat better now to convert those avis into mp4? And doing so I'll get an even smaller file-size with (perhaps) no loss of quality ?

You will get a smaller file. And you will loose no quality. You are just unpacking the streams and re-packing them in MP4. Which has less overhead and is the official container for MPEG formats.

Originally posted by ukb007

Maybe I don't get it fully yet [I've read bond's FAQ], but aren't we, then, better off doing DVD > mp4 in the first place and write on CDs?

Yes kinda. With a propper tool chain it would be possible to encode a source to MP4 or Matroska in varriable frame rate and achieve even better space savings.

Originally posted by ukb007

And programs like AGK do such a great job of DVD > XviD conversion as if life depended on it; why aren't there such commotion about DVD > mp4 conversions? lenox's AGK thread has number of responses that probably runs into 6 figures!

Simply that converting to MP4 is not that dificult. You just repackage the streams. And everyone tells everyone else or is obsessed with using AVI. If people were not so focused on AVI MP4 and Matroska would be much bigger.

alexnoe
21st November 2004, 22:07
A readable file format documentation would also be very helpful for MP4...

Neo Neko
21st November 2004, 22:28
Originally posted by alexnoe
A readable file format documentation would also be very helpful for MP4...

Yes perhaps. There is no easily readable widely publicly avalible doccumentation yet.

stephanV
22nd November 2004, 00:50
Lets all not get exited with the overhead advantage of Matroska or MP4 over AVI... when properly muxed it will never be more than 1 or 2 MBs on a 1 movie per CD encode (MPEG4 + MP3). 2 MB on a 90 minute movie is 3 kbps...

I think both Matroska and MP4 have advantages over AVI that go way beyond that.

Neo Neko
22nd November 2004, 08:00
Originally posted by stephanV
Lets all not get exited with the overhead advantage of Matroska or MP4 over AVI... when properly muxed it will never be more than 1 or 2 MBs on a 1 movie per CD encode (MPEG4 + MP3). 2 MB on a 90 minute movie is 3 kbps...

I think both Matroska and MP4 have advantages over AVI that go way beyond that.

3MB is the average I save on converting. It's not massive. But it does help. What I like it for most is that films encoded with an aspect ratio embedded with something like Xvid or ffmpeg, that does not resize in directshow/vfw based avi players will work with MP4. Using the 3ivx splitter of course. VideoLan will propperly resize the AVIs. But then I don't save the 3Mb which can help on a few problem sceens etc. :p

bobololo
22nd November 2004, 08:13
Originally posted by Neo Neko
Yes perhaps. There is no easily readable widely publicly avalible doccumentation yet.

Bond posted in his FAQ a link to ISO/IEC 14496-12 (http://www.iso.org/iso/en/ittf/PubliclyAvailableStandards/c038539_ISO_IEC_14496-12_2004(E).zip) (ISO base media file format). This document is publicly available and gives the syntax of mp4 file.

However there are additional specifications (ISO/IEC 14496-14 and 14496-15) that describes details about how to insert mpeg-4 system/audio/video/avc data in the base media file format.

alexnoe
22nd November 2004, 08:15
Bond posted in his FAQ a link to ISO/IEC 14496-12 (ISO base media file format). This document is publicly available and gives the syntax of mp4 file.I said "readable" :p

bobololo
22nd November 2004, 08:21
Originally posted by alexnoe
I said "readable" :p

What's the problem with that spec ? I find it quite clear or at least I've spent much more time trying to understand other ones ;)

stephanV
22nd November 2004, 09:37
Originally posted by Neo Neko
3MB is the average I save on converting.

Like I said:"when properly muxed". :p


What I like it for most is that films encoded with an aspect ratio embedded with something like Xvid or ffmpeg, that does not resize in directshow/vfw based avi players will work with MP4.
That seems to be more a decoding issue than a container issue (the AR information is placed in the bitstream anyway)... I believe Koepi has already got a beta-version of a DS-filter that supports this in AVI (and Matroska). :)

Koepi
22nd November 2004, 09:45
Originally posted by stephanV
Like I said:"when properly muxed". :p


That seems to be more a decoding issue than a container issue (the AR information is placed in the bitstream anyway)... I believe Koepi has already got a beta-version of a DS-filter that supports this in AVI (and Matroska). :)

The AR thingy is container independant -> not only working with avi and matroska, but even with all other containers. (It has issues with non-packed bitstream currently. And some MP4 splitters cause issue, too, but those can be worked around in the DS decoder options).

You can check and verify yourself when downloading and installing the 1.1-binary on my site.

ukb007
23rd November 2004, 02:28
Bien. Now I'll have to look for an avi2mp4 guide in a hurry. Seems I should have done it much earlier.

Neo Neko wrote:

With a propper tool chain it would be possible to encode a source to MP4 or Matroska in varriable frame rate and achieve even better space savings.

A list of such tools in the chain will help all, (me the most :)).

Regards.

Neo Neko
23rd November 2004, 04:13
That is the big niggling issue at the moment. All the current methods of producing VFR MP4 files etc are either rather complicated or poorly tuned. FFMPEG and Quicktime respectively IIRC.

Divx and Xvid don't offer modes for outputting VFR streams. They are largely designed for the depredicated VFW framework which does not allow for such things as VFR. Unless we are talking Linux binaries of said codecs which are not limited or tied to VFW. But suffer the same thing to have AVI file compatablility. Some things like the 3ivx MP4 muxer can unpack pack bitstreams etc. But it will not do VFR well. IIRC an AVI muxed to MP4 and back to AVI with the 3ivx filters will actually be VFR. But his will cause wild audio desynchonisation. Not what one would want.

Anyhow my mentioning of a proper tool chain is more a lament for the lack of one ATM.

stephanV
23rd November 2004, 09:33
Doesn't XviD have something like a "frame drop ratio" where it places n-vops in the stream, which later can be removed with the 3ivx muxer to create VFR files? The 3ivx encoder does something similar i believe.

IIRC an AVI muxed to MP4 and back to AVI with the 3ivx filters will actually be VFR.
:confused:

SeeMoreDigital
23rd November 2004, 15:54
Originally posted by Koepi
The AR thingy is container independant -> not only working with avi and matroska, but even with all other containers. (It has issues with non-packed bitstream currently. And some MP4 splitters cause issue, too, but those can be worked around in the DS decoder options).

You can check and verify yourself when downloading and installing the 1.1-binary on my site. Minolta's version of XviD.ax (http://www.public.iastate.edu/~chadspen/xvid.ax) with PAR/DAR signalling detection works well also!

Maybe Neo Neko and others might want to give it a try...

Cheers

Neo Neko
23rd November 2004, 21:32
Originally posted by stephanV
Doesn't XviD have something like a "frame drop ratio" where it places n-vops in the stream, which later can be removed with the 3ivx muxer to create VFR files? The 3ivx encoder does something similar i believe.


:confused:

I am not sure ATM if it actually drops them on muxing to MP4 or only on playback from MP4 or muxing to other formats later. I shall have to search and test the subject. Also Divx produces N vops IIRC but not as configurable.

As to frame drop ratio. It does work. But seems that it rather enforces the ratio causing drops where one is not always needed. Again my observation. And I have not tested it much recently.

Anyhow there is still work to be done on the front.

stephanV
23rd November 2004, 22:55
Originally posted by Neo Neko
I am not sure ATM if it actually drops them on muxing to MP4 or only on playback from MP4 or muxing to other formats later.
Im pretty sure it drops them on muxing, if you enable it that is. :)
On playback would not make any sense, neither when remuxing it to another format.

Also Divx produces N vops IIRC but not as configurable.
Nope it doesnt...


As to frame drop ratio. It does work. But seems that it rather enforces the ratio causing drops where one is not always needed. Again my observation. And I have not tested it much recently.

Such use of VFR is useless IMO anyway... but each to its own.

ukb007
24th November 2004, 01:44
mp4 is hot stuff. It is preferable to the other containers. Only mkv comes near it. Repacking a VFR stream to mp4 is not that difficult. avi is so popular because the majority use it.

There aren't any good programs for mp4 creation.

Now isn't that funny. My wife says it's fishy too.

SeeMoreDigital:

Hi. Can you please tell me where I'll get more info about the XviD.ax you mention? The link http://www.public.iastate.edu/~chadspen does not provide any.

Regards.

pogo stick
24th November 2004, 03:01
Originally posted by ukb007
A list of such tools in the chain will help all, (me the most :)).
How about this:
Any source you want -> AviSynth (DeCombVFR for hybrid video and DeDup for animation) -> encoding video with any codec (supported by mkvmerge) in your favorite encoding program -> making VFR Matroska video in mkvmerge.
And if you use one of MPEG-4 codecs, then VFR Matroska can be muxed to VFR MP4.
Smooth playback for hybrid video and saving bitrate for animation! Isn't it useful? I think, yes! :)
Originally posted by stephanV
Doesn't XviD have something like a "frame drop ratio" where it places n-vops in the stream, which later can be removed with the 3ivx muxer to create VFR files?
But it doesn't work with B-VOPs so I don't think it's very useful yet.
Originally posted by ukb007
There aren't any good programs for mp4 creation.
No, there are good programs.
mp4box, for example. It offers so much fun stuff to do! Sadly that Osmo4 is the only one player capable to use all this gladness. I wonder, why? It seems like many people should be interested in things like menus. Maybe it just because not many of interested people can understand documentation. :(

Flexibility is what I like about Matroska.
Sadly there are no encoders and editors for VFR video in Matroska or MP4 yet. :(

pogo stick
24th November 2004, 05:34
Originally posted by ukb007
Can you please tell me where I'll get more info about the XviD.ax you mention?
You can find more info here (http://forum.doom9.org/showthread.php?threadid=79350) and here (http://forum.doom9.org/showthread.php?postid=573151#post573151).

Neo Neko
24th November 2004, 07:48
Originally posted by stephanV

Such use of VFR is useless IMO anyway... but each to its own.

I admit there is alot of things it is not usefull for. But one thing it is definatly usefull for is animations etc. Lots of animations have mixed frame rates. Not just 24 and 29.97 FPS. But even 12 and 6 FPS at times. That can mean alot of duplicate frames. And then there are just points with absolutely no motion. You could drop a ton of frames there! VFR for such things would be extremely nice!

stephanV
24th November 2004, 10:10
Originally posted by Neo Neko
But one thing it is definatly usefull for is animations etc. Lots of animations have mixed frame rates. Not just 24 and 29.97 FPS. But even 12 and 6 FPS at times.
And on that we agree :)

mp4 is hot stuff. It is preferable to the other containers.
Not really...

No container is preferable over another one in all cases. For pure MPEG4 content you could indeed say MP4 is your best bet. But for RealVideo and Vorbis audio the only choise you have is Matroska (practically speaking, please don't come with theory about private streams in MP4 ;) ). If you want to capture with huffyuv or MJPEG with uncompressed audio, I'd say AVI would be a good choice. So no, no container is preferable over another one in all cases. They have different areas in which they are useful, it all depends on what you want to do. Anyone who says one container is superior in all aspects to another, is most definately not telling the truth.

It seems like many people should be interested in things like menus.
Actually, I couldnt care less for menus on a PC, i only find them irritating... now if there would be good standalone support. Selectable subtitles is as far as I need to go, which are all very easy to do with both AVI and Matroska.

Unfortunately, MP4 development also seems rather slow compared with Matroska... and a lot less transparent.

Koepi
24th November 2004, 10:53
Originally posted by stephanV
Selectable subtitles is as far as I need to go, which are all very easy to do with both AVI and Matroska. [/B]

It's new to me that you can do subtitles in avi easily.

Selectable subs (and audio streams) were supported in OGM long before anything else happened on that terrain (without the need to install additional filters like morgan stream switcher which tend to mess up some systems).

Regards
Koepi

stephanV
24th November 2004, 11:44
Originally posted by Koepi
It's new to me that you can do subtitles in avi easily.
I guess you learn something new every day :p


Selectable subs (and audio streams) were supported in OGM long before anything else happened on that terrain (without the need to install additional filters like morgan stream switcher which tend to mess up some systems).

You don't need a subtitle filter to play subs in OGM? Interesting...

alexnoe
24th November 2004, 11:52
It's new to me that you can do subtitles in avi easily.
If you look into the Doom9 news archive, you'll see that I've introduced that on March 22, 2003. And unlike OGM subtitles, non-english AVI-subtitles work on any Windows supporting UTF-8. Only pseudo-OSes like Win 9x/ME could fail

For example, it is totally impossible to use OGM subtitles for a movie like "Der Anschlag", if you want to display what they say :)
without the need to install additional filters like morgan stream switcher which tend to mess up some systemsThat's the reason why I'd even pay for MPC if it weren't free...

ukb007
24th November 2004, 18:13
Hi, stephanV.

You wrote:

Selectable subtitles is as far as I need to go, which are all very easy to do with both AVI and Matroska.

How d'you do selectable subtitles in XviD avis? I mean, here's my movie FF.avi and here's my SAMI external sub FF.smi in English. How do I put another language subtitle ?

Or d'you mean selectable in the sense whether to switch it on and off ? But even then, How do you turn it off in, say, WMP ?

Regards.

stephanV
24th November 2004, 18:33
uhm... smi is not possible (yet)... is that text based?

currently you can only mux srt and ssa in avi, matroska can also handle vobsubs and OGM srt only.

You can mux srt or ssa subs in AVI or matroska (more different subs than you need) with AVImux GUI or all three in matroska with MKVMerge... for OGM i dont know, although VirtualDubMod might work.

If you can turn it on or off depends solely on the subtitle filter you are using, with vsfilter (which you can use with WMP) it is possible.

ukb007
26th November 2004, 01:23
stephanV:

SAMI subs are text based. Do tell me one thing. Which program do you recommend to convert XviD AVI to MKV?

pogo stick:

You wrote:

1. Any source you want -> AviSynth (DeCombVFR for hybrid video and DeDup for animation) -> encoding video with any codec (supported by mkvmerge) in your favorite encoding program -> making VFR Matroska video in mkvmerge. ...Do I take it that you recommend mkvmerge for the encoding process? I actually use AGK; it produces AVI. What would you recommend to convert those AVIs into MKV?

2. And if you use one of MPEG-4 codecs, then VFR Matroska can be muxed to VFR MP4. ...How do you do this ?

Regards.

stephanV
26th November 2004, 09:22
Originally posted by ukb007
stephanV:

SAMI subs are text based. Do tell me one thing. Which program do you recommend to convert XviD AVI to MKV?


Just for a simple XviD AVI + MP3, with nothing else? AVIMux GUI :)

ukb007
28th November 2004, 02:53
AVI-Mux Gui it is. Thanks and regards.

bond
28th November 2004, 23:57
Originally posted by stephanV
Doesn't XviD have something like a "frame drop ratio" where it places n-vops in the stream, which later can be removed with the 3ivx muxer to create VFR files? The 3ivx encoder does something similar i believe.indeed
as i tried to point out in a "howto" thread about this issue (linked to via the mp4 faq), xvid (even with framedrop at 0 (if b-frames are disabled), 3ivx and nero digital output n-vops, which than can be dropped during muxing with the 3ivx and mp4box .mp4 muxers creating a real vfr mpeg-4 video stream inside .mp4