Perhaps it's time to start a collection of ffmpeg commands for every situation, similar to bro pages [1]. I feel like I have to look at my old projects every time I need to use it. It took me a lot of trial and error to write an all-purpose ffmpeg command.

This is how I convert videos to 720p web-playable videos (if it's not already web-playable):

https://github.com/nicbou/homeserver/blob/22c0a160f9df5f4c34...

This is how I create hover previews like on modern streaming sites:

https://github.com/nicbou/timeline/blob/9d9340930ed0213dffdd...

[1] http://bropages.org/tar