Log in

View Full Version : ogm vs mp4 vs avi


yawnmoth
17th October 2002, 00:15
What are the advantages of ogm and mp4 over avi?
And how does ogm compare to mp4?

RadicalEd
17th October 2002, 01:20
These are 3 very different formats. Avi being built long ago for the windows platform, ogg (ogm) created as a container for vorbis and eventually theora/tarkin, and mp4 created for the mpeg 4 standard. Avi, as I said, is very old and has a lot of drawbacks to other formats these days. Some of these drawbacks are
-need for the entire file before playback can begin (so no streaming)
-instability when paired with a vbr audio file (mostly mp3)
-inability to properly contain any of the newer audio formats such as aac and vorbis
-large overhead
-inability to hold more than 1 b-frame in a row

but at the same time, it is the most widely supported format of the 3.

Ogg is capable of holding multiple vbr audio tracks, b-frames, has improved seeking compared to avi, has a lower overhead, and (thanks to tobias) can even store subtitles and chapter points directly in the container. Aside from that you can use vorbis (obviously) and pretty much any other audio format with ogg (although there are issues with some, like AC3). Though ogg was intended for tarkin, thanks to tobias and his set of directshow filters we can successfully take advantage of ogg with current codecs such as XviD and DivX.

Mp4 is for ISO mpeg-4 video and audio streams. It is a completely closed standard unlike ogg, but is also a very large standard. Mp4 as a format is based upon quicktime for its stability and optimized layout. The container can hold ISO mpeg 4 video as well as mp3 or AAC audio.

Of the 3, ogg is the most well-featured for the majority of encoding scenarios these days, although it generally has weak user-support due to the establishment of avi and the new standards backing mpeg 4.

[/essay] (man.. I wish I could hand this stuff in for grades at school ;P)

Smiff
17th October 2002, 01:44
everyone back ogm... we should start a compain to get people to recognise it :D

kxy
17th October 2002, 06:26
Originally posted by RadicalEd

Ogg (thanks to tobias) can even store subtitles and chapter points directly in the container.

I would not say it can seek to the chapter points directly, because it seeks to the next keyframe. If you turn the seek keyframe feature off it will produce freeze frame when you want to go back and forth at specific time interval. So yes, it is good to seek to key frame, but seek to EXACT frame, NO. Thus it is a disavantage compares to the tranditional avi, ie you can't fast forward of fast rewind, or go to an exact frame (which can be frustrating if you want to do a frame to frame comparsion, you have to do it before you mux to the ogm or take out the vorbis file). One example will be oggmux(many people reported as a bug at first), the problem it produces is when it spits to multiple parts, it cut to the neareast keyframe not nearest frame.

ProfDrMorph
17th October 2002, 11:25
Originally posted by kxy


I would not say it can seek to the chapter points directly, because it seeks to the next keyframe. If you turn the seek keyframe feature off it will produce freeze frame when you want to go back and forth at specific time interval. So yes, it is good to seek to key frame, but seek to EXACT frame, NO. Thus it is a disavantage compares to the tranditional avi, ie you can't fast forward of fast rewind, or go to an exact frame (which can be frustrating if you want to do a frame to frame comparsion, you have to do it before you mux to the ogm or take out the vorbis file). One example will be oggmux(many people reported as a bug at first), the problem it produces is when it spits to multiple parts, it cut to the neareast keyframe not nearest frame.
That's no format issue but an issue due to "bad" implementation. The problem is just that .ogm is not that old thus there are some improvements that could be made. I think if many people will use .ogm we will soon get the necessary tools to avoid all these problems ( as we have for AVI today ).

kxy
17th October 2002, 15:13
Originally posted by ProfDrMorph

That's no format issue but an issue due to "bad" implementation.

I never said it is a format issue. And I personally wouldn't consider tobias a "bad" coder.

RadicalEd
17th October 2002, 22:04
actually I was using 'directly' in reference to the container and its ability to store subs and chapter points within itself, not in relation to chapter point access :D
sorry for the confusion

HarryM
18th October 2002, 07:55
Originally posted by RadicalEd
[B]Ogg is capable of holding multiple vbr audio tracks, b-frames...[B]

Can you saying for me, upon what exactly repose the support for b-frames in OGM? In opposition AVI, e.g.?

I tested XviD with long b-frames interval and I register identical A/V delay (typical for b-frames using = delayed videostream) too (compared to AVI).

