A
A
Alexander2019-10-17 12:58:50
fmpeg
Alexander, 2019-10-17 12:58:50

How to combine transpose with blur filter?

Hello dear experts.
There is such a command that makes the edges of the video blurry, instead of black borders.

ffmpeg \
  -i input.mp4 \
  -lavfi '[0:v] scale=ih*16/9:-1, boxblur=luma_radius=min(h\,w)/20:luma_power=1:chroma_radius=min(cw\,ch)/20:chroma_power=1[bg];  [bg][0:v]overlay=(W-w)/2:(H-h)/2, crop=h=iw*9/16' \
  -vb 800K \
  output.webm

This command works, but only if the video is already loaded expanded from vertical. If it is shown sideways, it does not work. I have a check that automatically detects a vertical video (on load) and then flips it with transpose. So far it all works only separately from each other. Tried to combine the edge blur command with transpose, in many ways, but all in vain. I even tried to run two commands (php script, one after another), so that one just flips the video (saves the file under a name different from the input), and the other one makes blurry edges on the video that it unfolds (saves the file under a name different from the input) , but as I understand it, this does not work because the second command does not wait until the first one completes, but starts immediately, and if the first one has not yet worked out, then the file, which needs to be processed by the second command, still, as it were, not. More precisely, the file is already there, but only part of it, and as a result, the video is expanded, with blurry edges, but a fraction of a second long. How simple is the picture ... Can you tell me how to solve a similar problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question