Uncategorized

That Mac script that passes MP4v to ffmpeg

Because of how Mac OS Mojave, Big Sur, Monterey handles file permissions, many Firefox add-ons are not able to pass downloaded files to outside binaries. Usually, the add-on will return a “file/directory not found” or “permission” error.

I use one such add-on that converts movies to audio-only so that I can listen to a video in a car. After the upgrade to Mojave, the add-on started having problems with passing the downloaded MP4 file to ffmpeg to convert into M4A (MP4 Audio). So instead of typing commands into the Terminal to pass the file to ffmpeg, I decided to make an Automator script to convert MP4 to M4A from contextual menu by right-clicking on the file

  1. In Automator create a new Quick Action
  2. Make the item shown below. I usually keep the ffmpeg executable in ~/bin
  3. Save the script
  4. Name it Convert MP4 to M4A

That’s it. Now you can right click on a MP4 file and call up the conversion script from the Quick Action or Services item.

This script is meant for people who know what they’re doing. It won’t check if the file you’re trying to convert is an actual MP4 file, and it won’t display any errors to the GUI. Use with caution.