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 ASP

Reply
 
Thread Tools Search this Thread Display Modes
Old 1st May 2020, 18:50   #1  |  Link
jlw_4049
Registered User
 
Join Date: Sep 2018
Posts: 303
How to properly crop/encode DVD films?

I've been googling and reading for about 6 hours now and I am getting information all sorts of ways.

I'm currently encoding two DVD sources for a friend. I generally only encode BluRay and upon reading about DVD's it's a different process apparently.

Source #1 is 720x576.
Source #2 is 720x480. I understand 1 is PAL and 1 is NTSC.

However, what's unclear to me is the proper method of cropping away the edges. Apparently it changes the picture, unlike cropping away the black pixels on a BluRay.

Ive read different things like cropping the sides and resizing to 480p.

I've also read things like leaving the original resolution/cropping/adding black borders via avisynth.

I've done several tests, but I just want to know the "BEST" way that the OG's in here would recommend. Before I take the plunge and encode many seasons lol.

I don't know if this matters, but it's getting encoded for a Plex server. However, I would like to make this the best for maximum playback compatibility.

I appreciate the help!

jlw_4049 is offline   Reply With Quote
Old 1st May 2020, 19:11   #2  |  Link
stax76
Registered User
 
Join Date: Jun 2002
Posts: 6,502
I think it's one of the favorite topics of hello_hello, maybe here:

https://forum.doom9.org/showthread.php?t=163218
stax76 is offline   Reply With Quote
Old 1st May 2020, 19:16   #3  |  Link
jlw_4049
Registered User
 
Join Date: Sep 2018
Posts: 303
Quote:
Originally Posted by stax76 View Post
I think it's one of the favorite topics of hello_hello, maybe here:

https://forum.doom9.org/showthread.php?t=163218
Thanks as usual Stax!
jlw_4049 is offline   Reply With Quote
Old 5th May 2020, 15:09   #4  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,708
Since both DVD and BD have a fixed frame size, "cropping" away won't result in any standard DVD/BD if we stick to the definition in the dictionary. If you want compatibility you have to stay with 720 (or 704)x480 and 1920x1080.

The best does not exist here and it depends anyway on what you want to do. Cropping away is not only not the best but it is also illegal by the book.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 6th May 2020, 07:41   #5  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,326
Time for a shameless plug.... assuming you're using Avisynth.
https://forum.doom9.org/showthread.php?t=176667

There's usage examples in the second post, but if you're wanting to resize to square pixel dimensions here's a short(ish) explanation. To stretch the width without resizing the height, you'd specify zero for both the width and height, followed by your desired cropping, followed by the DVD's display aspect ratio or sample/pixel aspect ratio, followed by the argument for disabling height resizing. The script will take care of the rest.

CropResize(0,0, 6,20,-8,-22, InDAR=16.0/9.0, ResizeWO=true)

If you're not fussed about having specific output dimensions but you want to resize to a specific width, you can specify the width and any cropping etc, and the script will take care of the height.

CropResize(1024,0, 6,20,-8,-22, InDAR=16.0/9.0)

If you want specific output dimensions you need to remember the script will crop to prevent aspect error, but if you want every encode to have the same dimensions... for example 1024x576, which is 16:9.... the script will apply any specified cropping, then any extra cropping required so the remaining picture is 16:9 (any specified cropping is the minimum cropping), then it'd resize to 1024x576.

CropResize(1024,576, 6,20,-8,-22, InDAR=16.0/9.0)

Normally if your cropping didn't result in the cropped picture having the appropriate aspect ratio, the resizer would stretch or squish it. CropResize crops instead to prevent that. Often it's only necessary to specify a width and/or use ResizeWO mode, but specifying both a width and height makes it easy to ensure a bunch of related encodes have the same dimensions, without having to calculate aspect error for each one and adjust the cropping to minimise it.

Personally, I either resize to square pixel dimensions or I don't resize at all (just crop) and keep the original pixel aspect ratio when encoding. That's generally fine for x264 but it's probably better to resize to square pixel dimensions for Xvid. Keep in mind, stretching the width before encoding will mean there's more video to encode than if you encoded anamorphically, so the resulting file size will be greater for a particular encoding quality.

As for the pixel aspect ratios.... there's an explanation in the help file under the InDAR description, and a link to the table here.
https://forum.doom9.org/showthread.p...27#post1058927
You generally only need to decide between using a generic aspect ratio or an mpeg4 aspect ratio, but instead of using the pixel/sample aspect ratios you can specify the display aspect ratio for CropResize. So for a generic pixel aspect ratio you'd specify InDAR=16.0/9.0 or InDAR=4.0/3.0. For an mpeg4 pixel aspect ratio it's InDAR=20.0/11.0 or InDAR=15.0/11.0. That applies to both PAL and NTSC.

