Log in

View Full Version : MeGUI - use for analysis...?


Lathe
3rd November 2016, 06:45
Short and sweet... Is MeGUI good to use for analyzing video to determine how it is encoded? (Telecine, Interlace, etc...)

Here is the one I'm working on: http://lathe-of-heaven.com/rmn.mkv

Here is the analysis by MeGUI:

http://lathe-of-heaven.com/megui.gif

So, with that 'PARTIALLY FILM' flagged, I'm guessing this is yet another one of these weird encodes. So, is it right; should I use it to decide or at least as a guide as to what script to use to process it?

It LOOKS like it is saying that it needs TIVTC interlacing. Of course I can look that up and see how it applies. But, if it is 'Partially Film', then is just straight deinterlacing going to be correct?

MediaInfo also says that it is interlaced and BFF. But, it also says that about DVDs that just need straight IVTC, so....?

Here is the script that it is suggesting:

LoadPlugin("D:\EXECUTABLES\MeGUI_2624_x86\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("C:\x\Remember My Name\00000.mkv")
LoadPlugin("D:\EXECUTABLES\MeGUI_2624_x86\tools\avisynth_plugin\TIVTC.dll")
tfm(order=0).tdecimate(hybrid=1)
#crop
LanczosResize(656,480) # Lanczos (Sharp)
#denoise


One thing that SEEMS nice, is that all the Avisynth script, plugins, etc. are internal to this program. So, I don't have to spend what is left of my Golden Years frigg'n trying to piece together all these moving parts that are SUPPOSED to work. So, from that standpoint, at least as a starting place and guide, that sure SOUNDS a hell of a lot easier...

Oh, BTW, I have NO bloody idea what LSMASH is, but after I clicked on it, it began processing the video; I have absolutely NO clue as to what it is doing... I don't understand the Resize either. Why is it even necessary to resize it? When I processed the file and had to render them to BDMV folders, I did have to add borders and/or resize it (to 720) The parameters don't seem to make sense. It says 'crop', but I don't see any cropping in the script.

Anyway, I can look up all the MeGUI stuff and figure it out, but I just wanted to know if the interface should be used as an analysis guide primarly as to what kind of encode it is...

I WILL say that I clicked on the 'Preview' button and I don't know if it is showing me what it will look like after applying that script, but it looks pretty dang good! A LOT better than the other files that I was messing around with and this one looked REALLY soft to start with. Is that how it will turn out then? WOW! I'm stepping through frame by frame and EVERY one looks really sharp and great. That is NOT how the frames look on the raw footage though, I'll tell you.

hello_hello
4th November 2016, 20:22
So, with that 'PARTIALLY FILM' flagged, I'm guessing this is yet another one of these weird encodes. So, is it right; should I use it to decide or at least as a guide as to what script to use to process it?

It LOOKS like it is saying that it needs TIVTC interlacing. Of course I can look that up and see how it applies. But, if it is 'Partially Film', then is just straight deinterlacing going to be correct?

MediaInfo also says that it is interlaced and BFF. But, it also says that about DVDs that just need straight IVTC, so....?

Here is the script that it is suggesting:

LoadPlugin("D:\EXECUTABLES\MeGUI_2624_x86\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("C:\x\Remember My Name\00000.mkv")
LoadPlugin("D:\EXECUTABLES\MeGUI_2624_x86\tools\avisynth_plugin\TIVTC.dll")
tfm(order=0).tdecimate(hybrid=1)
#crop
LanczosResize(656,480) # Lanczos (Sharp)
#denoise

This is the line doing the actual work:
tfm(order=0).tdecimate(hybrid=1)

If you have a look in the "MeGUI\tools\avisynth_plugin" folder you'll find a bunch of TIVTC help files (text files) explaining how TIVTC works. For "partially film" MeGUI uses hybrid=1 which means TIVTC inverse telecines the telecined parts for a 23.976fps progressive output while the 29.970fps parts are de-interlaced and converted to 23.976 progressive by reducing the number of frames and using frame blending. The "Hybrid, Mostly Film" option does the same thing.
For "Hybrid, mostly Interlaced" the frame rate conversion happens the other way around (hybrid=3) and the output is 29.970fps progressive.

Neither method is perfect for hybrid sources but as a rule for Avisynth you need to output a constant frame rate. There's way to use the TIVTC plugin to output a variable frame rate encode (there'll be 23.976fps parts and 29.970fps parts) but few GUIs can output variable frame rates automatically and some people claim variable frame rate is the work of satan (I have a small amount of it and don't have playback problems but it's not idea for editing). Handbrake or Vidcoder can output VFR and are pretty good at it for an automatic process but they're not Avisynth based.

Often hybrid sources are mostly one type or another so any frame rate conversion doesn't matter much, but there are sources with a fair mix of each.

Oh, BTW, I have NO bloody idea what LSMASH is, but after I clicked on it, it began processing the video; I have absolutely NO clue as to what it is doing... I don't understand the Resize either. Why is it even necessary to resize it? When I processed the file and had to render them to BDMV folders, I did have to add borders and/or resize it (to 720) The parameters don't seem to make sense. It says 'crop', but I don't see any cropping in the script.

LSmash is one of the file indexers. When you open a source with MeGUI's File Indexer it'll index it before opening the script creator and it's usually best to go with the indexer automatically selected by MeGUI. The indexing can take a few minutes, depending on the file size.
If you encode anamorphic sources (ie DVDs with non-square pixels) you need to either enable anamorphic encoding under the I/O tab (sets an aspect ratio flag and encodes with non-square pixels) or enable resizing (which resizes to square pixels). If you do neither, the video won't display correctly. There's an anamorphic option that also lets you resize, but I'm ignoring it for the moment.

To take a DVD and make it Bluray compliant while doing nothing but re-encoding, enable anamorphic encoding, make sure the anamorphic option selected isn't the one which resizes, make sure cropping is disabled (all under the I/O tab), optionally de-interlace, and select "Bluray as the target playback device in the x264 encoder configuration. Or if the source is telecined or interlaced you can encode it that way and not enable de-interlacing at all. The rules for standard definition Bluray compliance are here (MeGUI sets the options required for HD streams) but I've never encoded for Bluray compliance myself so I can't offer advice there. MeGUI should take care of setting the correct SAR "behind the scenes" if anamorphic encoding is enabled (ie --SAR 40:33)
http://www.x264bluray.com/home/480i-ntsc
Upscaling to 720p is something you can do with MeGUI if you prefer. In the script creator click "Config" next to the Aviisynth Profile under the I/O tab. There's an option in there to enable "upsizing" which lets MeGUI's resizing upscale. It's mental that it's disabled by default but it is.

Anyway, I can look up all the MeGUI stuff and figure it out, but I just wanted to know if the interface should be used as an analysis guide primarly as to what kind of encode it is...

Use it as a guide but if in doubt post a sample here. GUIs can generally only detect the common types of sources (progressive, interlaced, hybrid) but there's lots of evil stuff out there such as field blended sources or sources with fields out of phase or with less typical pulldown that can often be fixed, but mightn't necessarily be detected correctly.

I WILL say that I clicked on the 'Preview' button and I don't know if it is showing me what it will look like after applying that script, but it looks pretty dang good! A LOT better than the other files that I was messing around with and this one looked REALLY soft to start with. Is that how it will turn out then? WOW! I'm stepping through frame by frame and EVERY one looks really sharp and great. That is NOT how the frames look on the raw footage though, I'll tell you.

It could be your playback device isn't getting it right and de-interlacing parts where IVTC should be applied.... that sort of thing..... so maybe that's why it looks sharper after TIVTC is applied. For anamorphic sources the display aspect ratio in the preview will be wrong (it assumes the pixels are square) but if you enable anamorphic encoding, the encoded video should display with the correct aspect ratio.

In case you're not fully aware of the difference.
Interlacing: https://en.wikipedia.org/wiki/Interlaced_video
Telecine or pulldown: https://en.wikipedia.org/wiki/Three-two_pull_down
They're not the same thing which is why pulldown/telecine removal and de-interlacing result in different frame rates, although most GUIs include the IVTC options in their de-interlacing section.