PDA

View Full Version : (non)sense of width upscaling


Ma Laoshi
17th February 2008, 12:02
Since I'm new here: first of all thanks to everyone involved for
making AutoGK such a nice package. Have used it successfully
for a good number of DVDs, but only recently I got to
understand (I think) anamorphic encoding, to which my question
is related. Say we have an NTSC DVD containing a 16:9 film, so
there is no need to crop (although that is not essential to the
argument). I like to encode favoring quality over size or speed,
so I usually select auto size, and sufficient target filesize to keep
720 width. But then the resulting avi will have 400 lines, not the
original 480. Quite a loss of resolution, especially painful if you're
viewing on a big monitor.

A way out is to select 848 maximum width, and encode to a
848 x 480 avi; the number of pixels has been increased by 17%
over the original without any real gain in information, but at
least you haven't lost resolution either. Does this even make
sense? At best it's a hack until AutoGK could generate mkv
output, where you could encode without rescaling and flag the
16:9 aspect ratio. Not to mention it'd handle soft subs more
elegantly, and have smaller overhead -- and accomodate x264
video if that'd ever be implemented.

Grateful for any insightful comments.

Southstorm
17th February 2008, 14:23
You can leave the resolution as is, and select the appropriate Aspect Ratio. This way, no matter what type of display you're using, it will be displayed properly.
I only crop to eliminate black bars, if neccessary.

Ma Laoshi
19th February 2008, 06:32
Thanks for the quick reply. So for full control over the output
resolution, you choose manual cropping under the hidden options?
Curious to try if all this also works in AutoGK for source material
with black bars. May get to it in the weekend or so.

Southstorm
19th February 2008, 17:08
I'm sure it will. Do a forum search using "dar" "sar" and "autogk". You should be able to find some info.
Check this thread:
http://forum.doom9.org/showthread.php?t=81410&highlight=sar

Myself, since I have my computer connected to my TV, I leave the source resolution as is, and just make sure the encoder knows the ratio.

The moment you start changing the resolution, and/or resizing, the quality has a potential to degrade.

Ma Laoshi
5th March 2008, 16:21
From what you say, your goal seems to be the same as mine,
but now I've tried it for a 2nd time and it does not work. Did you
do this yourself, and/or am I missing something?

