[FFmpeg-user] Split Video into RGB and Alpha
Michael Koch
astroelectronic at t-online.de
Tue Jan 4 23:05:17 EET 2022
Am 04.01.2022 um 18:04 schrieb Hanna Frangiyyeh:
> Hi Michael;
> Sorry I'm a novice to ffmpeg, is there a way to do it in one command pass.
> Also, do you have command that you can share?
Here is an example:
rem Make a short test video with alpha channel
ffmpeg -f lavfi -i testsrc2=s=1920x1080:d=3 -lavfi
format=rgba,geq=a='255*gt(X,Y)':r='r(X,Y)':g='g(X,Y)':b='b(X,Y)' -c:v
prores_ks -y test.mov
rem Extract the RGB channels
ffmpeg -i test.mov -pix_fmt rgb48le -y rgb.mov
rem Extract the alpha channel
ffmpeg -i test.mov -lavfi extractplanes=a -y alpha.mov
It's possible to do all in one command, but it's easier if you make it
in two steps.
Michael
More information about the ffmpeg-user
mailing list