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.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 Encoder GUIs
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th January 2023, 00:31   #1  |  Link
Tschizzey
Registered User
 
Join Date: Nov 2022
Posts: 14
Resizing a 1080p video to 720p

Hello!

I would like to downscale a video to 720p using MeGUI One-Click encoder.
Obviously I'm doing something wrong, because I'm getting error messages.

Here are my settings:








What should I change?
What avisynth command should I use?
Tschizzey is offline   Reply With Quote
Old 19th January 2023, 11:43   #2  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Compress (zip or 7z) and attach the log (...\MeGUI\logs\*.log) file, we must know your install settings, the errors and file properties.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 19th January 2023, 21:19   #3  |  Link
Tschizzey
Registered User
 
Join Date: Nov 2022
Posts: 14
Ok, I'll post them during the weekend, thanks.
Tschizzey is offline   Reply With Quote
Old 22nd January 2023, 20:19   #4  |  Link
Tschizzey
Registered User
 
Join Date: Nov 2022
Posts: 14
Well I didn't change a single thing but it worked now. I don't know what was the problem.

Here is the log.

Are these settings OK? Is there any nonsense?

logfile-23-01-22_19-47-01.7z
Tschizzey is offline   Reply With Quote
Old 24th January 2023, 02:21   #5  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
All seems fine now.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 24th January 2023, 12:44   #6  |  Link
Tschizzey
Registered User
 
Join Date: Nov 2022
Posts: 14
Thanks!
Tschizzey is offline   Reply With Quote
Old 25th January 2023, 11:04   #7  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 556
Isn't it better to use z.lib resizer?

EDIT: Saiclabs wrote:
Quote:
There is no reason to use the internal resizers instead of z_xxxResizers because:
- z_ works in 16-bit depth when input and output is 8-bit. Internal resizers work in 8-bit when input is 8-bit;
- z_ doesn't introduce any chroma shift like the internal resizers.

There is no reason to use the internal color conversions because they work in the input bit depth. If source is 8-bit yuv->rgb is done in 8-bit. On the other side z_ is doing any color conversion from any bit depth in float.

Last edited by Forteen88; 4th February 2023 at 12:11.
Forteen88 is offline   Reply With Quote
Old 25th January 2023, 19:48   #8  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
The screenshot of Tschizzey's Avisynth template bothers me because by default it looks like this:

<input>
<deinterlace>
<crop>
<resize>
<denoise>

You can change the order, remove lines or add other stuff, but as the resizing has been manually added and <resize> is still present...
The Avisynth script from the log file.

Code:
---[NoImage] LoadPlugin("G:\Programs\MeGUI\tools\dgindexnv\DGDecodeNV.dll")
---[NoImage] DGSource("C:\Users\Bernkastel\Downloads\3ckeukdb.pcc\test.dgi")
---[NoImage] ConvertBits(8)
---[NoImage] #crop
---[NoImage] Spline64Resize(1280,720) # Spline64 (Sharp)
---[NoImage] AssumeFPS("ntsc_film")
---[NoImage] Spline64Resize(1280,720)
Based on the GUI settings in the third screenshot it's not going to do any harm as long as the source is 16:9, but if it's not....

Quote:
Originally Posted by Forteen88 View Post
Isn't it better to use z.lib resizer?
Probably, but MeGUI only supports Avisynth's native resizers, however...

For anyone who does want to use AVSResize with MeGUI they can import the script below or put it in the Avisynth plugins folder for auto-loading. It has to be in the plugins folder of an installed version of Avisynth and not MeGUI's portable version for auto-loading, but MeGUI can still use the portable version.

Functions for resizing with AVSResize:
z_MeGUI.avsi
And while I'm at it, functions for resizing with the HBD version of Resize8:
R8MeGUI.avsi

For AVSResize, create an Avisynth template for MeGUI like the one below, replacing the <resize> line.

Quote:
<input>
<deinterlace>
<crop>
Eval("z_ConvertFormat("+z_MeGUI(Last,"<resize>")+",resample_filter="+"""KernelMeGUI("<resize>")"""+")")
<denoise>
It'll look like this in the script creator when MeGUI isn't resizing.

Quote:
Eval("z_ConvertFormat("+z_MeGUI(Last,"#resize")+",resample_filter="+"""KernelMeGUI("#resize")"""+")")
It's gets even sillier when resizing is enabled, but it will use the resizing kernel specified in MeGUI's Avisynth Configuration or in the Script Creator's GUI.

Quote:
Eval("z_ConvertFormat("+z_MeGUI(Last,"Spline64Resize(1280,720) # Spline64 (Sharp)")+",resample_filter="+"""KernelMeGUI("Spline64Resize(1280,720) # Spline64 (Sharp)")"""+")")
As resizers use different names for arguments and MeGUI changes "a" & "b" for BicubicResize, the functions won't work with another resizer. At least not when BicubicResize is selected.