On to details: my source is a 720x576 16:9 PAL VOB file, with
minimal black bars in the original. For simplicity I set a fixed
output width of 720, and turn off cropping completely by setting
the autocrop threshold to zero. [Here one hits the first
annoyance, since AutoGK tries to put the .autocrop and .aspect
files into the source directory which could well be read-only and
where IMHO they don't belong anyway. If you create an
agk_tmp folder then better use it!] If I choose to override the
input AR to "original" then the output is 720x544 which doesn't
even seem correct to begin with; selecting "4:3" gives the exact
same file. If I select "16:9" then I get a 720x416 avi, the same
as without an AR override. But each of these files plays back
with a PAR of 1, i.e., the "original" one (which is slightly rescaled
even though it shouldn't have been) is hugely stretched
vertically unless you manually override this in the player.

So unless you could clarify to me what I'm missing, I don't
believe that AutoGK can currently perform an anamorphic
encoding as found on the source DVD.

Southstorm
5th March 2008, 18:03
AutoGK has a spot to add parameters to the x264 commandline. I've used it a few times, but mostly I use StaxRip. Output resolution will be the same as original, but then I add the appropriate Aspect Ratio to the x264 commandline. For instance, for a 16:9 video, I add --SAR 37:22. Also, you can do a 1:1 aspect ratio, and specify the correct aspect ratio (16:9, 4:3) in the mux, ie MP4Box etc...

budwzr
6th March 2008, 02:40
720X576 is close to 4:3 so there's no way to make it 16:9 without cropping.

Southstorm
6th March 2008, 03:52
@budwzr
If your saying that at a 1:1 ratio 720x576 is close to 4:3 then you are correct. But that doesn't matter. To explain...All DVD's, PAL or NTSC com in resolutions of either 720x576, or 720x480. So how do they get a 16:9 aspect ratio out of them? By defining the "Pixel" aspect ratio. This is what the "--SAR" parameter in the x264 commandline accomplishes. In theory, you could use whatever resolution you want, and still get a 4:3, 16:9, 1.85, 2.35, etc... aspect ratio by using this parameter.

Ma Laoshi
6th March 2008, 04:41
AutoGK has a spot to add parameters to the x264 commandline.

Are we even talking about the same program here? I discussed
Auto Gordian Knot (2.48 beta), as downloaded from
www.autogk.me.uk . There is neither x264 encoding nor
command line options.

I don't dispute it can be done in principle, I did it myself when
experimenting with AutoMKV 0.93a over Christmas. But frankly it
was a bit glitchy and gave me blocky output so I didn't feel it
was time to abandon AutoGK + XviD just yet. So my question
was specific for the latter combination.

Southstorm
6th March 2008, 13:54
You are correct, my mistake, sorry for the confusion...let me get back to you on that.

Southstorm
6th March 2008, 14:19
Looking at the "Hidden Options" accessable by CTRL-F9 in AutoGK, you can control the cropping, and you can force a 4:3 or 16:9 aspect ratio. If you leave the original resolution, this should do what you want.

budwzr
7th March 2008, 02:09
From what I understand, AGK decides the resolution based on the results of the compressibility test. The goal being to eliminate or reduce black bars on a tv.

budwzr
7th March 2008, 02:15
Ma, it sounds to me like your "original" file is already a bootleg. Why else would it have black bars?




On to details: my source is a 720x576 16:9 PAL VOB file, with
minimal black bars in the original.

Southstorm
7th March 2008, 04:15
The reason it has black bars is probably because its got a 2.35:1 anamorphic aspect ratio. The DVD spec only allows for 4:3, or 16:9. So for these extra wide movies (like the recent King Kong) you still have black bars, even if you display it on a widescreen TV.

Ma Laoshi
11th March 2008, 16:56
Looking at the "Hidden Options" accessable by CTRL-F9 in AutoGK, you can control the cropping, and you can force a 4:3 or 16:9 aspect ratio. If you leave the original resolution, this should do what you want.
In the experiments described in my posting of 5 March I did
exactly that. Turns out that these options rescale the number
of pixels, *even if there is no cropping*. The resulting .avi
always has square pixels, unless it's grossly mis-displayed by
the K-Lite package which I doubt. Try it.

In answer to budwzr, with Southstorm I think that black bars
are very common in DVDs regardless of provenance. Any source
material wider than 16:9 (i.e., not just super-widescreen 2.35
but also 1.85 etc) has them.

Southstorm
11th March 2008, 19:00
You are exactly right Ma Laoshi. Upon further searching I discovered that your real problem lies in the AVI container itself. It only allows for 1:1 square pixels, hence the resizing in AutoGK. I have been using MP4 and MKV containers for so long now that I didn't realize the AVI limitations. My apologies. But if possible, I would recommend switching containers, (though this may mean not using AutoGK) as it's much more efficient for encoding these days.

budwzr
11th March 2008, 19:36
Yes, except on a computer which can display any PAR without black bars. You were saying the original file had minimal black bars already.

I see now that what you really meant was that it had minimal black bars when viewed on your tv.



In answer to budwzr, with Southstorm I think that black bars
are very common in DVDs regardless of provenance. Any source
material wider than 16:9 (i.e., not just super-widescreen 2.35
but also 1.85 etc) has them.

Southstorm
11th March 2008, 20:02
my source is a 720x576 16:9 PAL VOB file, with minimal black bars in the original.


@budwzr

The VOB file ripped from the DVD had black bars already. Even on a computer you would see this.