Long video clip stabilization with ffmpeg and vidstab 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, ...
Ad 1:

Presets have (almost) no impact to the quality — their purpose is for adjusting the trade-off of encoding time for the output size (the longer encoding time, the smaller the output stream).

Different presets enable / disable separate algorithms for compression. For example, in my installation, the -preset ultrafast is equivalent to options

--no-8x8dct --aq-mode 0 --b-adapt 0
--bframes 0 --no-cabac --no-deblock
--no-mbtree --me dia --no-mixed-refs
--partitions none --rc-lookahead 0 --ref 1
--scenecut 0 --subme 0 --trellis 0
--no-weightb --weightp 0


As you can see, almost no optimization, i. e. the output will be very large.



Ad 2:

H.264, aka MPEG-4 Part 10, aka Advanced Video Coding (AVC) is good enough, and its particular implementation — x264 library — is a very good one.

The pervasive rule is again the same: 


  Recent video compression standards are able to reach a little better compression than their predecessors, but for longer encoding time (and sometimes for lesser compatibility with media players, too).


So if you don't need cutting-edge compression, every contemporary compression standard is good enough.