I'm learning how to use ffmpeg
to stabilize some footage I shot at a conference (my setup had a nasty wobble and I didn't realise how bad it was until I started editing).
After trial and error I finally had great results with ffmpeg
with the vidstab
option and I'm about to process some longer clips (over an hour each) and just want to check I'm using the optimal settings (for close to visually lossless quality and speed balance)...
Below are the commands I'm using:
ffmpeg -i filename.MP4 -vf vidstabdetect=stepsize=32:shakiness=7:accuracy=10:result=transform_vectors.trf -f null -
and then:
ffmpeg -i filename.MP4 -vf vidstabtransform=input=transform_vectors.trf:zoom=0:smoothing=10,unsharp=5:5:0.8:3:3:0.4 -c:v libx264 -preset slow -crf 18 -c:a copy Output.MP4
Questions:
- Does
-preset slow
vs-preset medium
make much of a difference in quality at-crf18
? - What is the fastest codec to output / encode to in this situation? At the moment I'm using h.264 (file sizes are good).
Note: ffmpeg with vidstab is much better than the other options I tried like Deshake, Pr/Ae Warp stabilizer, Blender, ...
shakiness
andqrf
but want to increasesmoothing
. However, without sample footage this is difficult to say. Here is what I'm using.