View Full Version : Resizing assistance
Mr. Monte
26th March 2010, 03:17
I've been using X264 with different GUI's for a while and have noticed a few that have resizing options (IE...resize SD material to 1280-720 (HD ready) or 1920x1080 (HD). I have a few questions if I may ask and someone is so kind to reply:
I assume the resizing uses a avisynth script to perform. Are there any benifits to resizing a 720x480 SD DVD material to say 720p or 1080p versus's just zooming in/full screen on your player?
Do you still loose as muchdefinition (IE like taking a small resolution picture and trying to blow it up)
When I use a bitrate calculator or some of the SW has bitrate calcs build in. If the source is say 720x480 and I am compressing with x264 with a 2-pass option and select say fit to 4480 MB size. It shows me X Bitrate (X being lets say 6000 kbps). If I then click the drop-down and select resize to HD-Ready (1280-720), should'nt the bitrate in the calculator drop by about 30%??. Resizing to a larger size should use more bits correct?
Thanks in advance :thanks:
linyx
26th March 2010, 03:44
1) No
2) Lose as much definition? Don't really follow that one; but from what I think you are asking (Do you gain resolution from resizing upwards), No.
3) Resizing up to higher resolution should use more bits, but it is pointless. Also, the bitrate calculator is not taking resolution into account, probably only duration and target size.
manono
26th March 2010, 10:31
3. Since bitrate is a function only of the video duration and the filesize wanted, resolution doesn't play into it at all. The bitrate's the same, no matter the resolution, if the video length and the desired filesize remain constant. However, if you increase the resolution, it's also a good idea to increase the bitrate (and the resulting file size).
Mr. Monte
28th March 2010, 01:13
3. Since bitrate is a function only of the video duration and the filesize wanted, resolution doesn't play into it at all. The bitrate's the same, no matter the resolution, if the video length and the desired filesize remain constant. However, if you increase the resolution, it's also a good idea to increase the bitrate (and the resulting file size).
manono,
Exactly..I think I did not give enough info. Here were my thoughts (which is why I wanted other professional opinions).
I used RipBot to encode a SD MPEG 2 DVD to X264. My profile is --preset slower --deblock -2,-2 --merange 32 --no-fast-pskip. I also use CRF 20. So, I encoded the same movie with the same above settings twice. One with Do not resize, one with resize to HD-Ready (720p). Of course the resized ending filesize was larger. using MediaInfo AFTER the encode, you can see the bitrate was larger on the resized 720p, then the non-resized.
My thoughts, as I am a programmer also, is that usually a SW developer will not take the time to implement options if there is no benefit/need. I also see video cards and DVD players with up-conversion to enhance SD contnent to "near" HD picture quality.
So, these things being said. I would assume that letting programs like BD-Rebuilder & RipBot, whose GUI's have the SD-->HD option/switches resize SD to HD..would add a visual benifit vs leaving it in a SD (720x480) format.
Also, I was wondering if a bitrate calculator could implememnt some sort of algorithm to hypothesize the expected increase in bitrate when you resize. IE, instead of using CRF, you choose 2-pass lock final size to 4480. RipBot says based on the audio bitrate and video length, at this final size, your bitrate will be XXXX. If I select the resize to 720p, the expected bitrate, if I keep it locked to a final size of 4480, should go down. So the GUI could adjust the number accordingly.
Thanks,
manono
28th March 2010, 05:37
If I know my bitrate for 720x480, then to get the equivalent bitrate for 1280x720, I think I'd multiply the original bitrate by the the pixel increase factor.
720x480=345,600 pixels
1280x720=921,600 pixels
921600/345600=2.67
Therefore multiply the original video bitrate by 2.67 to achieve a similar quality for the 720p version. This is way simplified and there are probably other factors that come into play here so others may have better ideas. Are the input and output video formats the same? For example, if the source is an MPEG-2 DVD and the output is to be a 720p x264, that ratio won't apply at all. Also, doing a few comparison 1-pass quality based encodes (which you've apparently done already) should give you some ideas of how much to multiply the original bitrate.
I would assume that letting programs like BD-Rebuilder & RipBot, whose GUI's have the SD-->HD option/switches resize SD to HD..would add a visual benifit vs leaving it in a SD (720x480) format.
I'm not sure I'd make that assumption.
GodofaGap
28th March 2010, 08:30
A benefit from resizing before encoding and not with playback, is that codec artifacts are not blown up as well.
Also, I was wondering if a bitrate calculator could implememnt some sort of algorithm to hypothesize the expected increase in bitrate when you resize. IE, instead of using CRF, you choose 2-pass lock final size to 4480. RipBot says based on the audio bitrate and video length, at this final size, your bitrate will be XXXX. If I select the resize to 720p, the expected bitrate, if I keep it locked to a final size of 4480, should go down. So the GUI could adjust the number accordingly.
If you keep the final size the same the bitrate does not change. You understand what bitrate stands for?
Mr. Monte
28th March 2010, 13:38
A benefit from resizing before encoding and not with playback, is that codec artifacts are not blown up as well.
Hmm..interesting..I did not think of that. Thanks. Is that the only reason that you can think of?
If you keep the final size the same the bitrate does not change. You understand what bitrate stands for?
GodofGap, yes..sorry..I meant to say the video quality would go down, since you have the same available bits to be used for the larger resolution.
:thanks:
wonkey_monkey
28th March 2010, 13:41
A benefit from resizing before encoding and not with playback, is that codec artifacts are not blown up as well.
But artifacts will be less anyway if you dedicate the extra bitrate you would have assigned for an HD image to an SD image instead, won't they?
David
Mr. Monte
28th March 2010, 15:54
Not sure...encoding DVD SD images, once I go over a certain bitrate, the image (to the eye) does not appear to get any better. My thought is that unless you get very good at writing Avisynth scripts or using pre-made filters...you will get artifacts. If I am correct, I would think then what GodofaGap stated would still hold true.
TinTime
28th March 2010, 15:55
I've had some good results (usually) using nnedi2 to do a horizontal resize for PAL 16x9 material. The horizontal stretch to get to 1:1 SAR is quite big in this case. I don't bother with PAL 4x3 or NTSC material though.
So crop to 704x576 -> nnedi resize to 1408x576 -> resize down to 1024x576
This can't be done on the fly during playback. At least not on my PC :)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.