A Resize8 template:

Quote:
Eval("Resize8("+R8MeGUI(Last,"<resize>")+",kernel="+"""ResizerMeGUI("<resize>")"""+")")

Last edited by hello_hello; 25th January 2023 at 19:52.
hello_hello is offline   Reply With Quote
Old 25th January 2023, 21:30   #9  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 556
Quote:
Originally Posted by hello_hello View Post
Functions for resizing with AVSResize...
Thanks.
Forteen88 is offline   Reply With Quote
Old 27th January 2023, 21:30   #10  |  Link
Tschizzey
Registered User
 
Join Date: Nov 2022
Posts: 14
Quote:
Originally Posted by hello_hello View Post
The screenshot of Tschizzey's Avisynth template bothers me because by default it looks like this:

<input>
<deinterlace>
<crop>
<resize>
<denoise>

You can change the order, remove lines or add other stuff, but as the resizing has been manually added and <resize> is still present...
The Avisynth script from the log file.

Code:
---[NoImage] LoadPlugin("G:\Programs\MeGUI\tools\dgindexnv\DGDecodeNV.dll")
---[NoImage] DGSource("C:\Users\Bernkastel\Downloads\3ckeukdb.pcc\test.dgi")
---[NoImage] ConvertBits(8)
---[NoImage] #crop
---[NoImage] Spline64Resize(1280,720) # Spline64 (Sharp)
---[NoImage] AssumeFPS("ntsc_film")
---[NoImage] Spline64Resize(1280,720)
Based on the GUI settings in the third screenshot it's not going to do any harm as long as the source is 16:9, but if it's not....
Should I check this box and then add the "Spline64Resize(1280,720)" line manually? Will it work?

Tschizzey is offline   Reply With Quote
Old 30th January 2023, 11:48   #11  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
Quote:
Originally Posted by Tschizzey View Post
Should I check this box and then add the "Spline64Resize(1280,720)" line manually? Will it work?

Yes, but you shouldn't need to manually add the "Spline64Resize(1280,720)" line to the template, as you can see in your log file that MeGUI is adding it for you.

If the source video is 16:9, manually adding 16:9 resizing works fine, but if you happen to have a source file that's not 16:9, the manually added line will resize it incorrectly.

If this is the template

<input>
<crop>
<resize>

and the source isn't 16:9 (2:1 for example), MeGUI would add the following to the script, whereas your fixed resizing would stretch the height. If the source is 16:9, MeGUI will resize to 1280x720 instead, assuming cropping is disabled.

<input>
<crop>
Spline64Resize(1280,640) # Spline64 (Sharp)

You also have the "Use Nvidia crop and resize if possible" option checked, which would mean your chosen resizer wouldn't be used (I assume) but there's no Nvidia resizing in your script (you'll see Nvidia's resizing added to the script in the log file if it's being used).

FYI, if you do want the output to always be 1280x720, regardless of the source aspect ratio, try manually adding this resizing to the template instead while removing the <resize> line to prevent MeGUI adding it's resizing.

<input>
<crop>
CropResize(1280,720, Resizer="Spline64Resize")

CropResize doesn't stretch the picture if the source and output aspect ratios don't match, as normal resizing would. By default it crops to prevent aspect error if necessary, so for 1280x720 output dimensions, any non 16:9 source will be cropped to 16:9 before being resized to 1280x720. It can crop a lot of picture though, depending on the source dimensions, so alternatively you can add borders instead.

CropResize(1280,720, Resizer="Spline64Resize", Borders=true)

Just a thought if you do need 1280x720 for some reason....

I also noticed you have the "color correct" option checked. It's not likely to cause an issue (it wasn't used according to your log file) as it appears to only support mpeg2 while indexing with DGIndex, but it was originally intended to ensure standard definition DVD encodes have SD colorimetry, so if you have a HD mpeg2 source and don't downscale to SD, the color correction could be applied unnecessarily.

When it's being added to the script by MeGUI is looks something like this:

DGDecode_mpeg2source("D:\video.d2v", info=3)
LoadPlugin("D:\Some Folder\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)

By default, ColorMatrix aims for the rec.601 SD colorimetry, so it's probably a good idea not to enable automatic color correction for HD encodes, just in case.....

Last edited by hello_hello; 30th January 2023 at 18:42.
hello_hello is offline   Reply With Quote
Old 30th January 2023, 16:35   #12  |  Link
Tschizzey
Registered User
 
Join Date: Nov 2022
Posts: 14
Wow, so much helpful information, thank you very much!
Tschizzey is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:27.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.