0

In some videos there zoomed part of the same video instead of black bars. Like this one: enter image description here

1 Answer 1

2

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
6
  • 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 J
    Jun 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.
    – Gyan
    Jun 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 J
    Jun 24, 2018 at 16:04
  • 1
    Remove -c:a copy
    – Gyan
    Jun 24, 2018 at 16:09
  • 1
    You're using a very old version. -strict -2 hasn't been required since 3.0. Current ver is 4.0.1
    – Gyan
    Jun 25, 2018 at 5:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.