Log in

View Full Version : Random MeGUI video encoding glitches


r00t61
27th October 2008, 06:07
I've been using MeGUI for about two years now, and for the most part, it's been pretty great. I have, however, run into an issue that is quite vexing.
Every so often, the video encode screws up several frames. They end up looking like a slimy mess (I like to think of it as strawberry jam being thrown on the film). These errors tend to last 3-5 seconds of video time.
My latest example:
http://i426.photobucket.com/albums/pp342/r00t61/Glitch.jpg

For comparison, here is the original, unmolested frame from the avisynth preview:
http://i426.photobucket.com/albums/pp342/r00t61/Clean.jpg

So I don't think it's an issue with the clip source, nor with avisynth.

I can make errors like this "go away," by tweaking the bit rate, number of b-frames, number of reference frames, the motion estimation algorithm, and/or subpixel refinement, but it's all really somewhat non-deterministic and frustrating. Encode settings that work perfectly fine for video "x" can cause my strawberry jam mess on video "y." The only way for me to verify that an encode has worked properly is to watch the whole clip like a hawk to confirm the absence of strawberry jam. This can get annoying, really fast.

Any help in resolving would be much appreciated.

For reference, here's my avs script:
DGDecode_mpeg2source("C:\Documents and Settings\Eugene S. Park\Desktop\Robin Hood WORKING DIRECTORY\Robin Hood (Forced Film).d2v",info=3)
# COLOUR CORRECTION
ColorMatrix(d2v="Robin Hood (Forced Film).d2v")
# CROP/RESIZE
crop( 8, 0, -8, -2)
LanczosResize(704,416)

And my mencoder settings when I originally encoded this clip:
program --pass 2 --bitrate 1925 --stats ".stats" --level 4.1 --ref 16 --mixed-refs --no-fast-pskip --bframes 5 --b-adapt 2 --b-pyramid --weightb --direct auto --filter -2:-2 --subme 9 --trellis 2 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --me umh --merange 32 --threads auto --thread-input --progress --no-dct-decimate --no-psnr --no-ssim --output "output" "input"

Avenger007
27th October 2008, 09:05
What makes you think this is a MeGUI problem? MeGUI has nothing to do with video encoding (so it might be wise to change the thread title).
Every so often, the video encode screws up several frames.
Are the bad frames random when doing the same encode several times?
If so then run Prime95 overnight and report back.
If not then give an x264 bug report.

poisondeathray
27th October 2008, 15:10
Also, test your memory with memtest64+

Is it replicable on the exact frame everytime?

Does it happen when you switch containers? I've seen something similar in .mkv but disappear when testing in .ts

Does it happen when you switch decoders? e.g. CoreAVC vs. ffdshow?

What about different media players that don't rely on system direct show codecs? e.g. VLC, KMplayer, Mplayer ?

Dark Shikari
27th October 2008, 19:10
Test on a working decoder--that means not an old version of libavcodec (I've fixed a number of bugs in it recently)...

r00t61
28th October 2008, 00:16
Also, test your memory with memtest64+

Is it replicable on the exact frame everytime?

Does it happen when you switch containers? I've seen something similar in .mkv but disappear when testing in .ts

Does it happen when you switch decoders? e.g. CoreAVC vs. ffdshow?

What about different media players that don't rely on system direct show codecs? e.g. VLC, KMplayer, Mplayer ?
I tried switching containers, from MKV to MP4 to elementary H264, and the bad frames still exist.

I tried switching between CoreAVC and ffdshow, and the bad frames still exist.

I also tried using VLC and MPlayer, and the bad frames still exist.

I am going to run Prime95/Memtest as suggested. I will also re-encode with the exact same settings and see if the same frames are still encoded improperly.

Many thanks, as I peel the onion a little further...

Dark Shikari
28th October 2008, 00:20
1. Are you using x264 r999?
2. If so, can you upload the smallest source file that, using x264 r999, produces the problem (with a specific set of settings).
3. Does the problem still occur if you head over to the Current Patches thread, grab the build from the last page that is made with disable-asm, and use that instead with the same settings?
4. Does the problem occur without 8x8dct?

Sharktooth
28th October 2008, 15:08
definatly not a megui problem

r00t61
30th October 2008, 20:42
What makes you think this is a MeGUI problem? MeGUI has nothing to do with video encoding (so it might be wise to change the thread title).

Are the bad frames random when doing the same encode several times?
If so then run Prime95 overnight and report back.
If not then give an x264 bug report.
I would be happy to change the title to something more appropriate, like "menc glitch" or other, but I don't want to lay the blame at an innocent's feet; any suggestions?

The bad frames are random; i.e., I don't get the same exact corrupt frames from encode to encode.

I ran Prime95 for 48 hours with no issues.

Also, test your memory with memtest64+

Is it replicable on the exact frame everytime?

I ran the full memtest suite with no issues.

As I stated above, I cannot get the same exact bad frames to repeat every time I encode.

Test on a working decoder--that means not an old version of libavcodec (I've fixed a number of bugs in it recently)...
I tested with ffdshow tryouts revision 2150 (dated 21 September 2008). Is there a different version I should be using?

Dark Shikari
30th October 2008, 20:45
I tested with ffdshow tryouts revision 2150 (dated 21 September 2008). Is there a different version I should be using?No, that is fine--but you didn't follow my instructions above, and I can't help you until you do. I can't help people with arbitrary output bugs when they won't upload samples and/or what is necessary to replicate the bug.

r00t61
30th October 2008, 21:20
I'm still working on finishing the other items you asked for, thanks.