meguIV: The Official Akiba-Online DVD Encoder (v1.0.1.1)

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,755
5,154
You could try running it from a shorter path name, although I don't think you're hitting the limit there but it's hard to tell.

Could be a live protection from your antivirus blocking the execution of the virtual stuff, you could try disabling it completely(or looking for a live feature to add an exception/temporarily disable) to see if that fixes it.

I'm assuming you're using windows 10 from the look of that error box style and I'm not sure if someone else tested it on it so could be the issue. It was released 4-5 months before I made the fix so it should support it but maybe not.
Edit: Read back a bit and someone did make it work on win 10 so unless an update screwed it up, that shouldn't be the issue.
 
Last edited:

Lonsdaleite

New Member
May 15, 2018
24
8
Disabled Defender real-time protection, run from shorter path name => no dice

Windows 10 64 v1803. Would be great if anyone else could corroborate whether it works or doesn't work on their system.

Tried different megui builds: Megui 2836-32 from April runs.

Tried older systems: beta 4 2015-12-02 runs on a fresh 8.1 install.

What could be going on with Windows 10 v1803? I guess dual booting is a workaround for now.
 
Last edited:

Lonsdaleite

New Member
May 15, 2018
24
8
Well, I have the whole custom latest MeGUI + QTGMC with all latest components setup, but need to figure out what Vit was doing to enhance the video for gravure content. The problems above seemed to be have been an issue with the GUI's. I may work my way to full command line like you too. Thanks again.

Did you ever figure out the IV tweaks? After reading through the thread I am also thinking of biting the bullet and scripting commands out like SamKook.
 

PToadstool

Well-Known Member
Dec 9, 2009
38
403
Has anyone been able to get this to run in Win10 v1803? I'd rather not dual boot to 8.1 just to encode DVDs or Blu-rays.
 

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,755
5,154
The whole point of this is to make it easy to get the best quality possible. The deinterlacing methods included with handbrake are all lower quality than tgmc(the deinterlacer used by MeguIV)/qtmgc(the deinterlacer used by MeguIVit).

While it is possible to use qtgmc with handbrake, it's far from simple and if you're good enough to do it, you don't really need handbrake in the first place, might as well use the command line encoder directly.

I might look into repacking it with a newer version of the software to see if that fixes the issues with it not working in up-to-date win10 but that's not gonna be now, got too much to deal with atm.
 

Death Metal

Burning Knuckle
Jan 9, 2007
678
1,002
Just confirming that Sam's repackaging from 12/2015 won't run on Win10 x64 v1803. Since I only tried this application a single time at very different moments throughtout the years, I have never ever got it to run in any of my systems. It seems I am always too late; bummer!
 

shank

Member
May 27, 2007
57
7
Did you ever figure out the IV tweaks? After reading through the thread I am also thinking of biting the bullet and scripting commands out like SamKook.

