productpana.blogg.se

Ffmpeg resize add black bars
Ffmpeg resize add black bars










ffmpeg resize add black bars

First, obviously, the new geometric size is what we specified for the crop. The new movie is not distorted and the black borders are gone.įor my test file, two size changes occurred.

ffmpeg resize add black bars

Make sure to play the result in a player that will set its own boundaries to the file size (or can be configured to do so - press 2 if you're in pot player). Step 2: simplify your commandline to test: ffmpeg -i movie.mp4 -vf crop=640:192:0:80 movie_without_borders.mp4. Do ffmpeg -i movie.mp4 -vf cropdetect temp.mp4 and read what it says for crop, like your crop=640:192:0:80. If I do the basic approach you have here on a black framed movie, it works very well. In other words, it's not just warped, but people should have some missing hair and appendages and things? It's hard to explain without drawing something, but this would have distorted your aspect ratio and, if the crop is stated as the geometry to be kept, cut out some content from your margins (remember: you made the video smaller before applying the original crop). Then you applied the crop that was detected for the original size movie to this new smaller movie. So the black frame would have been resized along with the movie. When you specify -s 640x352 as the first command applying to the output, are you expecting ffmpeg will handle it last? Judging from your results, I think it must have applied it first (to the movie with the black frame still intact).












Ffmpeg resize add black bars