In some videos there zoomed part of the same video instead of black bars.
Like this one:
1 Answer
Let's say your final canvas resolution is WxH, then you would run
ffmpeg -i video -filter_complex "[0]scale=W:H,boxblur=15:15,setsar=1[bg];[bg][0]overlay=(W-w)/2:(H-h)/2" -c:a copy out.mp4
-
I can't understand how to use it: I'm getting wrong parameters error, could you explain better, in instance about w and h.– Jack JJun 23, 2018 at 20:42
-
You should replace W and H with the actual numbers for output width and height. The first filter rescales the input to WxH and blurs it. Then the original unscaled input is overlaid on top.– GyanJun 24, 2018 at 5:12
-
I'm getting errors:
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
. Log file: drive.google.com/open?id=1QDbe115rjPTtcixXtQzm4qUb3Qx5S3FU– Jack JJun 24, 2018 at 16:04 -
1
-
1You're using a very old version.
-strict -2
hasn't been required since 3.0. Current ver is 4.0.1– GyanJun 25, 2018 at 5:01