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. |
16th December 2005, 14:00 | #1 | Link |
Be Brave!
Join Date: Dec 2004
Posts: 1,101
|
Libavcodec decoding B-Frames in ASP *.mp4 is broken
I'm sure you've run into this as well. When importing an XviD file with B-Frames into mp4 with MP4Box, and then playing it with ffdshow, the picture becomes uglier. This is because the B-Frames are somehow not rendered correctly with libavcodec. I tried the XviD decoder, and the picture was just fine. This has happened many times with me; I've been able to reproduce this with both ffdshow and VLC. I've never seen this with DivX encoded B-Frames files, so this could be an XviD issue, although I don't encode with DivX 5/6 at all, so I can't answer that. I believe this happens only if the file was encoded with B-Frames+Packed Bitstream. Might be good if you guys did some encoding tests and imported with MP4Box just so that we can get a proper conclusion of how this bug works.
Here are two screenshots of how it looks: http://img229.imageshack.us/img229/5...61355438fc.png http://img229.imageshack.us/img229/7...61356309ry.png The first picture is the XviD in mp4, the second is the XviD in avi. Both are rendered by Libavcodec in MPC. Same ugly picture is shown with VLC. This has never happened with Simple Profile.
__________________
Last edited by Elias; 16th December 2005 at 14:05. |
16th December 2005, 14:05 | #2 | Link |
gone
Join Date: Apr 2004
Posts: 1,706
|
Have you tried turning off packed bitstream in XviD VFW and then importing to mp4box? I believe there were some problems with mpeg4modifier and packed bitstream as well recently. So perhaps something goes wrong when unpacking the lot.
|
16th December 2005, 14:08 | #3 | Link | |
Be Brave!
Join Date: Dec 2004
Posts: 1,101
|
Quote:
Also, you should know by now that I never encode with Packed bitstream
__________________
|
|
16th December 2005, 14:53 | #4 | Link |
clueless n00b
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
|
Could you try to activate the "XviD and DivX QPel bug " option in the miscellaneous options of ffdshow (please try that even if you're not using QPel, it may have an effect even without QPel).
Also, having just very recently worked closely with screenshots, the two don't have the same AR.. did you notice that? The one in mp4 seems squeezed. Is there any change if you create your XviD stream without packed bitstream (but still with B-frames) or without any b-frames and make the same comparison, take shots from the same frames?
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org |
16th December 2005, 15:24 | #5 | Link | |
Be Brave!
Join Date: Dec 2004
Posts: 1,101
|
Quote:
Activating the "XviD and DivX QPel bug" didn't do any difference when decoding. Why should it though? QPel hasn't even been used in this case. Edit: this doesn't happen when importing the avi to Matroska... which made me go apeshit and considered switching to Matroska permanently
__________________
Last edited by Elias; 16th December 2005 at 15:35. |
|
16th December 2005, 15:35 | #6 | Link | |||
clueless n00b
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
|
Quote:
Quote:
Quote:
Can you share a sample of your AVI?
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org |
|||
16th December 2005, 15:37 | #7 | Link | |
Be Brave!
Join Date: Dec 2004
Posts: 1,101
|
Quote:
__________________
|
|
16th December 2005, 15:39 | #8 | Link | ||
Registered User
Join Date: Nov 2001
Posts: 9,770
|
the problem in mpeg4modifier was caused only when appending two packed bitstream .avi files while the first part didnt end correctly, iirc
Quote:
if you want to really test if things work correctly with mkv, try native mkv Quote:
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
||
16th December 2005, 15:49 | #9 | Link |
Be Brave!
Join Date: Dec 2004
Posts: 1,101
|
http://rapidshare.de/files/9275798/Desktop.rar.html
I only made two very short samples. The second source can't be seen that properly, but the bug shows if you gaze carefully at the Oprah Logo. It should be enough to study the files and eventually find what's causing this bug. However, if you need bigger samples, let me know. Also, the second source has packed bitstream.
__________________
|
16th December 2005, 16:07 | #11 | Link |
Be Brave!
Join Date: Dec 2004
Posts: 1,101
|
A quick look in MPEG4Modifier shows that they're both using Custom Quant Matrix, and the MPEG quant. Could this be what's causing the issue with Libavcodec? I thought that these settings were MPEG-4 standards compliant? Or is it just so that Libavcodec lacks support for them when parsed via mp4?
__________________
Last edited by Elias; 16th December 2005 at 18:17. |
16th December 2005, 16:23 | #12 | Link |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
it might be a bug in libavcodec's autodetect idct feature propably leading to an idct mismatch
ffdshow by default is set to "autodetect" idct. i dunno whats going on in ffdshow, but when i set the idct manually to any other idct the correct image is shown on both samples videolan shows the same problem (propably it acts the same way as ffdshow). mplayer doesnt show this problem at all, which might be because mplayer might not have the idct detection set to autodetect? dunno edit: in the mplayer doc it says mplayer uses autodetect by default too this is especially strange as the clips dont seem to use qpel any ideas?
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free Last edited by bond; 16th December 2005 at 16:29. |
16th December 2005, 16:29 | #13 | Link | |
Be Brave!
Join Date: Dec 2004
Posts: 1,101
|
Quote:
__________________
|
|
16th December 2005, 17:15 | #14 | Link |
clueless n00b
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
|
I wonder if there's a way to see which iDCT ffdshow chose.. could it be that the autodetection is based on fourCC and since there's no fourCC in MP4, ffdshow picks the default one?
However, even with AVIs, in what limited tests I did so far, I actually like the output of the XviD decoder much better.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org |
17th December 2005, 13:32 | #15 | Link |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
well i am not sure whats going on, as
- idct mismatch is iirc only possible when qpel is used, which isnt done with these clips - mplayer also has autodetect idct set by default (the doc claims) - the only xvid version that used a different idct (simple) was published in 2003 or so and the clips available here werent encoded with these old builds (according to the userdata in the vol), which doesnt mean the producer didnt make some strange own compile so this is very very strange, but i would say as long as we cant reproduce this or know what exactly was done with that file, i would say the producer of this file did something very strange and is to blame
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
17th December 2005, 13:37 | #16 | Link | |
Be Brave!
Join Date: Dec 2004
Posts: 1,101
|
Quote:
http://interviewsrus.com/home/ <--- Encoded the Oprah episode
__________________
|
|
|
|