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

" Cannot get ratio when minimum and maximum value are equal" and others errors #30

Closed
kzerot opened this issue Sep 21, 2020 · 2 comments

Comments

@kzerot
Copy link

kzerot commented Sep 21, 2020

I have error both on Win and Linux when I make new or open "test" project from git. Maybe I'm doing something wrong :)
But most important, I can't play any video, usually I have no errors
Compiled with docker.

E 0:00:01.055 get_as_ratio: Cannot get ratio when minimum and maximum value are equal.
<C++ Error> Condition "Math::is_equal_approx(get_max(), get_min())" is true. Returned: 0.0
<C++ Source> scene/gui/range.cpp:174 @ get_as_ratio()

Also if I try to play webm video from test project I have error:
W 0:00:00.545 godot_videodecoder_open_file(): Videodecoder vp8 (On2 VP8) not found.
<C++ Source> src/gdnative_videodecoder.c:572 @ godot_videodecoder_open_file()()
World.gd:9 @ _ready()

@ttencate
Copy link

ttencate commented Oct 8, 2020

I had this too. This "Cannot get ratio" happens because the min and max of the ProgressBar are set to equal values (both 0). This happens if the plugin failed to open the video. And that is happening because the VP8 codec is not supported by the plugin, as you can see from the second error. (Note that none of the example videos in the test project are actually in a supported format...)

A combination that works for me is to use the .webm extension, WebM container format, VP9 video, Vorbis audio. Using the newer Opus for audio should also work, considering what the plugin reports at startup:

ffmpeg_videoplayer: Supported video codecs:
	decode vp9
	decode vorbis
	  codec: libvorbis
	decode opus
	  codec: libopus

@Calinou
Copy link

Calinou commented Jul 4, 2021

This is a Godot bug that was fixed in 3.3 by godotengine/godot#45220.

@kidrigger Can you close this issue?

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

No branches or pull requests

4 participants