Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3978

Is there a way to use VideoFrame (from the WebCodec API) directly in Pixijs?

$
0
0

Hey,

Is there a way to use a VideoFrame directly in pixiJS? VideoFrame is part of the new WebCodec API (which is currently only supported in Chromium 94 and above). In supported browser, VideoFrame can be directly painted to HTML canvas, as ctx.drawImage supports taking VideoFrame as an input.

So I was wondering whether I can convert it into a Texture/Sprite to use in pixijs. The complete pipeline would be:

MediaStream -> MediaStreamTrackProcessor -> ReadableStream<VideoFrame> -> ??? -> Pixi

The use case is taking a Video from MediaStream(live video, or output of a VideoDecoder), and then using it in a Pixi App.

What would be the most performant way of doing this? I couldnt find anything in the docs, or github issues. Is it even possible?

Thanks.

Environment
pixi.js version: 6.5.1
Browser & Version: Chrome Version 105.0.5195.28 (Official Build) beta (64-bit)
OS & Version: Windows 11


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>