Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 7th October 2011, 14:19   #1  |  Link
ipanema
Registered User
 
Join Date: Apr 2009
Posts: 93
H.264 in AVI files - a question

I believe that MPEG-4 Part 2 video such as DIVX and XVID is commonly stored in AVI files.

On the other hand, it seems that storing AVC/H.264 in an AVI file is frowned upon - something to do with the presence of backward-referencing B frames I think.

But MPEG-4 Part 2 does also contain B frames.

So why is it OK to store MPEG-4 Part 2 video in an AVI file, but it is not-so-OK to store H.264 video in AVI files ?
ipanema is offline   Reply With Quote
Old 7th October 2011, 14:30   #2  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
First of all: H.264 (MPEG-4 AVC) is more complex than MPEG-4 Part-2 (ASP). Multiple references, I-Frames and IDR-Frames, etc.

Also most of the problems with "AVI and H.264" do not originate from the AVI container itself, but form the way how AVI files commonly are created:
Through the antiquated VFW (Video for Windows) interface, as used by the still pretty popular VirtualDub(Mod).

For example, the x264 encoder uses a very long "lookahead", i.e. it reads like ~80 source frames, before the first (compressed) output frame is returned.
This hardly complies with the VFW concept of "one frame in, one frame out". Though hacks to workaround that problem have been invented...

(I think most MPEG-4 Part 2 simply didn't use a big "lookahead", so the problem was less striking)

Last but not least: I think putting MPEG-4 Part-2 into AVI never was the best idea, but it simply became the defacto-standard, back in the DivX ;-) era.
Putting H.264 into AVI is not a problem by itself either (if done properly!), but nowadays we have much better alternatives, such as MKV and MP4.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 7th October 2011 at 14:48.
LoRd_MuldeR is offline   Reply With Quote
Old 7th October 2011, 14:38   #3  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
From http://mirror05.x264.nl/Dark/loren.html
Quote:
<pengvado> <Dark_Shikari> if a fansubber or DVD rip group uploaded an H.264-in-AVI file they'd get laughed off the internet
<Dark_Shikari> Probably
<pengvado> but asp-in-avi wouldn't be laughed at
<Dark_Shikari> of course not, ASP in AVI is normal unless you want softsubs
<pengvado> and asp-in-avi requires exactly the same ugly hacks
<Dark_Shikari> Probably because its been that way so long that everyone is accustomed to it
<pengvado> which just goes to show that our campaign to use a new codec as an excuse to tell people to upgrade their container is working


Quote:
Originally Posted by LoRd_MuldeR View Post
Last but not least: I think putting MPEG-4 Part-2 into AVI never was the best idea, but it simply became the defacto-standard in the DivX ;-) era.
Agreed.
nm is offline   Reply With Quote
Old 7th October 2011, 15:14   #4  |  Link
ipanema
Registered User
 
Join Date: Apr 2009
Posts: 93
Thanks for clarifying that.
ipanema is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:46.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.