Changing the aspect ratio/dimensions of the output video

So among other things, I’ve been using this program as part of my efforts to digitize my family’s VHS tapes. While it does fairly decent job deinterlacing the footage and getting rid of the static, the output file tends to be compressed horizontally a bit. I think it’s safe to assume that this happens because of how my digitized footage is captured. Being PAL footage, the video is saved in 720x576 and gets stretched to fit 4:3 during playback, so as a result of doubling the size I end up with a 1440x1152 sized video. Naturally I’m able to just correct this compression through a video editing software, but I don’t know if the result would be more natural if I could just upscale it to 1536x1152 by default.

Though from what I’ve tried, some other similarly compressed PAL videos do get upscaled to their intended aspect ratios. When I was testing out the software, one of the things I tried to upscale were some files directly copied from a DVD. But despite being a video saved in 720x576, - meant to be played at 16:9 - VEAI was able to pick up on its intended aspect ratio and upscale the video accordingly to 2048x1152. So if this feature won’t be added to the software, I would at least like to know what causes this so I could make changes to the input videos themselves so that the software would take their intended aspect ratios into consideration.

Took me a while to figure out what you were saying here. :slight_smile: ‘compressed’ is a rather confusing term to use when taking about video processing, but I get you mean the horizontal resolution got made ‘less wide’ in the process.

Okay, well, there’s DAR (Display Aspect Ratio), and SAR (Source Aspect Ratio). In your PAL footage, the SAR is 1.25:1, but DAR is set for 16:9 playback. This is entirely normal, of course. So, what this means, is that you can go 2 ways:

  1. Leave SAR ‘as is’, upscale, and then set the correct DAR afterwards (inside your container). In fact, this is the preferred method, as stretching to 16:9 first means VEAI has more data to process.

  2. In case you want to process for DAR directly, you can already do that in VEAI, but with an avisynth preprocessor script. For example (grabbing an old .avs file of myself), I did things like this:

Dither_convert_yuv_to_rgb (matrix="601", output="rgb48y", lsb_in=false)

Dither_resize16nr (1920, 1080)
GradFun3 (smode=2, lsb=true, lsb_in=true)

Dither_convert_rgb_to_yuv (SelectEvery (3, 0), SelectEvery (3, 1), SelectEvery (3, 2), matrix="709", lsb=false, mode=0)

Just an example, of course. Just goes to show useful these preprocessor scripts are.

What is causing a faulty DAR, btw, is likely just the wrong container (or, rather, DAR not or improperly set in said container).

Thanks for the explanation, I wasn’t sure what terms were related to my problem so I didn’t quite know what and how to search.

I looked into the example you gave here, but I also looked into some other possible ways to address the issue. And I did eventually find this page too that offered another way to handle the issue with ffmpeg:

ffmpeg -i [input file] -aspect [desired aspect:ratio] -c copy [output file]

From what I tried, it does pretty much what I want with MP4 files. It doesn’t change the video’s SAR, but it does edit the DAR. While some video players don’t seem to take note of this edit, thankfully Video Enhance AI does. Though I did try with some other video file types too, but that didn’t seem to work on them as much, so I still need to look into other means to change their metadata accordingly.

1 Like

Yep, that is how you normally do it. :+1: Setting the DAR in the container’s metadata is the cleanest way.

Like you said, though, not every player out there may respect those settings. You could remux everything to mp4 (although I believe Dolby Vision getting recognized in mp4 is still an issue). So, using an avisynth fiter may sometimes be needed.

Hi,
I have my wedding footage with exact same specifications (720x576, SAR 1.42:1 DAR 16:9) and facing same issue with Video Enhance v3. Final video is stretched to 4:3 (showing huge black bars on left and right side) while watching on my LG C8 tv. Original video play perfectly.
You mentioned that, you used this command:
ffmpeg -i [input file] -aspect [desired aspect:ratio] -c copy [output file]

May I know what did you put in ‘desired aspect:ratio’?

So I am assuming, you changed the aspect ratio in source file and then upscaled in Topaz Video Enhance AI, right?

Please is it possible to add in future releases forced crop,stretch and changing aspect ratio of video ?