If you resize with the script, you must specify an input DAR or SAR for DVDs, because the shape of the pixels needs to be factored into the resizing calculations. You can also specify an OutDAR or OutSAR rather than resize to "square pixel" dimensions, and the script can add borders if need be, but unless you're encoding for an industry format such as DVD, I'd just crop the black and resize.

PS. Always use InDAR=15.0/11.0 for 4:3 DVDs. If there's not much black down each side of a 16:9 DVD, InDAR=16.0/9.0 is more likely to correct, especially for newer DVDs. For older DVDs or DVDs with a substantial amount of black on the sides, InDAR=20.0/11.0 is a safer bet. The difference isn't huge anyway. Around 2%.

Cropping DVDs works the same as for cropping Bluray. If you only crop, the pixel/sample aspect ratio doesn't change because the pixels are still the same shape, but there's less picture so the display aspect ratio changes. Resizing, at least for the purpose of this discussion, changes the pixel/sample aspect ratio, but it shouldn't change the display aspect ratio. ie

A 16:9 PAL DVD is 720x576 but the player will resize it to 16:9, so it's display dimensions are 1024x576. Therefore if you resize to 1024x576 and encode, the display aspect ratio hasn't changed, but the shape of the pixels did (and there's more of them). Obviously if you resize 1920x1080 to 1280x720 the display aspect ratio remains the same, and because the widths and heights have same proportions, the PAR didn't change either.

Last edited by hello_hello; 6th May 2020 at 18:11.
hello_hello is offline   Reply With Quote
Old 11th May 2020, 20:52   #6  |  Link
orion44
None
 
orion44's Avatar
 
Join Date: Jul 2007
Location: The Background
Posts: 225
When resizing the DVD, what should be the minimum multiple for width and height (32, 16, 8, 4, 2)?

I'm planning to encode with Xvid/Divx. Is it allowed to go as low as 2 or 4?
orion44 is offline   Reply With Quote
Old 12th May 2020, 07:19   #7  |  Link
kalehrl
Registered User
 
Join Date: Feb 2011
Posts: 295
I think some Xvid dvd player have problems with mods below 16.
16 is OK, 32 is overkill.
kalehrl is offline   Reply With Quote
Old 12th May 2020, 11:36   #8  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,326
Quote:
Originally Posted by orion44 View Post
When resizing the DVD, what should be the minimum multiple for width and height (32, 16, 8, 4, 2)?

I'm planning to encode with Xvid/Divx. Is it allowed to go as low as 2 or 4?
32 is mod16.

As kalehrl said, it depends on the player. You'll need to test it. The mod16 thing probably only applies to old DVD players capable of playing AVIs etc. A modern player should be happy with mod4, but if you're using a modern player, why encode with Xvid?
hello_hello is offline   Reply With Quote
Old 12th May 2020, 18:03   #9  |  Link
orion44
None
 
orion44's Avatar
 
Join Date: Jul 2007
Location: The Background
Posts: 225
Quote:
Originally Posted by hello_hello View Post
but if you're using a modern player, why encode with Xvid?
I don't like the look of x264 encoded movies, even with low deblock settings.

To me, DivX/Xvid gives more "warmth" to the video and higher fidelity.

Last edited by orion44; 12th May 2020 at 18:09.
orion44 is offline   Reply With Quote
Old 12th May 2020, 19:07   #10  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,247
Quote:
Originally Posted by orion44 View Post
Xvid gives more "warmth" to the video

Any way to quantify that, or are we doing the feelings thing?

Last edited by videoh; 12th May 2020 at 19:33.
videoh is offline   Reply With Quote
Old 12th May 2020, 20:55   #11  |  Link
orion44
None
 
orion44's Avatar
 
Join Date: Jul 2007
Location: The Background
Posts: 225
Quote:
Originally Posted by videoh View Post

Any way to quantify that, or are we doing the feelings thing?
Can't explain it. DivX/XviD always looked better to me when archiving DVDs.

I only use x264 for youtube uploads, because file sizes are smaller and the quality doesn't matter that much.
orion44 is offline   Reply With Quote
Old 13th May 2020, 11:38   #12  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,952
For DVDs it could well be true, although it would be interesting to see a comparison of XviD and x264 using the same bitrate for the same video. And post the settings as well, easier to see if there's anything to be done.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 23rd May 2020, 08:59   #13  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 762
Quote:
Originally Posted by videoh View Post

Any way to quantify that, or are we doing the feelings thing?
By "warmth" he means macroblocking and JPEG noise. Those always make me feel warm and fuzzy.
__________________
If I ask "How do I do X?" or "what happens if I do X?", and X is a very bad thing that no one would ever normally do, assume that I already know this, and that I have Katie reasons for asking anyway.
Katie Boundary 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 00:36.


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