Melt: How to convert vertical video with black sides, to video 16:9, with blurred background sides

314 views Asked by At

I saw many discussions on how to do this with ffmpeg, but how can I do it with melt command line?

enter image description here

I'm using the below command to merge video and audio and to resize any video to 1280x720 which is working great with many videos in different sizes/ratios

/usr/bin/melt "colour:black" out=15 "input.mp4" -mix 15 -mixer luma -audio-track "sound.mp4" -profile hdv_720_30p -progress -consumer avformat:"output.mp4" vcodec="libx264" vb="5000k" acodec="aac" ab="128k" frequency=44100 deinterlace=1

I saw this filter https://www.mltframework.org/plugins/FilterPillar_echo/ which will do exactly what I want, but it requires that I know the width/height and the position (X/Y) of the video after the resizing that is done by the above command, which I have no idea how to calculate or get

1

There are 1 answers

0
Transformer On

Customize to your needs, please try the boxblur filter it might help

melt \
SomeFile.mp4 \  
  1. now setup your blur box & customize the size/aspect
-filter boxblur start=1 end=300 in=65 out=70 \
-transition \
composite in=65 out=70 a_track=0 b_track=1 \
start=0/0:100%x100%:100 \
end=-100%/0:100%x100%:100 \
-track \
-blank 65 \
  1. you can feed it back to another to do additional processing in steps
InOut.mp4 \
-transition \
composite in=65 out=70 a_track=0 b_track=1 \
start=100%/0:100%x100%:100 \
end=0/0:100%x100%:100 \
-filter boxblur start=300 end=1 in=65 out=70 \
-consumer avformat:outFile.mp4