Heroku FFMPEG HEVC Video with Alpha support?

Viewed 24

I am looking for a way to handle converting videos like Webm VP9 with alpha channel to HEVC with alpha mov or mp4 files that are playable in Safari (The Webm will work in all other browsers).

While I can do this locally in my Rails app using streamio-ffmpeg gem and the havoc_videotoolbox encoder, this only works on Apple hardware.

Therefore if I push it up to Heroku and use the Heroku ffmpeg build pack, the HEVC VideoToolbox is not available for use.

FFMPEG does have the libx265 encoder but I can't find the property for this one to preserve the alpha channel.

ffmpeg -I INPUT -c:v libx265 -preset medium -crf 26 -tag:v hvc1 OUTput.mp4

there is a -x265-params flag, but I can't figure out which param will enable the alpha channel.

I am hoping this is actually possible for my production app, otherwise I'd have to process this segment of our media locally and manually upload the HEVC components.

Local Configuration Apple Monterey with ffmpeg 5.1.1 installed on Intel Rails 7

Heroku

FFMPEG build pack

Hobby Plan

Rails 7

0 Answers
Related