title: Heroku FFMPEG HEVC Video with Alpha support?
body: <p>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).</p>
  <p>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.</p>
  <p>Therefore if I push it up to Heroku and use the Heroku ffmpeg build pack, the HEVC VideoToolbox is not available for use.</p>
  <p>FFMPEG does have the libx265 encoder but I can't find the property for this one to preserve the alpha channel.</p>
  <pre><code>ffmpeg -I INPUT -c:v libx265 -preset medium -crf 26 -tag:v hvc1 OUTput.mp4
  </code></pre>
  <p>there is a -x265-params flag, but I can't figure out which param will enable the alpha channel.</p>
  <p>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.</p>
  <p><strong>Local Configuration</strong>
  Apple Monterey with ffmpeg 5.1.1 installed on Intel
  Rails 7</p>
  <p><strong>Heroku</strong></p>
  <p><a href="https://elements.heroku.com/buildpacks/jonathanong/heroku-buildpack-ffmpeg-latest" rel="nofollow noreferrer">FFMPEG build pack</a></p>
  <p>Hobby Plan</p>
  <p>Rails 7</p>