1 (edited by ForSerious 18-05-2020 18:51:47)

Topic: How to get the right aspect ratio after transcoding?

I have a trilogy of movies that are filmed in 2.40:1 aspect ratio but contained in standard DVD 4:3 aspect ratio. On playback in a standard DVD player, there are black borders on all four sides.

SVP is great at manipulating it so that I can get rid of the two side black borders upon playback. That is not enough though. I want to be able to transcode it into 16:9 aspect ratio, so that I have a copy that works on everything I might play it on.

I've tried setting a number of the frame size options, but the end result is always stretched in some extreme way.

In the attached screen shot, you can see that it's setting the resolution correctly, but when it completes, the log shows that it was ran with 'format=dar=1.33333' as one of the commands. That is the display aspect ratio for 4:3.

Post's attachments

AR.png, 30.9 kb, 602 x 324
AR.png 30.9 kb, 171 downloads since 2020-05-18 

Re: How to get the right aspect ratio after transcoding?

When you are using SVPcode you have chance to use extra options for used libavcodec (ovcopts).
You need to use Encoder-Advanced mode (as shown at your screenshot).
In quick manual by pressing button ? I found these options about aspect ratio:
--ovcopts=aspect= sample aspect ratio
--ovcopts=sar= sample aspect ratio

I've add one line to test:
sar=2:1
And I've done video with pointed aspect ratio (AR). But it is ratio not width/height for picture. It is AR for pixel as I can see.
So in your case you have 720x480 movie with 16:9 picture aspect ratio.
In internet I found formula for NTSC DVD: (16 * 480) / (9 * 720) = 7680 / 6480 = 32 / 27
So you need to try:
sar=32:27

It will work for any crop because this option fixes pixel width to its height.

Re: How to get the right aspect ratio after transcoding?

Sorry. I never scrolled down past the list of available output video codecs, so I never realized it has more example settings. That's my fault.
So, I've have now tried adding sar=32:27 alone and then a bunch of other variations.
They're still yielding oddly stretched results.
I think I'm closer.
aspect seems promising. There has got to be a combination of sar, aspect and lavfi: crop that will do the trick.

Re: How to get the right aspect ratio after transcoding?

After many more tries, this is what I found that gets the result I was hoping for:
video_size=640x360
sar=1
and lavfi:
crop=w=720:h=360, scale=720:-1, setdar=16/9

I probably didn't go about it the correct way, and I haven't tried it on any other device, but at least on the computer it looks correct.
Turns out the pixels are taller than they are wide for these DVDs I'm working with.

Post's attachments

AR2.jpg 219.43 kb, 72 downloads since 2020-05-19 

AR3.png, 33.12 kb, 638 x 403
AR3.png 33.12 kb, 211 downloads since 2020-05-19 

Re: How to get the right aspect ratio after transcoding?

After trying out those settings in my DVD player, they did not display correctly. They were close though.

My revised settings are:
video_size=720x360
sar=0.89
and lavfi:
crop=w=720:h=360
(Make sure the frame size settings are disabled.)

This works because the original pixel aspect ratio is higher than it is wide. I found the value for sar=0.89 by trial and error, so it may not be the most precise.