Video with alpha to file

Nicolas Dufresne nicolas at ndufresne.ca
Thu Mar 9 23:28:19 UTC 2023


Hi,

Le jeu. 9 mars 2023, 09 h 00, amindfv--- via gstreamer-devel <
gstreamer-devel at lists.freedesktop.org> a écrit :

> I've got an A420_10LE video stream I'd like to write to a file, preserving
> its alpha channel.
>
> I've found that I can use ProRes, with a pipeline like:
>
>     ... ! video/x-raw,format=A420_10LE ! videoconvert !
> video/x-raw,format=A444_10LE ! avenc_prores ! qtmux ! filesink
>
> This works but it's slow and results in massive files (almost 5GB for 30
> seconds of 1080p video).
>
> Are there faster+smaller options (encoders and maybe muxers) for writing
> to files with alpha? And in the spirit of learning to fish, how could I
> have found them (e.g. with `gst-inspect`)?
>

For higher compression, I'd opt for lossy compression. At 1080p, VP9, H.264
would be good option. VP9 + webm (matroska) seems the shortest path.

I'd basically wrap 2 vp9enc into a bin. Adding a simple element alphasplit,
to seperate the stream in two, and finally having a vp9alphacombine that
takes two vp9 streams and attach the alpha using the existing meta into the
color stream. The final step would to to add matroskamux support.

But if implementing this is not for you, FFMPEG fully support this, you can
add FFMPEG element, or wrap it with appsrc/sink.



> Thanks,
> Tom
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230309/50bff169/attachment.htm>


More information about the gstreamer-devel mailing list