Steve R. Bennen escreveu:
Ok, I'm still confused, but I'm starting to understand. The main problem is that I will have user-generated source files with different and unknown sizes and aspect ratios uploaded for encoding. For example, imagine your Youtube and your need to allow users the ability to upload video with different formats, sizes and aspect ratios to be encoded and played back in a fixed player and screen size. That size is 576x432 (4:3).
How do I accommodate all possibilities in the encoding string?
You'll need to write a script that grabs the size of the original video (using ffmpeg -i or ffprobe), does the math to calculate what size the resulting video needs to be to fit in the maximum size you want, preserving the aspect ratio, and based on that size calculates the size of black borders that need to be added. With all that, the script calls ffmpeg with the right parameters. -- Eduardo M Kalinowski eduardo at kalinowski.com.br