change aspect ratio without changing video resolution [ffmpeg]
os.system(“””ffmpeg -i output_1.mp4 -filter_complex “[0:v]scale=1080:1920,boxblur=luma_radius=min(h,w)/20:luma_power=1:chroma_radius=min(cw,ch)/20:chroma_power=1[bg];[0:v]scale=720:720:force_original_aspect_ratio=decrease[fg];[bg][fg]overlay=(W-w)/2:(H-h)/2[outv]” -map [outv] -map 0:a? output.mp4″””)
os.system(“””ffmpeg -i output_1.mp4 -vf scale=1280×720,setdar=0.562 output.mp4″””)
os.system(“””ffmpeg -i output_1.mp4 -vf crop=ih*(9/16):ih output.mp4″””)
tried all those methods, trying to change 16:9 normal aspect ratio video to 9:16 horizontal video without changing resolution and trying to maintain its resolution.
expected output size shown below.
Read more here: Source link