Webel IT Australia promotes the amazing Mathematica tool and the powerful Wolfram Language and offers professional Mathematica services for computational computing and data analysis. Our Mathematica
tips, issue tracking, and wishlist is offered here most constructively to help improve the tool and language and support the Mathematica user community.
DISCLAIMER: Wolfram Research does not officially endorse analysis by Webel IT Australia.
Since v14.2 Mathematica supports many more codecs than were available in v14.1, including "PRORES-AW" and "PRORES-KS", both of which support the Alpha channel (transparency). This provides a workaround for a previous known issue:
ASIDE: Mathematica v14.2 also now supports the "DXV" format from Resolume, but does not seem to support the "with Alpha" mode or distinguish between DXV Normal or DXV High (it would seem to generate DXV Normal No Alpha).
About "PRORES-AW" and "PRORES-KS"
These would seem to correspond to the ffmpeg encoders 'prores-aw' and 'prores-ks'. Of these two, your best go-to is 'prores-aw', as 'prores-ks' has some limitations (such as being limited to 10-bit).
Note that slightly confusingly, "PRORES-AW" and the ffmpeg 'prores-aw' DO NOT refer to ProRes RAW (intended as a camera format), which is sometimes denoted 'PRORES-AW' as a quick Google search will attest. ProRes RAW does not support alpha channels.
You can use the following mini animation to test Export with transparency:
gTest[r_] := Graphics3D[
Sphere[{0, 0, 0}, r],
Background -> None,
PlotRange -> 3/2 {{-1, 1}, {-1, 1}, {-1, 1}},
ViewPoint -> {0, -Infinity, 0}
];
anim = AnimationVideo[
gTest[r],
{r, 0.5, 1, 0.1},
VideoTransparency -> True
];
Export[
"anim.PRORES-AW.alpha.mov",
anim,
"QuickTime",
VideoEncoding -> "PRORES-AW",
VideoTransparency -> True
]
If you use a media file metadata inspector such as MediaInfo you'll see that it ends up as 'ProRes (Version 1) 4444'. Or use ffmpeg -i
:
Video: prores (4444) (ap4h / 0x68347061), yuva444p12le
Apart from a slight file size difference, the result with "PRORES-KS" was the same, although one reply in this FFmpeg page suggests that only ffmpeg 'prores-ks' supports 4444 colorspace:
Prores is a 422 codec, with an existing 4444 variation. FFmpeg comes with 3 different prores encodes: "prores", "prores_ks" (formerly named "prores_kostya") and "prores_aw" (formerly named "prores_anatolyi"). In our testing we've used the "prores" and the "prores_ks" encoders and found "prores_ks" to be the best encoder to use. It is the only one that supports the 4444 colorspace and although it may be slightly slower. The color quality of the videos produced by these two codecs was visually indistinguishableBut as you can see from the test above that appears not to be so, at least as how Mathematica handles "PRORES-AW" with VideoTransparency.
TIP: HOWTO list the available $VideoEncoders
For full "QuickTime" encoder details use:
$VideoEncoders["QuickTime"]
To list the named encoders as used in option VideoEncoding for Export use:
$VideoEncoders["QuickTime"][[All,1]]
Remember to also always specify "QuickTime" as the 3rd argument to Export as shown above.