I used Megui years ago, so I was already slightly familiar with it. I grabbed the latest version of it, qtgmc and all its plugins, qaac for audio, x264 for video, etc. Set them each up (It will take time researching and reading, if you aren't familiar with this already. You can get stuck at several points: how things work together, how the parameters work, etc). Then I looked through the avs scripts and commands used by Meguivit and set those same options in my setup.

If you didn't change many options in Meguivit when encoding before, then you'll pretty much be set there after getting all that setup. If you changed options, you'll need to figure out what command set that option or what plugin provided that option.

After setting everything all up, I think all I really changed was:
latest x264, preset to very slow, crf 18
qaac for audio
mp4 default container

The difficulty is getting everything setup.

For the longest time, I thought I was missing some tweak, because I noticed a checkerboard pattern was causing like a gradient banding effect in the encode. Not sure why I assumed Meguivit didnt have issue with it for the longest time, but I finally decided to try it there and the Meguivit encode does it too. If I disabled qtgmc the checkerboard pattern would encode without the visual issue, but I lose getting a 60fps encode. So the issue is really somewhere in qtgmc or one of its plugins, but I have yet to figure out how to get around it. I've tried basic QTGMC() and dug into sourcematching with no luck so far QTGMC( Preset="Slower", SourceMatch=2, Sharpness=0.2, TR0=2, TR1=2, TR2=1, MatchPreset2="Slower" ).
 

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,755
5,154
QTGMC gets it's 60fps by interpolating half of the missing picture for each of the 2 interlacing fields instead of blending the 2 together like most deinterlacer do so I'm guessing your issue is because of that interpolation which might be wrong is some case(perfect diagonals have a tendency to cause issues).

It's not something that should happen for every single encode though, but if it's just on a checkerboard picture, it's likely to be it but if you're saying there's a checkerboard pattern kinda thing over all the encode, that doesn't sound normal, could you post a screenshot where we can see the issue, I'm curious to see what it looks like.

BTW, not all interlaced video are 60 fps, some are 30 fps and just repeat the same frame twice. I've come across a few of those and you can easily spot it if you go through the video frame by frame when the camera or people are moving and see if there's 2 frame in a row with no movement that look nearly identical.


But yeah, you're right when you say the difficulty is setting everything up, that's why MeguIV was made in the first place, for those who didn't know how to do that and weren't willing to go through the effort of learning/debugging the issues.
 

shank

Member
May 27, 2007
57
7
Untitled-1.jpg
QTGMC gets it's 60fps by interpolating half of the missing picture for each of the 2 interlacing fields instead of blending the 2 together like most deinterlacer do so I'm guessing your issue is because of that interpolation which might be wrong is some case(perfect diagonals have a tendency to cause issues).

It's not something that should happen for every single encode though, but if it's just on a checkerboard picture, it's likely to be it but if you're saying there's a checkerboard pattern kinda thing over all the encode, that doesn't sound normal, could you post a screenshot where we can see the issue, I'm curious to see what it looks like.

QTGMC is great. I'm still surprised it's able to recreate image data based on interlaced frames and create an excellent looking 60fps encode in the vast majority of situations. It's like a form of AI learning which is a concept just introduced recently with technology in general. I made a screenshot comparing the original video, Megui encode, and Meguivit encode (qtgmc) with the scene I'm describing.

The troublesome checkerboard pattern is simply the pattern on a fabric (clothing) that qtgmc has trouble deinterlacing/encoding to a 60 fps encode. The default deinterlacer doesn't have much trouble with it, but I imagine with the way qtgmc has to recreate frame data to create 60fps video, it's not guessing correctly at where the squares and lines are, and where they are moving with motion. The effect is much worse in motion/video than the screenshot, because the solid lines that are formed out of the checkerboard pattern will move like an ocean wave and it's very distracting and gets your attention during the video. I imagine this is just a weakness of that tech, because in every other way qtgmc is better, but in this scene with this pattern, it creates this weird effect. I'm not sure what the proper term is for this artifact. Any ideas on settings that might prevent that effect? I was thinking SourceMatch, but I haven't found a combination of settings that make the effect go away.
 
Last edited:

eshwaa

Well-Known Member
Nov 29, 2014
526
4,856
Do either of you have anymore tips on choosing the correct dar values? I don't have any problems with bluray content but for some reason I'm having trouble with DVDs. I'm pretty much where Shank was earlier this year with the aspect ratio but it's still not coming to me. I could probably use megui but I've finally got a few of the the x264 and qtgmc settings set in a program called StaxRip. I had to give up on meguivit as it could no longer complete a single encode without some kind of error either during encoding or some visual/audio error after encoding. There was a note in MeguiVit to leave dar at 1.82 ITU or something like that. If that value is set in this program I get thin lines on the top/bottom of the video. There are some very slim lines in the source that I crop out and get a good looking video with dar set at 1.777777. Was just curious if there was any more advice before I really start encoding.
 

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,755
5,154
QTGMC is great. I'm still surprised it's able to recreate image data based on interlaced frames and create an excellent looking 60fps encode in the vast majority of situations. It's like a form of AI learning which is a concept just introduced recently with technology in general. I made a screenshot comparing the original video, Megui encode, and Meguivit encode (qtgmc) with the scene I'm describing.

The troublesome checkerboard pattern is simply the pattern on a fabric (clothing) that qtgmc has trouble deinterlacing/encoding to a 60 fps encode. The default deinterlacer doesn't have much trouble with it, but I imagine with the way qtgmc has to recreate frame data to create 60fps video, it's not guessing correctly at where the squares and lines are, and where they are moving with motion. The effect is much worse in motion/video than the screenshot, because the solid lines that are formed out of the checkerboard pattern will move like an ocean wave and it's very distracting and gets your attention during the video. I imagine this is just a weakness of that tech, because in every other way qtgmc is better, but in this scene with this pattern, it creates this weird effect. I'm not sure what the proper term is for this artifact. Any ideas on settings that might prevent that effect? I was thinking SourceMatch, but I haven't found a combination of settings that make the effect go away.

Thanks for the screenshot and yeah, that's exactly the kind of thing the interpolation has issues with. There's probably some settings to attenuate that but it's been so long that I can't remember.
Read qtgmc documentation or Nnedi3 one(it's the part of qtgmc that does the interpolation and there's a few different ones so you can tell qtgmc to try another and you might get better results with that problem) and there might be something about it in there or go the opposite of what you tried, you want the image to be worse to easily get rid of it, like a poor deinterlacer would do. Blur gets rid of many issues, lol.

Do either of you have anymore tips on choosing the correct dar values? I don't have any problems with bluray content but for some reason I'm having trouble with DVDs. I'm pretty much where Shank was earlier this year with the aspect ratio but it's still not coming to me. I could probably use megui but I've finally got a few of the the x264 and qtgmc settings set in a program called StaxRip. I had to give up on meguivit as it could no longer complete a single encode without some kind of error either during encoding or some visual/audio error after encoding. There was a note in MeguiVit to leave dar at 1.82 ITU or something like that. If that value is set in this program I get thin lines on the top/bottom of the video. There are some very slim lines in the source that I crop out and get a good looking video with dar set at 1.777777. Was just curious if there was any more advice before I really start encoding.

The reason you're having trouble with DVD is that the image is always encoded to 720x480 on the disc but it is displayed as either 640x480 or 853.333333x480(for JAV at least, europe is different a bit).

If you don't crop the video, a DVD mostly only has 2 valid aspect ratio, 4:3(640x480) or 16:9(853.333333x480) and the cover tells you which one(or use your eyes to see if one squishes the picture). Where things get complicated is where to set that aspect ratio. Ideally you wanna set it in the x264 settings by using the SAR setting and leaving the DAR to 1:1 in the container but that's a bit more complicated.
Depending on what the container you're using is, you'll need a different number. mkv is the easiest since you can use multiple ways to set it(I think at least, been a while) to 16:9(1.777777 or 853/480) or 4:3(1.333333 or 640/480). An mp4(or wmv, same values) is a bit different since you need to set the PAR instead 16:9(32:27) or 4:3(8:9).

If you crop and/or resize, you gotta do the math to fix it if required(cropping height won't mess up the aspect ratio if I'm not mistaken, as long as you don't resize).

Can't tell you about StaxRip specifically, it will try to do things for you so not sure where it will do it's thing, but try a few things and see which one gives you the right resolution as the final output video.
 

Porni

Well-Known Member
Feb 29, 2012
349
324
Has anyone here tried QTGMC in VapourSynth for gravure/AV content?
Have some experience.
There are almost no differences compared to AviSynth, can use this: http://avisynth.nl/index.php/QTGMC
QTGMC presets: https://docs.google.com/spreadsheets/d/13oqByR7-vNzv4QatCJ9MGmnlPaBOO0_6i88HB9UIIPw/edit#gid=0
Found a tutorial here
Do not use "core = vs. get_core ()" - it's deprecated, use "from vapoursynth import core".

Some simple usage examples: http://www.l33tmeatwad.com/vapoursynth101
 
  • Like
Reactions: Lonsdaleite

Porni

Well-Known Member
Feb 29, 2012
349
324
Could you say more about the differences?
I meant just the difference in syntax.
No one compared, it's unlikely that there will be any differences.
performance
And again, no one seriously compared. There should not be much difference.
Theoretically, Vapour was designed to work best with multithreading. No need to specify the number of cores used anywhere, Vapour will do everything automatically.
Wondering if I should switch over from AviSynth+
It's hardly worth changing something for nothing. In my case, I use Vapour because it's native to Linux.
 
  • Like
Reactions: Lonsdaleite

Porni

Well-Known Member
Feb 29, 2012
349
324
I don’t really want to ask about AV on Doom9 or somewhere else, so I’ll try to ask here.

What is this video (ENFD-5161)? It seems that this is not interlace and not telecine. DVD and rip samples:
https://mega.nz/#F!Jc0k2CRQ!NvHto6tWbfcFXcVAE7CWlw
Not such a bad result turned out this way:
QTGMC(Preset='Very Slow', Sharpness=0.8, SourceMatch=3, MatchEnhance=0.75, InputType=2, ProgSADMask=15.0)
But it's still unclear what the video is. Maybe should do differently and better or this video is just corrupted.
 

Casshern2

Senior Member...I think
Mar 22, 2008
7,016
14,453
I don’t really want to ask about AV on Doom9 or somewhere else, so I’ll try to ask here.

What is this video (ENFD-5161)? It seems that this is not interlace and not telecine. DVD and rip samples:
https://mega.nz/#F!Jc0k2CRQ!NvHto6tWbfcFXcVAE7CWlw
Not such a bad result turned out this way:

But it's still unclear what the video is. Maybe should do differently and better or this video is just corrupted.
The dvd.mkv file has MPEG-2, so, I think it was made by something like MakeMKV that can put a DVD main title into an MKV container. But, it does show as 59.94 FPS and not 29.97 interlaced. You did the rip of that file?
 

Porni

Well-Known Member
Feb 29, 2012
349
324
The dvd.mkv file has MPEG-2, so, I think it was made by something like MakeMKV that can put a DVD main title into an MKV container.
I trimmed the videos to make the short and small samples.
But, it does show as 59.94 FPS and not 29.97 interlaced.
Technically, this is an interlaced video, but it looks different, these data mean little, anything can be hidden behind it.
You did the rip of that file?
I've already done the full dvdrip.
 

Casshern2

Senior Member...I think
Mar 22, 2008
7,016
14,453
I trimmed the videos to make the short and small samples.

Technically, this is an interlaced video, but it looks different, these data mean little, anything can be hidden behind it.

I've already done the full dvdrip.
Here is what I see in MediaInfo after extracting the MPG
Video
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings, BVOP : Yes
Format settings, Matrix : Default
Duration : 1mn 54s
Bit rate mode : Variable
Bit rate : 6 722 Kbps
Nominal bit rate : 9 800 Kbps
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 16:9
Frame rate : 29.970 fps
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.649
Stream size : 92.1 MiB (96%)

I once asked someone on the board to buy a physical DVD in Japan I wanted. He straight ripped the DVD ISO for me. It wasn't interlaced-looking at all. I wonder if it was the same as you have here.