Locked



Post subject: Please use .MP4 instead of .AVI for your H.264 files.
Joined: 4/1/2006
Posts: 23
The AVI container doesn't actually support the modern features of MPEG-4 codecs (XviD, DivX, especially H.264), like B-Frames, subtitles, etc. Decoders use hacks to get around the limitations of AVI, and the result is basically a compatibility clusterfuck of epic proportions between various players. You can learn more from these articles: http://en.wikipedia.org/wiki/AVI http://en.wikipedia.org/wiki/Comparison_of_container_formats For example, was a thread here about someone not able to run an H.264 in QuickTime. The problem wasn't with QuickTime, as QT actually has a perfect, industry-standard implementation of MPEG-4 and H.264. The problem is the AVI format you wrapped it in, which isn't compatible. A little history lesson on MPEG-4. You can think of MPEG-4 a lot like MP3. Any MP3 player will play MP3, right? It doesn't matter if it was encoded with the official Fraunhofer encoder, ffmpeg, LAME, or anything else, it "just works" and plays anywhere. This is actually how MPEG-4 was designed. Any MPEG-4 codec, whether it be DivX, XviD, Nero, Apple's MPEG-4 codec, 3viX, whatever, will "just work" on any MPEG-4 implementation. The key is putting it in the container it was designed for. Putting MPEG-4 in an AVI is like putting a JPEG in a TXT file. The container for MPEG-4 is... drumroll... MP4. http://en.wikipedia.org/wiki/MP4 So right now you can make an XviD- or x264-encoded MP4 and it will just play in QuickTime, iPod, VLC, ffdshow/DefilerPak, XMBC, MPlayer, etc., because that's what it was designed to do. Some players/codec packs like VLC and ffdshow/DefilerPak also go out of their way to support the AVI hack, but it's best not to encourage the black sheep. You can liken it to the current Internet Explorer 6 versus Everything Else battle today on the web. Except the metaphor would have to be that 100% of people browsing the web are using Firefox, but web developers continue to code for IE, so Mozilla just writes an IE compatibility layer into Firefox, and everyone continues traveling along this retarded fucking detour. It's truly fucked up. Bottom line: There is absolutely no reason to use AVI anymore. Anyone who can play the hack can also play MP4, so using AVI only limits the people who can play it.
Player (206)
Joined: 5/29/2004
Posts: 5712
I'm going to assume that all this helpful information is merely an April Fool prank and ignore it!
put yourself in my rocketpack if that poochie is one outrageous dude
Joined: 4/1/2006
Posts: 23
Bag of Magic Food wrote:
I'm going to assume that all this helpful information is merely an April Fool prank and ignore it!
It's not. Please check out the Wikipedia links. You will lose nothing by using a container format that H.264 is actually compatible with, and you will gain more compatibility and smaller file size due to less overhead.
Player (206)
Joined: 5/29/2004
Posts: 5712
I bet Wikipedia's in on it too! The April pranksters, they're all out to get me! RAAAAAAAAAAAGH! ...Or not.
put yourself in my rocketpack if that poochie is one outrageous dude
SXL
Joined: 2/7/2005
Posts: 571
some movies on this very site were encoded into the mp4 and even mkv containers, as tests mostly, but it seems it was abandonned. I suppose that the main reason is, that there are already too many people having problem reading the .avi files, and that mp4 isn't as much as widely supported by players. besides, since the added functionnalities that mp4 offer aren't used, and that the avi files are small, of good quality and readable by everyone, the need isn't exactly an emergency. as long as they can watch it, people are happy ;)
I never sleep, 'cause sleep is the cousin of death - NAS
Joined: 11/11/2004
Posts: 400
Location: ::1
SXL wrote:
some movies on this very site were encoded into the mp4 and even mkv containers, as tests mostly, but it seems it was abandonned.
Was MP4 ever tried? I recall OGM and MKV, but MP4?
Joined: 4/1/2006
Posts: 23
SXL wrote:
some movies on this very site were encoded into the mp4 and even mkv containers, as tests mostly, but it seems it was abandonned. I suppose that the main reason is, that there are already too many people having problem reading the .avi files, and that mp4 isn't as much as widely supported by players.
First of all, they are only having the problems because the movies are in AVI containers. H.264 isn't compatible with that format, except with hacks. Secondly, anything that can play H.264 can already read MP4 by default. The ones that go out of their way to support the AVI hacks are the EXCEPTION. Maybe a graph would better demonstrate: As you can see, there's no group that can read JUST the AVI hack. You can either read only MP4, or you can read both MP4 and the AVI hack. 100% of people that can watch H.264 can read MP4, whereas only a fraction can use the AVI hack. Or here's a better analogy for you: If you send an MP3 to anyone, you know they'll be able to play it, right? Any MP3 player can play an MP3 file. But what if you decided to put MP3 music into a .WAV file, because you were feeling adventurous. You are still able to play it because the MP3 player you are using was written in a special way just to accomodate someone who might be retarded enough to mix two things that normally don't go together. Now imagine that about 50% of the world also has this software that can read these weird MP3s-inside-of-WAV combinations. You tell me what makes more sense: Just offering a regular ol' MP3 that everyone can read? Or doing this crazy mixed format hacking crap that leaves a lot of people scratching their heads? This is the current situation we are dealing with concerning MPEG-4.
besides, since the added functionnalities that mp4 offer aren't used, and that the avi files are small, of good quality and readable by everyone, the need isn't exactly an emergency.
Actually, the functionality of MP4 is used in every H.264 file, like B-Frames, which are video frames that get reference data from frames earlier or later in the stream than what it's actually showing right now. Huge feature of MP4, not compatible with AVI, unless the person who wrote the program made this crazy way of telling AVI how to read B-Frames.
as long as they can watch it, people are happy ;)
People are clearly having issues, just look around.
Former player
Joined: 11/13/2005
Posts: 1587
Why don't you make a vidoe that is in .mp4 format and we'll see then.
Senior Moderator
Joined: 8/4/2005
Posts: 5777
Location: Away
Mr. Boat is right, actually. AVI is deprecated, and MP4 is a standard to replace AVI completely. OGM and MKV are the alternatives.
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.
Editor, Reviewer, Experienced player (979)
Joined: 4/17/2004
Posts: 3109
Location: Sweden
>Was MP4 ever tried? No. At least not officially. I agree with Guybrush's suggestion. Make a short MP4 test file and we'll see if everyone can open it. At least my WMP does not list MP4 as a compatible format, but AVI with H264 is.
Joined: 11/11/2004
Posts: 400
Location: ::1
Mister Boat wrote:
Maybe a graph would better demonstrate: [...]
Sorry, I only trust fake statistics I created myself.
Joined: 4/1/2006
Posts: 23
schneelocke wrote:
Sorry, I only trust fake statistics I created myself.
The point was basically just to show that 100% of people have MP4 support, which they do. Maybe you skipped this:
Or here's a better analogy for you: If you send an MP3 to anyone, you know they'll be able to play it, right? Any MP3 player can play an MP3 file. But what if you decided to put MP3 music into a .WAV file, because you were feeling adventurous. You are still able to play it because the MP3 player you are using was written in a special way just to accomodate someone who might be retarded enough to mix two things that normally don't go together. Now imagine that about 50% of the world also has this software that can read these weird MP3s-inside-of-WAV combinations. You tell me what makes more sense: Just offering a regular ol' MP3 that everyone can read? Or doing this crazy mixed format hacking crap that leaves a lot of people scratching their heads? This is the current situation we are dealing with concerning MPEG-4.
Here's an MP4 encoded with H.264 and AAC (MPEG-4 audio): http://s3plan.com/portman.mp4
Joined: 11/11/2004
Posts: 400
Location: ::1
Mister Boat wrote:
schneelocke wrote:
Sorry, I only trust fake statistics I created myself.
The point was basically just to show that 100% of people have MP4 support, which they do. Maybe you skipped this:
No, I didn't skip that. FWIW, I didn't/don't want to say that either MP4 or AVI is better, anyway; I just wanted to point out that it's silly to create graphs from thin air when you have no data to base them on at all.
Joined: 4/1/2006
Posts: 23
schneelocke wrote:
No, I didn't skip that. FWIW, I didn't/don't want to say that either MP4 or AVI is better, anyway; I just wanted to point out that it's silly to create graphs from thin air when you have no data to base them on at all.
Yeah, a Venn diagram would have been better, since I was only showing a relationship between absolutes ("While all human beings have DNA, not all human beings have a penis"), not percentiles. Did the MP4 work for you? Try opening in all of these: - QuickTime 7 (QT7 added H.264 support) - VLC (don't know how recently they added H.264 support) - Windows Media Player with ffdshow or DefilerPak
Emulator Coder, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
A number of things on this topic I want to say. First, I have had ZERO success producing an MP4 file, give or take 5 percent. Second, AVI was a hack to begin with. I don't recall hearing a single good word about the spec. We have better containers. Yet AVI is surviving the test of time, even if it doesn't deserve to. People have been making hacks to AVI for a long time, what's one more? Finally, your comment about features AVI doesn't support basically boils down to b-frames. I have never published a single video on this site using B-frames. In conclusion, I can't and I don't have a pressing need to, so I won't.
Senior Moderator
Joined: 8/4/2005
Posts: 5777
Location: Away
DeHackEd wrote:
First, I have had ZERO success producing an MP4 file, give or take 5 percent.
Umm, why?
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.
Emulator Coder, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Can't find or use software to produce it.
Joined: 11/22/2004
Posts: 1468
Location: Rotterdam, The Netherlands
They don't seem that different to me using my default encoding procedures.
Player (21)
Joined: 10/14/2005
Posts: 317
Mister Boat wrote:
http://s3plan.com/portman.mp4
Here are the results of my tests. Media Player Classic: works Windows Media Player 9: unrecognized file type; if forced, an error is detected then it plays without sound Windows Media Player 10: works Winamp 2: fails Naturally, deprecated media players will have more problems with newer formats, but at the very least this shows your graph is somewhat inaccurate.
Senior Moderator
Joined: 8/4/2005
Posts: 5777
Location: Away
Omega wrote:
They don't seem that different to me using my default encoding procedures.
They mustn't actually, cause you use the same encoding options in both cases. It's all about compatibility and/or versatility. But we can use AAC soundracks with MP4, which may reduce file size without reducing the quality, IMO.
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.
Editor, Reviewer, Experienced player (979)
Joined: 4/17/2004
Posts: 3109
Location: Sweden
>Did the MP4 work for you? Wouldn't even load in WMP9, but if you forced it, it eventually played with both audio and video. Loaded in Winamp 5.08 but wouldn't play, neither sound or video. AVIs with H264 load and play without problems in both these programs. >Secondly, anything that can play H.264 can already read MP4 by default. In other words, no.
Joined: 11/22/2004
Posts: 1468
Location: Rotterdam, The Netherlands
If you have tips on how to more properly utilize the MP4 container, then I'd like to try them. I'll see if I can encode AAC audio with this compiled version of MEncoder...
Joined: 11/26/2005
Posts: 16
Location: Storrs, CT
Omega wrote:
They don't seem that different to me using my default encoding procedures.
Just as another strike against .mp4, I was unable to play Omega's output.mp4 with my basic setup. I'm using Media Player Classic with the most recent k-lite codec pack. The error I get is... http://img231.imageshack.us/img231/58/error7be.jpg I could try and get it to work with my other stuff, but it's honestly not worth the effort to try and fulfill a standard.
Player (201)
Joined: 7/6/2004
Posts: 511
Both the avi and mp4 worked for me using vlc. I think there is probably some truth to what Mr. Boat is saying, but it might require more time investment for the encoders, which may or may not be worth it. I'm by far no expert on video encoding, but thats my 2 cents.
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
JXQ
Experienced player (761)
Joined: 5/6/2005
Posts: 3132
Mister Boat wrote:
Here's an MP4 encoded with H.264 and AAC (MPEG-4 audio): http://s3plan.com/portman.mp4
MPC (with ffdshow), what I use to watch all the AVI's I download here, did not play this file for me. It loaded it, detected its length (2:30 or so), and then just sat there and wouldn't play. I also have Quicktime Alternative installed, but I wouldn't think that should cause problems.
<Swordless> Go hug a tree, you vegetarian (I bet you really are one)

Locked