My personal method is to type "ffmpeg" and then hit Ctrl+R repeatedly until I make it to the last time I used it to do what I want to do again now, and then adapt the command from history to my current needs.

It's not very efficient, but I don't feel it needs to be, and it requires no particular setup (except setting Bash to keep history forever but that's something useful I would do anyway for other use cases).

If you haven’t run across Atuin yet you might like it! https://github.com/ellie/atuin

It stores shell history in a SQLite database and you can use Ctrl+R to fuzzy search it.