View Full Version : Megui AR output problem
hunter_aran
17th February 2012, 02:26
I have encountered a serious problem in encoding x264 in megui that started a couple days ago. I do not have megui, vlc, or anything set to autoupdate so unless a program can get broken on its own, I have no clue why everything changed. Anyway, the file, when loaded into megui, displays fine the preview window that pops up. I click the box that says "preview dar" or whatever it is and the image stretches to a nice 4:3. Yay. Well, when it is done encoding, it's like the ar flag is not being passed through because the image stays squished vertically. ALL my files started doing this the last few days and the files before that display correctly have the exact same cropping and global megui darx and dary values. Could it have to do with the D2V files? I made new D2Vs and it still happens. What can I do to fix this? I am using vlc to test and the older files display correctly. This is really annoying! Please help! :scared: Thanks
hunter_aran
17th February 2012, 08:11
Well I was stupid and I did an update using the development server and now everything's messed up. Now the preview window freezes with CPU usage topping out at 25% then dropping to 0%, not loading the video, and then when I close that window, the whole program freezes. The version that I had before was version 2050, which I updated in october or so. If I download the old version, it just updates each component back to current so I can't choose to update back to the approximate date I knew everything was working. :mad:
hello_hello
17th February 2012, 08:17
As an experiment.....
Open a problem file with MediaInfo (http://mediainfo.sourceforge.net/en). From the View menu, switch to HTML (it's easier to read). There should be at least one, if not two aspect ratio values in the video section. "Display aspect ratio" will be there, "Original display aspect ratio" might be there also. What do they say?
You can probably fix the files you've already encoded by resaving them using MKVMergeGUI, while setting the correct aspect ratio. You can find it in the MeGUI\tools\mkvmerge installation folder. It's called mmg.exe Just run it and MKVMergeGUI will open (sometimes it takes a few seconds).
Why it's happening I've no idea. It may help to post a log file from one of the problem encodes.
hello_hello
17th February 2012, 08:25
Posting out of order here.....
You may have to try an encode using the old version, without letting it update itself again. Or set it not to use the development server. I updated MeGUI myself today and it's been working fine, but chances are I use a different version of Windows or have different version of dot net installed.
For the record, MeGUI keeps a backup copy of the last version of just about everything in it's installation folder. If you want to revert to the previous MeGUI version after an update (for example), you can delete MeGUI.exe and remove the backup extension from MeGUI.exe.backup. Sounds like it might be too late now though.
hunter_aran
17th February 2012, 19:17
As an experiment.....
Open a problem file with MediaInfo (http://mediainfo.sourceforge.net/en). From the View menu, switch to HTML (it's easier to read). There should be at least one, if not two aspect ratio values in the video section. "Display aspect ratio" will be there, "Original display aspect ratio" might be there also. What do they say?
Well the problem files say display aspect ratio 3:2 (incorrect) but the earlier ones that are ok say 4:3. What baffles me is that the files are identical in the script except for the file being loaded.
I will try using the program you suggested.
I tried manually reverting to backup as suggested but I realized the problem was I updated to the dev server update and then when it got messed up I tried updating back to the stable server update so I overwrote what I had before... Now the preview window works again by doing that and it encodes without crashing at least.
I ran another encode, commenting out all the filters to save time. Same result, wrong dar. Here is the log file from that encode, both passes:
-[Information] Versions
--[Information] [2/17/2012 9:58:41 AM] MeGUI Version : 2115 (svn)
--[Information] [2/17/2012 9:58:41 AM] OS : Windows XP Professional x86 SP3 (5.1.196608.2600)
--[Information] [2/17/2012 9:58:41 AM] Latest .Net Framework installed : 3.5 (3.5.30729.01)
--[Information] [2/17/2012 9:58:41 AM] AviSynth Version : 2.5.8.5 (7/12/2009 3:46:34 AM)
-[Information] Log for job66 (video, Spongebob2fry03.avs -> )
--[Information] [2/17/2012 10:05:38 AM] Started handling job
--[Information] [2/17/2012 10:05:38 AM] Preprocessing
-[NoImage] SetMemorymax(768)
-[NoImage] SetMTMode(mode=2, threads=0)
-[NoImage] Import("C:\Program Files\AviSynth 2.5\plugins\aaa.avs")
-[NoImage] DGDecode_MPEG2Source("\\psf\home\desktop\D2V Project Files\Spongebob S2 D2V\Spongebob_2_Fry_Cook_Games.d2v")
-[NoImage] global MeGUI_darx = 94
-[NoImage] global MeGUI_dary = 71
-[NoImage] #SetMTMode(mode=2, threads=0)
-[NoImage] #AnimeIVTC(mode=1)
-[NoImage] #Dfmderainbow()
-[NoImage] #DeHalo_alpha(rx=1.5, ry=1.5, darkstr=1.5, brightstr=1.5, lowsens=20, highsens=20)
-[NoImage] #mctemporaldenoise(settings="high", edgeclean=true, stabilize=true)
-[NoImage] #daa3()
-[NoImage] #aaa()
-[NoImage] #vmToon(sharpen=false, strength=50, luma_cap=150, threshold=2, thinning=0, ssw=3, ssh=3)
-[NoImage] crop(4, 0, -4, -2)
--[Information] [2/17/2012 10:05:38 AM] Avisynth input script
--[Information] [2/17/2012 10:05:38 AM] Job commandline: "\\psf\Host\Applications\My Windoze Applications\Video Editing\MeGUI_2112_x86\tools\x264\x264.exe" --level 4.1 --preset slow --pass 1 --bitrate 2500 --stats "\\psf\Home\Desktop\Encodes\Spongebob2fry03.stats" --deblock -1:0 --keyint 300 --ref 3 --qpmax 51 --me hex --subme 7 --output NUL "\\psf\Home\Desktop\AVS\Spongebob S2 AVS\Disc 3\Spongebob2fry03.avs"
--[Information] [2/17/2012 10:05:39 AM] Encoding started
--[Information] [2/17/2012 10:07:48 AM] Standard output stream
-[NoImage] avs [info]: 712x478p 0:0 @ 2997/100 fps (cfr)
-[NoImage] x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
-[NoImage] x264 [info]: profile Main, level 4.1
-[NoImage]
-[NoImage] x264 [info]: frame I:189 Avg QP:19.98 size: 93503
-[NoImage] x264 [info]: frame P:7097 Avg QP:22.37 size: 17684
-[NoImage] x264 [info]: frame B:12984 Avg QP:26.51 size: 4938
-[NoImage] x264 [info]: consecutive B-frames: 7.3% 10.0% 35.3% 47.4%
-[NoImage] x264 [info]: mb I I16..4: 20.3% 0.0% 79.7%
-[NoImage] x264 [info]: mb P I16..4: 10.3% 0.0% 0.0% P16..4: 62.2% 0.0% 0.0% 0.0% 0.0% skip:27.5%
-[NoImage] x264 [info]: mb B I16..4: 2.8% 0.0% 0.0% B16..8: 10.2% 0.0% 0.0% direct:10.0% skip:77.1% L0:32.3% L1:41.7% BI:26.0%
-[NoImage] x264 [info]: final ratefactor: 20.87
-[NoImage] x264 [info]: direct mvs spatial:99.8% temporal:0.2%
-[NoImage] x264 [info]: coded y,uvDC,uvAC intra: 63.6% 81.8% 64.4% inter: 19.2% 20.2% 11.0%
-[NoImage] x264 [info]: i16 v,h,dc,p: 23% 41% 28% 8%
-[NoImage] x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 25% 13% 8% 9% 7% 9% 6% 11%
-[NoImage] x264 [info]: i8c dc,h,v,p: 44% 36% 14% 6%
-[NoImage] x264 [info]: Weighted P-Frames: Y:1.4% UV:0.6%
-[NoImage] x264 [info]: kb/s:2451.95
-[NoImage] encoded 20270 frames, 157.57 fps, 2451.95 kb/s
--[Information] [2/17/2012 10:07:48 AM] Standard error stream
--[Information] [2/17/2012 10:07:48 AM] Postprocessing
---[Information] Deleting intermediate files
--[Information] [2/17/2012 10:07:48 AM] Job completed
-[Information] Log for job67 (video, Spongebob2fry03.avs -> Spongebob2fry03.mp4)
--[Information] [2/17/2012 10:07:49 AM] Started handling job
--[Information] [2/17/2012 10:07:49 AM] Preprocessing
-[NoImage] SetMemorymax(768)
-[NoImage] SetMTMode(mode=2, threads=0)
-[NoImage] Import("C:\Program Files\AviSynth 2.5\plugins\aaa.avs")
-[NoImage] DGDecode_MPEG2Source("\\psf\home\desktop\D2V Project Files\Spongebob S2 D2V\Spongebob_2_Fry_Cook_Games.d2v")
-[NoImage] global MeGUI_darx = 94
-[NoImage] global MeGUI_dary = 71
-[NoImage] #SetMTMode(mode=2, threads=0)
-[NoImage] #AnimeIVTC(mode=1)
-[NoImage] #Dfmderainbow()
-[NoImage] #DeHalo_alpha(rx=1.5, ry=1.5, darkstr=1.5, brightstr=1.5, lowsens=20, highsens=20)
-[NoImage] #mctemporaldenoise(settings="high", edgeclean=true, stabilize=true)
-[NoImage] #daa3()
-[NoImage] #aaa()
-[NoImage] #vmToon(sharpen=false, strength=50, luma_cap=150, threshold=2, thinning=0, ssw=3, ssh=3)
-[NoImage] crop(4, 0, -4, -2)
--[Information] [2/17/2012 10:07:49 AM] Avisynth input script
--[Information] [2/17/2012 10:07:50 AM] Job commandline: "\\psf\Host\Applications\My Windoze Applications\Video Editing\MeGUI_2112_x86\tools\x264\x264.exe" --level 4.1 --preset slow --pass 2 --bitrate 2500 --stats "\\psf\Home\Desktop\Encodes\Spongebob2fry03.stats" --deblock -1:0 --keyint 300 --ref 3 --qpmax 51 --me hex --subme 7 --output "\\psf\Home\Desktop\Encodes\Spongebob2fry03.mp4" "\\psf\Home\Desktop\AVS\Spongebob S2 AVS\Disc 3\Spongebob2fry03.avs"
--[Information] [2/17/2012 10:07:50 AM] Encoding started
--[Information] [2/17/2012 10:14:35 AM] Standard output stream:
-[NoImage] avs [info]: 712x478p 0:0 @ 2997/100 fps (cfr)
-[NoImage] x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
-[NoImage] x264 [info]: profile High, level 4.1
-[NoImage]
-[NoImage] x264 [info]: frame I:189 Avg QP:20.50 size: 94870
-[NoImage] x264 [info]: frame P:7097 Avg QP:22.87 size: 18215
-[NoImage] x264 [info]: frame B:12984 Avg QP:27.33 size: 4917
-[NoImage] x264 [info]: consecutive B-frames: 7.3% 10.0% 35.3% 47.4%
-[NoImage] x264 [info]: mb I I16..4: 11.4% 38.8% 49.7%
-[NoImage] x264 [info]: mb P I16..4: 1.6% 3.7% 3.1% P16..4: 43.2% 10.8% 12.0% 0.0% 0.0% skip:25.6%
-[NoImage] x264 [info]: mb B I16..4: 0.5% 0.7% 0.9% B16..8: 21.2% 2.7% 1.3% direct: 4.9% skip:67.7% L0:34.1% L1:58.1% BI: 7.8%
-[NoImage] x264 [info]: 8x8 transform intra:39.8% inter:54.2%
-[NoImage] x264 [info]: direct mvs spatial:96.6% temporal:3.4%
-[NoImage] x264 [info]: coded y,uvDC,uvAC intra: 72.5% 87.7% 73.0% inter: 19.3% 25.1% 14.5%
-[NoImage] x264 [info]: i16 v,h,dc,p: 23% 55% 10% 12%
-[NoImage] x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 24% 28% 5% 6% 4% 9% 4% 10%
-[NoImage] x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 34% 15% 6% 7% 6% 8% 5% 8%
-[NoImage] x264 [info]: i8c dc,h,v,p: 45% 35% 13% 8%
-[NoImage] x264 [info]: Weighted P-Frames: Y:1.4% UV:0.6%
-[NoImage] x264 [info]: ref P L0: 69.4% 8.4% 16.3% 5.7% 0.1%
-[NoImage] x264 [info]: ref B L0: 75.0% 18.0% 6.9%
-[NoImage] x264 [info]: ref B L1: 89.5% 10.5%
-[NoImage] x264 [info]: kb/s:2496.37
-[NoImage] encoded 20270 frames, 51.53 fps, 2496.38 kb/s
--[Information] [2/17/2012 10:14:35 AM] Standard error stream
--[Information] Final statistics
---[Information] [2/17/2012 10:14:38 AM] Video Bitrate Desired: 2500 kbit/s
---[Information] [2/17/2012 10:14:38 AM] Video Bitrate Obtained (approximate): 2499 kbit/s
--[Information] [2/17/2012 10:14:38 AM] MediaInfo
---[Information] File: \\psf\Home\Desktop\Encodes\Spongebob2fry03.mp4
-[Information] Format: MPEG-4
-[Information] FormatString: MPEG-4
-[Information] FileSize: 211301712
-[Information] PlayTime: 00:11:16.342
---[Information] General
-[Information] ID: 1
-[Information] StreamOrder:
-[Information] Width: 712
-[Information] Height: 478
-[Information] FrameCount: 20270
-[Information] FrameRate: 29.970
-[Information] ScanType: Progressive
-[Information] Codec: AVC
-[Information] CodecString: AVC
-[Information] Format: AVC
-[Information] AspectRatio: 1.490
-[Information] AspectRatioString: 3:2
-[Information] Delay:
-[Information] Title:
-[Information] Language:
-[Information] LanguageString:
---[Information] Video
--[Information] [2/17/2012 10:14:43 AM] Postprocessing
-[Information] [2/17/2012 10:14:43 AM] Successfully deleted \\psf\Home\Desktop\Encodes\Spongebob2fry03.stats
-[Information] [2/17/2012 10:14:43 AM] Successfully deleted \\psf\Home\Desktop\Encodes\Spongebob2fry03.stats.mbtree
---[Information] Deleting intermediate files
--[Information] [2/17/2012 10:14:44 AM] Job completed
I originally had the global megui darx and dary values set to 4 and 3, respectively. This time the avs script creator, where I use the clever anamorphic option to figure out the DAR values and has always worked, now says to put 94 and 71 as the values. I did change the acceptable aspect error to 0% this time (probably made the values change) but no matter what values I input, it always output 3:2.
hunter_aran
17th February 2012, 19:49
As an experiment.....
You can probably fix the files you've already encoded by resaving them using MKVMergeGUI, while setting the correct aspect ratio. You can find it in the MeGUI\tools\mkvmerge installation folder. It's called mmg.exe Just run it and MKVMergeGUI will open (sometimes it takes a few seconds).
Awesome! I used MKVMerge and it fixed the file and I just had to remux back to MP4 after that and it works perfect in vlc and iTunes now! Checked in Mediainfo and the original aspect ratio now shows up as 3:2 and the display aspect ratio is listed as 4:3 and even iTunes reports the resolution correctly (not the original resolution) which helps in another question I posted yesterday! Still doesn't solve the initial problem but I can fix all those files that are messed up. I am surprised this works since the muxer I normally use (Subler for Mac) has the option but did not actually work. Thanks a lot! :D
Zathor
17th February 2012, 20:03
Well I was stupid and I did an update using the development server and now everything's messed up. Now the preview window freezes with CPU usage topping out at 25% then dropping to 0%, not loading the video, and then when I close that window, the whole program freezes.
2112 did work without freezes?
Please upload a short sample file regarding the AR problem.
hunter_aran
18th February 2012, 00:32
2112 did work without freezes?
Please upload a short sample file regarding the AR problem.
Well what I did was I updated using the dev server because I thought it might fix the AR problem but then the file preview window freezing started. I then switched to the stable server and did another update to see if that changed anything and now the preview window is fixed, however the AR problem stays the same. What sample would you like? Part of the vob? Whats an easy way to cut it? I usually use DGIndex to select part of the file rather than cutting the original... Or do you want part of the output file?
hello_hello
18th February 2012, 07:41
I looked at the log file you posted and it does seem the aspect ratio is being set incorrectly. There also seems to be a line missing from the log file which to me indicates the encoder isn't being instructed on the correct aspect ratio (assuming that's how it works) and because remuxing the video fixed the problem..... I'm fairly sure MediaInfo's "original aspect ratio" refers to the aspect ratio in the video stream, while "aspect ratio, is the aspect ratio at the container level. If they're the same (or even if they're close to being the same) MediaInfo only reports "aspect ratio".
Here's what I think the log file should look like. The bits highlighted in blue appear to be missing/wrong, but it's all over my head and I just picked any old file (different resolution) to run a quick encode and compare log files.. I'll leave you in Zathor's capable hands....
--[Information] [18/02/2012 6:05:55 AM] Encoding started
--[Information] [18/02/2012 6:05:58 AM] Standard output stream
--[Information] [18/02/2012 6:05:58 AM] Standard error stream
---[NoImage] avs [info]: 712x478p 27485:30972 @ 25/1 fps (cfr)
---[NoImage] x264 [info]: using SAR=27485/30972
hello_hello
18th February 2012, 07:59
Awesome! I used MKVMerge and it fixed the file and I just had to remux back to MP4 after that and it works perfect in vlc and iTunes now! Checked in Mediainfo and the original aspect ratio now shows up as 3:2 and the display aspect ratio is listed as 4:3 and even iTunes reports the resolution correctly (not the original resolution) which helps in another question I posted yesterday!
I didn't realize that other thread was also yours. Well hopefully my ramblings there will make some sense now. :)
For the disappointing bit...... if you use a hardware player (Bluray etc) also test the files on it. It's been a while, but I'm pretty sure both Bluray players in this house (different models, but they both display anamorphic MKVs correctly) ignore the container aspect ratio. So in the case of your files if "original aspect ratio" is 3:2, I think that's how they'd display them.
At one stage I encoded a bunch of DVDs while adding the wrong colorimetry info, so I thought I'd be clever and fix them with this (http://forum.doom9.org/showthread.php?t=152419&highlight=ffmpeg+Bitstream+Modifier+Muxer), only to discover they wouldn't display correctly on the Bluray player any more (they were fine using the PC). So then I had to use the same tool again to fix the aspect ratio for the Bluray player.
Anyway, don't take all that as Gospel as it was a while ago, but it might pay to check.
Zathor
18th February 2012, 16:52
What sample would you like? Part of the vob? Whats an easy way to cut it? I usually use DGIndex to select part of the file rather than cutting the original... Or do you want part of the output file?
I need the input file in order to reproduce the problem. If I can reproduce it, I can fix it (I tried it with some of my files and they did work as expected). It does not matter for me if you upload a complete VOB file or a splitted VOB as long as you can reproduce the problem with this file.
hunter_aran
18th February 2012, 19:16
I need the input file in order to reproduce the problem. If I can reproduce it, I can fix it (I tried it with some of my files and they did work as expected). It does not matter for me if you upload a complete VOB file or a splitted VOB as long as you can reproduce the problem with this file.
Ok. Here you go a few seconds of the middle of the vob file. http://www.mediafire.com/?a7t5p0vm07l0c6o
As for the container flag, as set by mkvmerge, not being compatible with some hardware players, I appreciate the info because I want to make my encodes as future-proof as possible, so that is a consideration. I read that MP4Box changes both the container and stream AR flags... is this true? I wish this problem gets resolved soon...
hunter_aran
19th February 2012, 02:09
Ok I put my current Megui folder somewhere else and downloaded Megui 2050 again and updated everything except for the core program (some things require the core to be updated so I did not update those either, like MKVmerge). Then I reloaded my presets back in and ran the encode and voila the output file AR is perfect! So again, no idea why, but the core program is at fault in my case it seems. It is still strange to me that this problem arose BEFORE I updated at all to being with. So for now I will stick with the version that works until it gets resolved. It would be nice though to still be able to correct the stream-level AR flag so I do not have to rencode a few days worth of files (I found out halfway through my queue that this problem was happening, lol).
Zathor
19th February 2012, 11:57
Ok. Here you go a few seconds of the middle of the vob file. http://www.mediafire.com/?a7t5p0vm07l0c6o
Thanks for the upload. I tried to reproduce the problem, but failed. If I select "clever anamorphic encoding" in the AVS Script editor the file did encode as expected. Can you therefore please upload also your MeGUI\allprofiles folder and tell me which x264 profile you use? If possible it would be even better to upload your whole MeGUI folder (except the update_cache).
hunter_aran
19th February 2012, 20:42
Thanks for the upload. I tried to reproduce the problem, but failed. If I select "clever anamorphic encoding" in the AVS Script editor the file did encode as expected. Can you therefore please upload also your MeGUI\allprofiles folder and tell me which x264 profile you use? If possible it would be even better to upload your whole MeGUI folder (except the update_cache).
Here is my Megui folder that does not work. http://www.mediafire.com/?889vpwwq8w1ub06
I made my own x264 profile based on the highest settings in Handbrake that maintain iPad and iPhone compatibility, I called it something like "High Profile Handbrake-style". This same profile works in the 2050 core version so I think it' safe to say that it is not the problem. I use the clever anamorphic option without resize and encode to non-mod16 because there seems not to be any benefit anymore. Thanks again for your help!
Zathor
20th February 2012, 21:47
Sadly I can still not reproduce the problem. Therefore please try this build and post the complete log:
http://forum.doom9.org/showthread.php?t=163399
Hopefully the debug code I added can help to find the problem.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.