Neo Neko
18th October 2002, 19:56
Originally posted by HarryM


Can you saying for me, upon what exactly repose the support for b-frames in OGM? In opposition AVI, e.g.?

I tested XviD with long b-frames interval and I register identical A/V delay (typical for b-frames using = delayed videostream) too (compared to AVI).

Did you encode direct to OGG or AVI?

HarryM
19th October 2002, 10:23
Originally posted by Neo Neko


Did you encode direct to OGG or AVI?

First to AVI. Second I use Koepi's Oggmux.

Prosper
19th October 2002, 22:09
Don't forget: as an industry standard, it won't be too long before we start seeing standalone devices with MP4 support. Look how many MP3 devices are out there as opposed to OGG devices - don't be holding your breath for OGG stream support in hardware anytime soon.

Neo Neko
20th October 2002, 08:54
Originally posted by HarryM


First to AVI. Second I use Koepi's Oggmux.

IIRC AVI ATM only supports one consecutive B frame. Xvid's multiple consecutive B frames should not get output to AVI. And converting from AVI to OGG will give you the same flaw. If there were a way to do it directly correctly then OGG would indeed be better. ;)

Neo Neko
20th October 2002, 09:23
Originally posted by Prosper
Don't forget: as an industry standard, it won't be too long before we start seeing standalone devices with MP4 support.

What is your definition of "too long". Wide spread adoption of the MP4 format is many many years away. The people who created it will not share their implimentations or their source. The standard is so complex and no one can seem to agree on where to start first that one guys MP4 likely will not decode right with another guys software. It will improve in the future. But it sure is a pain in the arse right now.

Look how many MP3 devices are out there as opposed to OGG devices

Using MP3 as a basis for the mainstream adoption of the MP4 file format we should see the first hints of such support sometime in 2012 or later. To me that is quite a long time. Look at it this way. MPEG2 was created back in the early to mid 90's and only now is it anywhere near reaching critical mass. I still hear people bitching about the increasing lack of avalibility of their favorite videos and music on VHS or audio cassette though. Companies and consumers just spent a ton to get everyone on the same page with MPEG2. Don't expect MPEG4 or MP4 to even come close to touching the MPEG2 market till everyone has had a decade to milk the last use out of their MPEG2 units.

And as for OGG. Well it is being adopted at a rate nearly 8 times as fast as MP3 ever was. And somewhere near 3 to 4 times as fast as AAC. There is something to be said for being unencumbered by pattents. There is also something to be said for having a fully functional reffernce version and full source out there for anyone to use in pretty much any way they choose. The same could not be said for any MPEG based codec etc. This along with the quality of Vorbis is it's main strength. Don't underestimate it. Look at the battle fought already. The MPEG group has the ears of prety much every influential company in the business. They have a massive budget and cash flow. They can afford more and better advertisement. Hell they can afford advertizement period. They can spend tons on Rn'D etc. On the other side of the coin OGG has no major influential ears to bend. Their advertizing budget is nill and so is their cash flow. Xiph is asking for paypal donations etc to help fund Rn'D outside what Rn'D gets donated. Even with all of this against them they are still making progress. It's a whole new paradigm. The companies are just beginning to warm up to it. AOL was one of the first. And even they spent months trying to find a chink in it's armor.

don't be holding your breath for OGG stream support in hardware anytime soon.

It is here, and has been here for quite some time. I estimate that it's adoption rate should easily keep up with AAC. ;)

yawnmoth
20th October 2002, 22:29
Ogg is capable of holding multiple vbr audio tracks, b-frames, has improved seeking compared to avi, has a lower overhead, and (thanks to tobias) can even store subtitles and chapter points directly in the container. Aside from that you can use vorbis (obviously) and pretty much any other audio format with ogg (although there are issues with some, like AC3). Though ogg was intended for tarkin, thanks to tobias and his set of directshow filters we can successfully take advantage of ogg with current codecs such as XviD and DivX.

Mp4 is for ISO mpeg-4 video and audio streams. It is a completely closed standard unlike ogg, but is also a very large standard. Mp4 as a format is based upon quicktime for its stability and optimized layout. The container can hold ISO mpeg 4 video as well as mp3 or AAC audio

I'm quite confident mp4 is capable of holding multiple b-frames, and I also thought that mp4 could hold multiple vbr audio tracks as well. Am I wrong?

