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 > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th August 2016, 09:47   #1  |  Link
Vilx-
Registered User
 
Join Date: May 2011
Posts: 27
Which is better - upscaling, downscaling or no scaling?

I'm slowly in the process of moving my DVD collection to my hard drive, re-encoding them with x264 in the process to save space (tools used - DVDDecrypter and MeGUI; target container - MKV). I have no problems, but recently something struck me as perhaps being wrong.

As part of the process I also resample the movies to have a 1:1 pixel aspect ratio. Because... well, it kinda seems right. Everything uses square pixels these days, after all. To do that, I use the default setting of MeGUI, which downscales the picture. However I recently tried to compare the resampled picture with the original, and found that there was a noticeable increase of bluriness - which makes sense, of course.

So, to combat that I did the math myself and tried upscaling instead, which produced a picture much closer to the original (I wasn't able to tell the difference). Pretty good, although, of course, upscaling (theoretically) adds its own bluriness in the direction of the stretch. And it takes up more space. And MeGUI for some reason doesn't allow to set these numbers in the GUI, I have to edit the AviSynth script by hand. I presume there must be some good reason for this...

And then there's the third option, which I haven't tried yet - don't resample anything, but just set the appropriate flags on the container, so that the player does all the resampling at the time of playback. It'll have to upscale the picture anyway, after all, since all display devices these days have a higher resolution than a DVD, so I skip an extra resampling. I assume this can be done, but as I said - I haven't tried it yet, so maybe I'm wrong. Plus, I suspect that there might be compatibility issues with players, and that it might not be possible to specify the exact target aspect ratio (after all, even for a 4:3 PAL DVD, the 4:3 applies to the center 704 pixels, not the entire 720 pixels).

So... I'm confused - which approach should I use and why?

Last edited by Vilx-; 14th August 2016 at 14:24.
Vilx- is offline   Reply With Quote
Old 14th August 2016, 15:50   #2  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 679
Simple solution, no damage: your 3rd option (no rescaling), proper flagging.
Let the playback device do the upscaling, this has improved greatly in the last years.

If you got time to take care of everything:
For the majority of DVDs which may have interlaced 25i/29,97i content
I suggest (Q)TGMC, (this bobs up to 50p or 59,94p), then doing all the necessary corrections and rescale to 1280x720.
If encoded to MPEG-4AVC, you may obtain a Blu-ray compatible result which can be muxed any day later.
Most versatile in my opinion.
__________________
Die toten Augen von Friedrichshain: "Data reduction ? Yep, Sir. We're working on that issue. Synce invntoin uf lingöage..."
"To bypass shortcuts and find suffering"...no, it was somehow different...
Emulgator is offline   Reply With Quote
Old 15th August 2016, 10:32   #3  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,591
There are people with a lot of unused time, apparently
Very few DVDs used square pixels, nevertheless this was contrary to the DVD specs.
Reencoding for square pixels devices is tricky, as their inherent player MUST KNOW they're dealing with native square pixels or they will "correct" the DAR/PAR again. I believe MP4 as a container mainly uses square pixels, but not MKV.

My point is: any DVD may be losslessly converted to the BD format; the storage space is so cheap today that any reencoding would cost more; the players or at least some of them are smart enough to cope with all standard materials if a minimum of precautions have been made.

I personally met one guy that did more conversions than he actually watched that movie: each time a new format appeared he found an excuse to convert it to this new format.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 15th August 2016, 12:25   #4  |  Link
Vilx-
Registered User
 
Join Date: May 2011
Posts: 27
The reason why I'm reencoding them is not because I want to play it on a BD player. I don't have one anyway. The reason is that I do all my movie watching on my PC, so having those movies on a HDD allows me to access them more easily as well as back them up. Plus, it doesn't really take up that much time. Yes, the encoding of a single movie can take around 10 hours, but I can put it in background or even when I'm not using the PC myself.

No, I don't intend to re-encode it a bazillion times in different formats. Once is enough to store it on my HDD. But it is worth it, because x264 can reduce it to 25% or less of the original size without any noticeable loss of quality. Hard drives fill up fast enough anyway, and I don't have much money in my budget to keep buying new ones.

So, that's about my motivation.
Vilx- is offline   Reply With Quote
Old 19th August 2016, 22:13   #5  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 3,793
Vilx,
If you open MeGUI's script creator and click on the Avisynth Profile Config button, you'll find an option inside to enable upscaling (or "upsizing", I think it's called).
Personally I think the option shouldn't be buried in there, and because it is I think it's a bit mental it's disabled by default, and I in a perfect world MeGUI would distinguish between resizing anamorphic video to square pixels by resizing "up" (which I don't consider to be upscaling) and "upscaling".

Theoretically:
No resizing and anamorphic encoding is the best method, quality-wise.
Next best is to resize the width to the correct aspect ratio without adjusting the height (crop, but don't resize). ie 1024x576 or 854x480 without cropping for 16:9 DVDs.

Personally I don't think there's much point up-scaling any further for encoding.

Using a sharp resizer such as spline36 to resize "up" to square pixels can actually have a sharpening effect, which generally I don't mind. A 1024x576 encode running fullscreen on my TV looks a tad sharper than an anamorphic encode and even the original DVD.

Which method you use might depend on your player. One of the TVs here has a media player that expects square pixels so I re-encode everything while resizing to square pixels (it doesn't display anamorphic encodes correctly).

It should be possible to set the exact PAR. Enable anamorphic encoding and crop if you wish to, and MeGUI will take care of the display aspect ratio. Choose the appropriate ITU Input Aspect Ratio in the script creator for 4:3 DVDs and as a rule just use 16:9 for 16:9 DVDs (not ITU).
If a player supports anamorphic video it should always display anamorphic encodes correctly.

For interlaced DVDs you may want to look at QTGMC. It'll de-interlace better than MeGUI's de-interlacing methods although it's quite slow and a pain to get working, but once you've used it there's no going back.

Quote:
Originally Posted by Ghitulescu View Post
There are people with a lot of unused time, apparently
Does posting in a forum dedicated to DVD conversion advising people not to convert DVDs qualify as having a lot of time?

Quote:
Originally Posted by Ghitulescu View Post
Reencoding for square pixels devices is tricky, as their inherent player MUST KNOW they're dealing with native square pixels or they will "correct" the DAR/PAR again. I believe MP4 as a container mainly uses square pixels, but not MKV.
I'd like to see an example of that.
MP4 and MKV both support anamorphic video, and a player that supports anamorphic video will display MP4s and MKVs correctly regardless of the pixel aspect ratio. Why a pixel aspect ratio of 1:1 would be an exception, I don't know. Can you elaborate?

Quote:
Originally Posted by Ghitulescu View Post
I personally met one guy that did more conversions than he actually watched that movie: each time a new format appeared he found an excuse to convert it to this new format.
I personally know a guy who spends more time working on his car than he does driving it.
Your friend must have been converting for a very long time. I've mostly used Xvid and x264, with maybe a bit of re-encoding in DVD format back in the very early days. What formats did your friend use?

I'm guilty of converting some things several times. Not so much because of a new format, but because I've discovered better filtering or changed my mind about how I want to do it.
hello_hello is offline   Reply With Quote
Old 20th August 2016, 20:08   #6  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,591
Quote:
Originally Posted by Vilx- View Post
So... I'm confused - which approach should I use and why?
Quote:
Originally Posted by Vilx- View Post
The reason why I'm reencoding them... is that I do all my movie watching on my PC, so having those movies on a HDD allows me to access them more easily as well as back them up.
I am a bit confused now.

By resampling and upscaling you mean probably the conversion to square pixels.

If you intend to use the computer, you may use whatever PAR you want, the software player should be smart enough to display the movie as intended.

However, square pixels are becoming more and more common and also the future. Normally, one should only up/downscale only when he intends to play a movie on a certain display - eg on a smartphone with a lower resolution that has no CPU/GPU power to do this in real time.

Otherwise, upscaling a DVD even to the next resolution, 720p, is rather pointless, unless one needs to use vintage footage into newer formats. Pointless, because the scalers inside DVD/BDplayers and TV sets are better in real time than software scalers at 1:10.

If you want to "correct" the PAR to 1:1 keep the scanlines (maybe even crop the mattes to MOD8) and stretch the horizontal line to 768 or 1024 (also crop the blankings if needed, also MOD8).
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 21st August 2016, 09:23   #7  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 3,793
Quote:
Originally Posted by Ghitulescu View Post
If you want to "correct" the PAR to 1:1 keep the scanlines (maybe even crop the mattes to MOD8) and stretch the horizontal line to 768 or 1024 (also crop the blankings if needed, also MOD8).
Mod8 isn't necessary any more. For h264, mod4 is perfectly fine. To be absolutely safe I stick to mod4 (there's possible mod2 issues when decoding with a DirectShow codec), but I've never had a hardware player refuse to play mod2 h264 video (or decode it incorrectly).

iTunes video tends to be encoded for the lowest common denominator, which includes ancient Apple TV devices. As a result, for 720p they use Level 3.1 with 2 Ref frames and no CABAC, but lots of iTunes video is mod4, so obviously Apple don't see it as a problem.

The mod value seems to have very little effect on compressibility, and when I tested it a while ago, I discovered encoding the black bars had a tendency to decrease the bitrate slightly for a given CRF value rather than increase it (assuming they were perfectly black). I'm not sure why. They might effect the amount of motion the encoder sees a little.

A big part of my motivation for cropping black bars came from the first time I played a 4:3 DVD containing a widescreen picture on a 16:9 TV. Hard-coded black bars top and bottom, pillarboxing either side and a small widescreen picture in the middle. It'd be wonderful to own a widescreen TV in the future and have the same problem due to the widescreen video having being encoded on a 16:9 frame. Plus portable devices have displays of different aspect ratios. These days, it seems more logical to encode only the picture and let the player add back the black bars according to the aspect ratio of the display.

Last edited by hello_hello; 21st August 2016 at 09:26.
hello_hello is offline   Reply With Quote
Old 21st August 2016, 20:31   #8  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,591
That's true, yet cropping the mattes would almost always (I use almost as a safe harbour) yield MOD8 sizes.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 22nd August 2016, 02:30   #9  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 3,793
I guess we must be re-encoding different DVDs, although I was under the impression you don't re-encode them yourself.
hello_hello is offline   Reply With Quote
Old 23rd August 2016, 07:26   #10  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,591
I do not reencode the DVDs, I simply crop the stills
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 24th August 2016, 09:09   #11  |  Link
Vilx-
Registered User
 
Join Date: May 2011
Posts: 27
Quote:
Originally Posted by Ghitulescu View Post
However, square pixels are becoming more and more common and also the future. Normally, one should only up/downscale only when he intends to play a movie on a certain display - eg on a smartphone with a lower resolution that has no CPU/GPU power to do this in real time.

Otherwise, upscaling a DVD even to the next resolution, 720p, is rather pointless, unless one needs to use vintage footage into newer formats. Pointless, because the scalers inside DVD/BDplayers and TV sets are better in real time than software scalers at 1:10.
Well, my idea was to get the picture "as good as possible for viewing on a PC". So I cropped any black bars, resampled to square pixels, and deinterlaced (if necessary, usually not). My reasoning was that the algorithms used by AviSynth would be slower but better than whatever a player could use at runtime. I didn't target any specific resolutions or file sizes. Of course, the player would still need to do some upscaling for display, but I hoped that upscaling from square pixels to square pixels would result in less degradation.

Then again, it could be that I'm totally wrong on all of this.
Vilx- is offline   Reply With Quote
Old 24th August 2016, 10:11   #12  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,591
Then you have to resize the image according to the PAR, keeping the initial scanlines though (576), then crop the margins if needed, preferably at least MOD4 (although most times MOD8 will fit the bill).

The trouble some perfectionists have is that there are several PARs and nobody is sure which one was used and how. Luckily the error is so small that it can be safely ignored.

Whenever I need to insert stills in my projects, I let the player do the correction (usually 768 or 1024) then I crop the needed area.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 24th August 2016, 15:30   #13  |  Link
Vilx-
Registered User
 
Join Date: May 2011
Posts: 27
Well, that's upscaling then. I'm not exactly trying to be a perfectionist (I certainly won't re-rip or re-encode what I've already done), but as long as it doesn't cost me much effort, I kinda try to achieve the best result. At this point though I'm confused about what "best" is and why. :P (Or perhaps I'm overthinking it?)
Vilx- is offline   Reply With Quote
Old 24th August 2016, 16:20   #14  |  Link
bcn_246
Registered User
 
bcn_246's Avatar
 
Join Date: Nov 2005
Location: UK
Posts: 146
Personally I that unless you are willing to run a *very* slow up-scaler (something like MSRmod) then keeping things at source resolution seems most sensible.

However, as mentioned when the source PAR isn't 1:1 for my rips I personally upscale whichever side is needed to bring it to 1:1 using a 'simple' resizer like Lanczos.

Take a typical 720x480 DVD, rather than try and set 16:9 flags that may/may not be read I resize to 848x480 (the closest Mod16 value to 16:9). Many rippers would go the other way and resize to 720x404, however it seems like a waste to throw away that extra resolution.
bcn_246 is offline   Reply With Quote
Old 24th August 2016, 19:19   #15  |  Link
Vilx-
Registered User
 
Join Date: May 2011
Posts: 27
What is MSRmod? I'm not saying I'll use it (Lanczos seems to be working just fine), but I'm curious, since I cannot find anything about it.
Vilx- is offline   Reply With Quote
Old 25th August 2016, 09:36   #16  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,591
Quote:
Originally Posted by Vilx- View Post
Well, that's upscaling then.
It's resize.

Upscaling is when one increases the "resolution" (AKA the scanlines), id est makes a FullHD out of a SDTV. Resizing is eg when one converts from NTSC to PAL or vice-versa.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 28th August 2016, 06:32   #17  |  Link
Vilx-
Registered User
 
Join Date: May 2011
Posts: 27
Well, it does increase the horizontal resolution. But OK - I might have used the term wrongly, or perhaps it's used differently in the TV world.

Anyway - what's MSRmod?
Vilx- is offline   Reply With Quote
Old 1st September 2016, 13:30   #18  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 3,793
It's probably semantics. I don't consider stretching a DVD video to square pixels to be upscaling but MeGUI's "upsizing" option does.
hello_hello is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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:03.


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