Created
January 5, 2020 13:54
-
-
Save ArneAnka/a1348b13fc291f72f862d92f35380428 to your computer and use it in GitHub Desktop.
FFmpeg: How to convert vertical video with black sides, to video 16:9, with blurred background sides
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://stackoverflow.com/questions/30789367/ffmpeg-how-to-convert-vertical-video-with-black-sides-to-video-169-with-blur | |
ffmpeg -i <input_file> -filter_complex "[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" <output_file> | |
TAKES FOREVER! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For HDR video's Shot on iPhone and keep HEVC codec:
ffmpeg -i IMG_xxxx.MOV -movflags +faststart -c:a copy -c:v hevc -x265-params lossless=1 -vtag hvc1 -filter_complex "[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" output.MOV