Hi Felipe
The best way to start is to look at any working transformation that uses command line (i.e. PDF to SWF). All you will need to do is to copy, rename it (in XML file as well), configure new command line for ffmpeg and associate new mime types.
You can place ffmpeg anywhere as soon as system user that runs alfresco can run it.
If you hit a roadblock you can share new config files in the forum or PM me.
You will not need new action, normal transform action with the mimetypes that you configured will work.
Thanks
Alexander