Monday, June 6, 2016

Building ffmpeg with opencl support on Linux (AWS Linux AMI)

The last year I've learned more about video, live production, DIT, editing, encoding, players, codecs and ffmpeg than I could have imagined there was to know (and that only of course proved that there's 1,000x more to learn), but one particular part of this journey has proven VERY difficult so I wanted to share some of that.

ffmpeg is an open-source project and there are NO definitive binaries for any platform. There ARE some great builds out there which are well-maintained and very useful, but they aren't "official" and they weren't meeting all my needs so I had to setup a basic build environment which proved difficult itself for me even though I've been compiling on Linux (building Android Kernels even) for some 15 years.

I've put together a GIST to share the key points (an updated ffmpeg build with x264, x265, aac and opencl acceleration in particular) and I'm still evolving it. Find that gist HERE.

If you already know how to build, this should be a great reference. If you don't and want to use this with no real experience, please know that this was done an an AWS G2 instance (nvidia grid GPUs) running an AWS Linux AMI so it won't copy/paste/work just anywhere, but if you're running a distro with YUM and have an nvidia card, it should be pretty close at the least.


Post a Comment