Also, DivX 5 offers a few enhances for mp4 - quarter pixel, GMC, and bidirectional encoding... of course, I don't even know what half of those are, though, heh. Does ogm offer these?

RadicalEd
21st October 2002, 02:34
gmc, q-pel and etc are encoding enhancements, not related to the container format ;P

in addition to what neoneko said, I've also found that vorbis exceeds aac in quality through my own tests. AAC starts generating noticable artifacting under around 120 kbps, whereas vorbis holds through until about 90.

Alestrix
21st October 2002, 15:23
Originally posted by Neo Neko
If there were a way to do it directly correctly then OGG would indeed be better. ;)
I never tried it, but couldn't Suiryc's adaptation of VirtualDubOGM be the sollution?

- aL

yawnmoth
23rd October 2002, 06:33
avi's have a max size of 2gb... what are the max sizes for ogm and mp4?

U977
23rd October 2002, 19:41
Did someone else experienced teh same as RadicalEd? I still use AVi, but wanted to move to AAC encoding for audio. Now, I may change my mind if it is confirmed... I would not have thought so from what I've read about AAC around. I think I remember that I've read somewhere that 96 kb/s AAC is better than 128 kb/s MP3, thus I would not have expected problems even at 96 kb/s.

What's the point to have a new audio format like AAC if it can't do better than MP3??

PS: I suppose you spoke about an usual stereo stream.

RadicalEd
24th October 2002, 01:15
Stream I've been testing is a normal uncompressed stereo 44.1 khz source (ripped from a cd)
Well it's still better than mp3 at those bitrates, but the metallic clink artifacts common to aac, wma, and low bitrate vorbis show up at 96 for aac whereas they don't become noticable in vorbis until around 64. Now, this is based on tests using music, so there may not be as much difference for movies with mostly dialogue, but generally vorbis definitely sounds better and has less artifacting. Now if you really want low bitrate arifactless audio go for RealAudio, I've seen it go to a limit of 48 kbps stereo without noticable artifacts.
But the Real format can be limiting sometimes, and vorbis is the next best.

btw, playback of aac files is wmp4player, ogg is wmp 6.4, neither of which have bass adjustments or equalizers, so the output is just the pure untampered signal

U977
24th October 2002, 07:29
Thanks for the info.

I will do some tests too, when I've some time. I prefer to encode in Vorbis if it produces better quality, even if we don't really hear the difference in movies audio streams. Indeed, I don't see why I would loose time with AAC if Vorbis is free, and produce better quality in general.

Neo Neko
24th October 2002, 22:40
Originally posted by RadicalEd
gmc, q-pel and etc are encoding enhancements, not related to the container format ;P

in addition to what neoneko said, I've also found that vorbis exceeds aac in quality through my own tests. AAC starts generating noticable artifacting under around 120 kbps, whereas vorbis holds through until about 90.

Check the 64Kbps test at http://ff123.net

The VBR MP3-PRO codec in Cooledit2 came in a weak first.
The standard Vorbis codec almost took first but it came in a super close second.
At a substantially lower quality WMA8 made a weak third place.
And AAC came in a close 4th.

Here are key things to note of this test. The CoolEdit2 MP3-PRO codec is the best on the market ATM. Any other MP3-PRO codec stands little chance against Vorbis. WMA8; well it performed awfully. WMA8 is supposed to be the best at 64Kbps and that is all it is marketed for. It is common knowledge that WMA can't compete at medium bitrates of 80Kbps and up. And this shows that even at it's target bitrate it is substantially inadequate. Keep in mind that AAC is not in general tuned for such low bitrate operation. It operates respectably with the best of them at mid to high bitrates. And like MP3-PRO they are incorporating SBR into AAC for AAC+. So AAC should do better at lower bitrates once it is complete.

In the end even with AAC+ Vorbis will not be out of the competition. It is a super strong contender. There is still a ton of room in which to tweak and tune vorbis without breaking compatability. We have only seen the beginning. Of any company I have seen Xiph is the most open to customer input. That combined with the licensing makes Vorbis nearly unbeatable. The speed of it's adoption is unbelievable. :)

RadicalEd
24th October 2002, 23:13
oh man... I could only hear up to 14 khz on that test sweep wav and I'm 16. That sucks. What do you guys get? (http://ff123.net/sweep.html)
Then again the headphones and speakers aren't great, although my sister heard up to 18 so I guess I have no excuse :/
perhaps my audio tests arent so reliable if my hearing is really that bad :scared:

ah its not so bad. As long as I can hear teh bass what else could you possibly need? :cool:

ProfDrMorph
25th October 2002, 09:11
Originally posted by kxy


I never said it is a format issue. And I personally wouldn't consider tobias a "bad" coder.
I didn't want to imply that. I just wanted to say that there's still much room for improvement in terms of availible software even though for my personal needs I don't need more software. When the Ogg DShow filter was released and everybody had to use GraphEdit I already had everything I wanted. :D

Phobos
29th March 2003, 03:21
Originally posted by Neo Neko
IIRC AVI ATM only supports one consecutive B frame. Xvid's multiple consecutive B frames should not get output to AVI. And converting from AVI to OGG will give you the same flaw. If there were a way to do it directly correctly then OGG would indeed be better. ;)

if i encode directly to mp4 using the divx codec will i get rid of that supposed flaw???

edit: seems divx doesnt offer direct mp4 encoding anymore :/ . Im using virtualdubmod right now, should i encode to avi or to ogm then??? i cant believe that we arent taking full advantage of bframes because no crap container can handle them well :angry:

yawnmoth
29th March 2003, 08:20
as i understand it, the MP4 container, as implemented by DivXNetworks wasn't fully ISO compliant...

anyways, i would think VirtualDubMod would work, but... i actually don't know, for sure... i think most MPEG-4 codecs are designed specifically for use with AVI...

deXtoRious
29th March 2003, 15:54
The CoolEdit2 MP3-PRO codec is the best on the market ATM

Where can I get it?

Phobos
29th March 2003, 16:56
Originally posted by yawnmoth
as i understand it, the MP4 container, as implemented by DivXNetworks wasn't fully ISO compliant...

anyways, i would think VirtualDubMod would work, but... i actually don't know, for sure... i think most MPEG-4 codecs are designed specifically for use with AVI...

only one key frame per row, or something like that.. Somebody stated this above. Does this mean avi and the mpeg4 codec developers are crippling their own product??

Trahald
30th March 2003, 21:17
--------------------------------------------------------------------------------
Originally posted by kxy


I would not say it can seek to the chapter points directly, because it seeks to the next keyframe. If you turn the seek keyframe feature off it will produce freeze frame when you want to go back and forth at specific time interval. So yes, it is good to seek to key frame, but seek to EXACT frame, NO. Thus it is a disavantage compares to the tranditional avi, ie you can't fast forward of fast rewind, or go to an exact frame (which can be frustrating if you want to do a frame to frame comparsion, you have to do it before you mux to the ogm or take out the vorbis file). One example will be oggmux(many people reported as a bug at first), the problem it produces is when it spits to multiple parts, it cut to the neareast keyframe not nearest frame.
--------------------------------------------------------------------------------
That's no format issue but an issue due to "bad" implementation. The problem is just that .ogm is not that old thus there are some improvements that could be made. I think if many people will use .ogm we will soon get the necessary tools to avoid all these problems ( as we have for AVI today

with the large frame spans between key frames used in mpeg4 video, it makes seeking to exact frames (without a delay) imposible (with mpeg2/1 video the player only has to decode an I frame and tops 5 or so P frames [the other b frames wouldnt have to be decoded]). if you seek 200 frames into an mpeg4 that has 300 frame spacing; in an avi, all 200 frames (b-frames and all) would have to be decoded to get to the one you want. if they all have to be decoded anyways, why not watch them? it would be nice if when seek to keyframe is turned off(for those that need direct seeking) ogm would decoding from the keyframe without viewing like avi does.. and hopefully was b-frame aware so it wouldnt waste time decoding b-frames while seeking

Sirber
31st March 2003, 01:54
@w00kiee

I like your computer :) Do you have 64 MB ram too? Just kidding :D

drebel
3rd April 2003, 18:08
Do i have to use "packed bitstream" in Xvid Configuration to take full advantage of the ogm container and avoid the lag?I made one perfectly solid encode in ogm directly (with save as ogm) but not with packed bitsream option enabled.
And a last one...Is it really necessary to place any negative delay values in AC3 sound (according to DVD2AVI 's suggestion)?Do we have audio sync with bitstream enabled?Sorry, in advance for being such a n00b in ogm format :stupid:
Always willing to test and learn
regards,
george