Difference between revisions of "Video textures and alpha transparency"

From Verge3D Wiki
Jump to navigationJump to search
(Created page with "== Supported formats == WebM and HEVC/MOV formats are the only video formats that can be used on the web to display textures with alpha transparency. WebM is supported in Ch...")
 
Line 7: Line 7:
== Converting WebM to HEVC ==
== Converting WebM to HEVC ==


At the time of the writing, transparent videos are [https://trac.ffmpeg.org/ticket/7965 not supported] in the stock libx265 encoder. Still you can use Mac devices with hardware encoder called VideoToolbox to convert your videos:
At the time of the writing, transparent videos are [https://trac.ffmpeg.org/ticket/7965 not supported] in the stock libx265 encoder. Still you can use ffmpeg on Mac devices with hardware encoder called VideoToolbox to convert your videos:


  ffmpeg -c:v libvpx-vp9 -i movie-webm.webm -c:v hevc_videotoolbox -alpha_quality 0.75 -vtag hvc1 movie-hevc.mov
  ffmpeg -c:v libvpx-vp9 -i movie-webm.webm -c:v hevc_videotoolbox -alpha_quality 0.75 -vtag hvc1 movie-hevc.mov

Revision as of 12:59, 11 December 2021

Supported formats

WebM and HEVC/MOV formats are the only video formats that can be used on the web to display textures with alpha transparency.

WebM is supported in Chrome/Firefox/Edge/Samsung Internet/Opera/Brave while HEVC/MOV is used on Safari (both desktop and mobile).

Converting WebM to HEVC

At the time of the writing, transparent videos are not supported in the stock libx265 encoder. Still you can use ffmpeg on Mac devices with hardware encoder called VideoToolbox to convert your videos:

ffmpeg -c:v libvpx-vp9 -i movie-webm.webm -c:v hevc_videotoolbox -alpha_quality 0.75 -vtag hvc1 movie-hevc.mov