Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VideoStreamPlayer stops and cracking sound #88337

Closed
Tracked by #76797
LordNeo17 opened this issue Feb 14, 2024 · 4 comments
Closed
Tracked by #76797

VideoStreamPlayer stops and cracking sound #88337

LordNeo17 opened this issue Feb 14, 2024 · 4 comments

Comments

@LordNeo17
Copy link

Tested versions

v4.2.1.stable.official [b09f793]

System information

Godot v4.2.1.stable - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4070 (NVIDIA; 31.0.15.5152) - 13th Gen Intel(R) Core(TM) i5-13400F (16 Threads)

Issue description

When playing the video in Godot, it just pauses briefly at one point and otherwise you can hear audio crackling throughout the entire video. Am I doing something wrong or is this a bug in the engine? Outside the engine, the video works fine.

VideoStreamPlayer.1.mp4

Steps to reproduce

  • Add a VideoStreamPlayer
  • Put the video in the stream property

Minimal reproduction project (MRP)

video_bug.zip

@Calinou
Copy link
Member

Calinou commented Feb 14, 2024

FFmpeg information on the video in the MRP:

❯ ffprobe cutscene1.ogv
Input #0, ogg, from 'cutscene1.ogv':
Duration: 00:00:50.90, start: 0.000000, bitrate: 1848 kb/s
Stream #0:0(und): Video: theora, yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 24 fps, 24 tbr, 24 tbn
Metadata:
creation_time   : 2024-01-12T17:44:15.000000Z
handler_name    : VideoHandler
vendor_id       : [0][0][0][0]
timecode        : 01:00:00:00
encoder         : Lavc60.35.100 libtheora
major_brand     : isom
minor_version   : 512
compatible_brands: isomiso2avc1mp41
Stream #0:1(und): Audio: vorbis, 44100 Hz, stereo, fltp, 320 kb/s
Metadata:
creation_time   : 2024-01-12T17:44:15.000000Z
handler_name    : SoundHandler
vendor_id       : [0][0][0][0]
encoder         : Lavc60.35.100 libvorbis
major_brand     : isom
minor_version   : 512

@DeeJayLSP
Copy link
Contributor

DeeJayLSP commented Feb 25, 2024

Probably related to #21568 and #66331. (duplicate?)

Godot's Theora decoding implementation has been confirmed to have a glitchy audio whenever the image doesn't update.

I believe this issue and those two above are the same thing. Have you tried to encode the video with a keyframe interval of 1 (ffmpeg -g:v 1)? This ensures each frame in the video is a different one while massively increasing file size, but it's just for testing purposes.

If the issue doesn't happen with the resulting video, then yes, it's the same.

@Ktar5
Copy link

Ktar5 commented Jul 17, 2024

I just encountered this bug. the fix from @DeeJayLSP to add -g:v 1 worked. It didn't increase file size at all really for me, since my video is very small.

@akien-mga
Copy link
Member

Consolidating in #66331 which is about the same underlying bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants