Would it not be more efficient to create the decoder in-process, then you could feed it the bitstream via a compute buffer, and the video would be rendered to a texture.
The standout option for a more elaborate video handling was typically AVPro. It's a really good option, with that said with vlc stepping up hopefully it's no longer strictly necessary.
Video game programming with unity was an absolute nightmare to try and get working with any kind of gitops and or with multiple people working on the same code base a couple of years ago
VRChat folks will love this. Videoplayers are embedded into Unity scenes aka "maps" as a regular imported lib. The videoplayer is a drawn surface where users can see video playback. Most commonly used for streaming live music from a stream like Twitch.
Forgive me for my ignorance - but my understanding is that VLC is a frontend for ffmpeg, and even ffmpeg is 'just' a wrapper for hardware video decoders such as NVDEC when viewing supported codecs, like h264/5.
I don't know why, but on windows, the first time I start VLC after a windows boot, it takes about 5s to 8s to open a video file, any sort of video file
I suspect it's a graphics driver issue, or something else
I wish Unity's built-in videoplayer wasn't such a disappointment. The performance on Windows is god awful. Have had to write a mass video reference recompressor/in-scene replacer that just attempts to pick the best compression flags and reduces resolution just avoid dropping frames playing ~1080p videos on multi-core PC's with discrete GPU's. Mac was fine playing even the overly high res original footage, high 2000+ pixel portrait tutorial videos.
Wrote a proper double-buffering video/audio player in Unity using parts of an ffmpeg wrapper over ten years ago. Seems silly they never did anything similar officially, just used lackluster platform API's.
14 comments
[ 0.22 ms ] story [ 23.9 ms ] threadIt uses OpenGL rendering through GLX and EGL, with DMA-BUF texture sharing to pass video frames efficiently to Unity’s renderer.
Only x86_64 is supported at this time. In the future, I will add ARM64 support as well as Vulkan.
For cutscene playback?
The standout option for a more elaborate video handling was typically AVPro. It's a really good option, with that said with vlc stepping up hopefully it's no longer strictly necessary.
Video game programming with unity was an absolute nightmare to try and get working with any kind of gitops and or with multiple people working on the same code base a couple of years ago
Wonder if that changed ?
I suspect it's a graphics driver issue, or something else
Wrote a proper double-buffering video/audio player in Unity using parts of an ffmpeg wrapper over ten years ago. Seems silly they never did anything similar officially, just used lackluster platform API's.