Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F-String errors and FFMPEG aspect ratio if width is not divisible by 2 #3

Closed
viper86it opened this issue Oct 15, 2024 · 1 comment
Closed

Comments

@viper86it
Copy link

Hi,
thank you for your work! It's exactly what I'm looking for.
Anyway I spent a bit of time to get it working, your code has a lot of errors with f-string syntax.

I've corrected all strings is commander.py, preview.py and ffmpeg.py. Please check attached files. Now works well with python 3.10.12

In ffmpeg.py, in function generate_preview_chunck(), it was an error related to file width calculation. Using "-1" is calculated keeping aspect ratio, but if width is not divisible by 2 ffmpeg returns an error.

To solve it I changed:
-vf {scale}=-1:{args.resolution}{video}
to
-vf "{scale}=-2:{args.resolution}{video}"

as explained here:
https://trac.ffmpeg.org/wiki/Scaling

I hope this will help you:
Fix.zip

@Tetrax-10
Copy link
Owner

Thanks for reporting the bugs and suggesting fixes, really appreciate your effort 👍.

Done! 5046551

Check out v1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants