godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
86.93k stars 19.48k forks source link

VideoStreamWebm VP9 video stops playing #58718

Open jamie-pate opened 2 years ago

jamie-pate commented 2 years ago

Godot version

3.3.4-stable, 0c58454dac266d888211443321ed41020f9ff1a8

System information

Linux 5.15.15-76051515-generic, Pop!_OS 21.10 OpenGL ES 3.0 Renderer: NVIDIA GeForce GTX 1070 with Max-Q Design/PCIe/SSE2

Issue description

The built-in VideoStreamWebm video stream 'randomly' stops playing the video stream from some vp9 encoded video files. (vs the godot-videodecoder gdnative plugin which plays them properly)

It seems to occur randomly, but I have found some video files where it will stop playing the video immediately when encoded as vp9 but play flawlessly with vp8.. The built-in VideoStreamWebm would be useable if this issue was fixed. (and seeking/stream_length was added)

I know that the VideoStreamWebm is deprecated and removed from godot4, but it is still much simpler to build than the ffmpeg gdnative plugin and would likely be a better candidate for an extension in godot4 if these issues are solved.

This issue was rediscovered while testing this pull request: https://github.com/godotengine/godot/pull/57744 which fixes this (closed) issue with the built-in video player https://github.com/godotengine/godot/issues/14430

Steps to reproduce

Download and run the included reproduction project which creates a VideoStreamWebm when you click the open button and choose a video.

Choose 'open' and choose the included vp9 webm file to demonstrate the issue. Opening the vp8 webm file will work fine.

Consecutive streams are opened in separate video players (up to 4) to test concurrent playback etc. You can also choose to use the included gdnative godot-videodecoder plugin for playback which works for both files (from this build https://github.com/kidrigger/godot-videodecoder/releases/tag/0.0.2 )

Minimal reproduction project

vp8-vp9-video-freeze-repro2.zip

John-Gdi commented 2 years ago

see #57744