Video aspect ratio

Just starting out? Need help? Post your questions and find answers here.
jak64
Enthusiast
Enthusiast
Posts: 502
Joined: Sat Aug 15, 2020 5:02 pm
Location: Ciboure (France)

Video aspect ratio

Post by jak64 »

Hello all,

I tried lots of different software to change the ratio of a video (Width x Height) but none offers certain formats (2.21:1 - 2.31:1 - 2.35:1 - etc... ).

Would it be complicated to write a program in Purebasic that would allow you to choose any ratio?

Thanking you.
Bitblazer
Enthusiast
Enthusiast
Posts: 733
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: Video aspect ratio

Post by Bitblazer »

No, it would not be a "big" deal, but a decent project. But i am sure the VLC or handbrake tools already do that. Not to mention dozens of commercial utilities. Maybe just wrap a nice UI around one of those free transcoders.
webpage - discord chat links -> purebasic GPT4All
jak64
Enthusiast
Enthusiast
Posts: 502
Joined: Sat Aug 15, 2020 5:02 pm
Location: Ciboure (France)

Re: Video aspect ratio

Post by jak64 »

Hello,
thank you for your answer but VLC for example can change the aspect ratio at the time of playing but what I want is to change the aspect ratio of the video permanently without having to change it in VLC every time I play the video.

I also tried handbrake, but it doesn't offer the ratios I want.
Bitblazer
Enthusiast
Enthusiast
Posts: 733
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: Video aspect ratio

Post by Bitblazer »

Another option is probably VirtualDub2.
jak64 wrote: Wed Mar 09, 2022 2:15 pmI also tried handbrake, but it doesn't offer the ratios I want.
handbrake video resizing / commandline reference. Looks like everything needed is there. If you need end-users to do it more often, just slap a quick GUI done with purebasic around it.
webpage - discord chat links -> purebasic GPT4All
jak64
Enthusiast
Enthusiast
Posts: 502
Joined: Sat Aug 15, 2020 5:02 pm
Location: Ciboure (France)

Re: Video aspect ratio

Post by jak64 »

thank you bitblazer
morosh
Enthusiast
Enthusiast
Posts: 293
Joined: Wed Aug 03, 2011 4:52 am
Location: Beirut, Lebanon

Re: Video aspect ratio

Post by morosh »

using ffmpeg (https://ffmpeg.org/), you could do whatever you want by command line.
Recently I've done something similar:
ffmpeg -i xx.mp4 -vf scale=1920:1080 -c:v libx264 -preset fast -crf 8 -ar 16000 output.mp4

HTH
PureBasic: Surprisingly simple, diabolically powerful
jak64
Enthusiast
Enthusiast
Posts: 502
Joined: Sat Aug 15, 2020 5:02 pm
Location: Ciboure (France)

Re: Video aspect ratio

Post by jak64 »

Thank you morosh
Post Reply