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

Godot doesn't crop 8-pixel overscan area when playing Ogg Theora video #62752

Closed
Calinou opened this issue Jul 5, 2022 · 4 comments · Fixed by #101958
Closed

Godot doesn't crop 8-pixel overscan area when playing Ogg Theora video #62752

Calinou opened this issue Jul 5, 2022 · 4 comments · Fixed by #101958

Comments

@Calinou
Copy link
Member

Calinou commented Jul 5, 2022

Godot version

3.4.4, 3.5.rc5, 4.0.alpha11

System information

Fedora 36, GeForce GTX 1080 (NVIDIA 510.68.02)

Issue description

Godot doesn't crop the 8-pixel overscan area at the bottom when playing an Ogg Theora video in a VideoStreamPlayer node (VideoPlayer in 3.x). This is most noticeable when the video plays, rather than when it's paused, so I recommend trying out the MRP locally if you can't notice the issue on the screenshots.

Notice how the last 8 rows of pixels are duplicated in Godot, but not in mpv:

Screenshot from Godot (bad)

Cropped to show only the video area (896×512).

image

image

Screenshot from mpv (good)

896×504.

image

image

This happens even if I re-encode the video using FFmpeg using ffmpeg -i Big_Buck_Bunny_medium.ogv bb.ogv.

ffprobe information (on original video file)

[ogg @ 0x55c00d5965c0] Broken file, keyframe not correctly marked.
Input #0, ogg, from '/tmp/test_ogg_theora/Big_Buck_Bunny_medium.ogv':
  Duration: 00:09:56.47, start: 0.000000, bitrate: 1317 kb/s
  Stream #0:0: Data: none
  Stream #0:1: Video: theora, yuv420p, 896x504, 24 tbr, 24 tbn
    Metadata:
      ENCODER         : ffmpeg2theora-0.25
      SOURCE_OSHASH   : cc9e38e85baf7573
  Stream #0:2: Audio: vorbis, 48000 Hz, stereo, fltp, 96 kb/s
    Metadata:
      ENCODER         : ffmpeg2theora-0.25
      SOURCE_OSHASH   : cc9e38e85baf7573
Unsupported codec with id 0 for input stream 0

Steps to reproduce

  • Add VideoStreamPlayer node and specify an Ogg Theora video file.
  • Disable Expand on the VideoStreamPlayer.
  • Run the project and look at the video's bottom pixels.
  • Play the video in another video player such as mpv or VLC, and compare the visual output.

Minimal reproduction project

N/A (previous link has expired)

@Narotiza
Copy link

i believe i ran into this issue in 4.2.dev5, with 12 extra pixels on the bottom and right sides.
Cropping the video to its original resolution using a parent Control node with Clip Contents enabled seems to be a good workaround though.

@SliverWorm
Copy link

I also encountered similar problems. My godot version is 4.1.1. The right and bottom sides of my video in godot are blurry.Here are my ffmpeg command: ffmpeg -i xx.mp4 -q:v 10 -q:a 10 xx.ogv. I have recorded the video using mkv format, and then using ffmpeg: ffmpeg -i xx.mkv -q:v 10 -q:a 10 xx.ogv.Amazingly, there are no issues with the ogv video anymore.

@olivergs
Copy link
Contributor

olivergs commented Apr 16, 2024

I have this problem in 4.2.1.

Used ffmpeg -i input.mp4 -c:v libtheora -q:v 7 output.ogv

@bs
Copy link

bs commented May 30, 2024

This got me when playing a fullscreen video @ 1920x1080 in 4.2.2, and the VideoStreamPlayer and parent AspectRationContainer take a forced transform of size: 1920x1088.

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

Successfully merging a pull request may close this issue.

6 participants