Jump to content

A Workflow for Transcoding Audio, Video, Images?

Recommended Posts

I work a lot with audio, video, and images, and often I wish I could just select a file in Alfred and convert it to a different format, like: 

  • wav to MP3
  • MOV to MP4
  • PNG to JPEG
  • etc etc etc


I have different apps on my machine that may do one of these conversions (like VLC for video files, Preview for images, or OCENAudio for audio) but it'd be nice if Alfred could easily do these kinds of conversions via Workflow. 

Should I hold my breath? 


Link to comment
  • 1 year later...
On 12/16/2020 at 3:38 AM, dfay said:

You just need to find command-line utilities to call for these tasks (LAME, sox , ImageMagick, VLC, textutil, etc.) and then stick the commands into file actions.  There are workflows here but they are oldish e.g.

 But the approach would be the same.

@Ted Curranit would be great if you would post any success with recommended utilities such as LAME, sox etc or already developed workflow for audio and video format conversion.

Link to comment

I've been looking into this a little bit. Without writing the workflow right away myself, I' d still like to give some insights.


tl:dr: use a combination of sips and ffmpeg


There are three macOS native utilities that at first sight promise a solution: avconvert, afconvert and sips.

avconvert seems to work quite well actually. The problem is the limited presets and the absence of decent compression, as far as I can tell. For creating 100MB large, 2min long mp4s, this is nice. What's perhaps interesting about this is that it lets you use apples proprietary HEVC (h.265) and ProRes codecs. For everyday use cases this is irrelevant.  afconvert appears to be extremely limited as in, it can read mp3 but will not write out mp3 files. I stopped looking into it here. Looking at `afconvert --help` seems to suggest that there has been no development since 2013. There is apple's SDK AVFAudio with which you could perhaps write an executable to perform conversions... if you happen to really really want to do that. Without having tested it thoroughly (or at all) sips looks great out of the box! Cf. `sips --formats` for writable image formats.


I also briefly tested VLC's CLI video transcoding and it works pretty well. However, the effort required to fine-tune the parameters could make it difficult to fit into an Alfred workflow. This leaves us with ffmpeg, which has to be installed: `$brew install ffmpeg`. Looks great. I' would start with sips for images and ffmpeg for the rest.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...