ffmpeg scale filter takes too long

1.2k views Asked by At

I am using below command to scale and blur a video but it is very slow. Can anyone please help if i can improve the speed somehow.

"ffmpeg -i $inputPath -lavfi [0:v]split=2[original][copy];[copy]scale=ih*16/9:-1,crop=h=iw*9/16,boxblur=luma_radius=50:chroma_radius=25:luma_power=2[blurred];[blurred][original]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2[final] -map [final] -map a:0 -g 2 -preset ultrafast $outputPath -y"
1

There are 1 answers

6
llogan On

avgblur or gblur filters may be slightly faster, and stream copy the audio (-c:a copy) instead of re-encoding it.