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

[libmpv_render] fails to render textures #34

Closed
itshaadi opened this issue Aug 13, 2018 · 5 comments
Closed

[libmpv_render] fails to render textures #34

itshaadi opened this issue Aug 13, 2018 · 5 comments

Comments

@itshaadi
Copy link
Contributor

itshaadi commented Aug 13, 2018

due to a perfectly legitimate desire to maintain backward compatibility with older Raspberry models, the repository only provides a generic build of mpv (and an older version of FFmpeg). As a result, mpv is unable to take advantage of hardware acceleration, and therefore does not leverage the Raspberry’s surprisingly powerful on-board GPU to play video. So I used mpv-build to build FFmpeg and MPV from their master branch. with these options.

ffmpeg:

--enable-gpl
--enable-nonfree
--enable-static
--enable-libx264
 --enable-libfdk-aac
 --enable-libvpx
 --enable-libopus
 --enable-libmp3lame
 --enable-libtheora
 --enable-libvorbis
 --enable-omx
 --enable-omx-rpi
 --enable-mmal
 --enable-libxcb
 --enable-libfreetype
 --enable-libass
 --enable-gnutls
 --disable-opencl
 --extra-cflags="-march=armv8-a+crc -mfpu=neon-fp-armv8 -mtune=cortex-a53"

mpv:

--enable-rpi
--enable-libmpv-shared

the result is astonishing, MPV (player itself) can play 1080P/60fps videos without dropping a single frame.
but libmpv will show a white screen that can only play the sounds and render subtitles. logs from MPV_TERMINAL indicate these errors:

[libmpv_render] after creating texture: OpenGL error INVALID_VALUE.
[libmpv_render] Error: framebuffer completeness check failed (error=36054).
[libmpv_render] Error: texture could not be created.

I've already rebuild the plugin, but the issue remains. also this is sort of similar to #25 but i've tried it with 1.7.9 as well.

@Kagami
Copy link
Owner

Kagami commented Aug 13, 2018

Do you mean mpv.js works with mpv from standard repositories, but not with ffmpeg/mpv compiled from sources?

Can you reproduce issue with SDL example?

Btw, it's not enough to compile mpv with hwdec to get hwdec in mpv.js, #5 needs to be fixed first…

@itshaadi
Copy link
Contributor Author

itshaadi commented Aug 13, 2018

Do you mean mpv.js works with mpv from standard repositories, but not with ffmpeg/mpv compiled from sources?

yes

Can you reproduce issue with SDL example?

how? can you walk me through the procedure?

Btw, it's not enough to compile mpv with hwdec to get hwdec in mpv.js, #5 needs to be fixed first…

well mpv from standard repository is awful, the frame rate drops to 0.5 – half a frame per second! at least now I know that mpv is fine.

@itshaadi
Copy link
Contributor Author

logs from mpv.js on electron 1.7.9 (full log)

[libmpv_render] GL_SHADING_LANGUAGE_VERSION='OpenGL ES GLSL ES 1.0 Chromium'
[libmpv_render] Loaded extension GL_EXT_unpack_subimage.
[libmpv_render] Loaded extension GL_EXT_texture_rg.
[libmpv_render] Loaded extension GL_EXT_color_buffer_half_float.
[libmpv_render] Function glQueryCounterEXT from extension GL_EXT_disjoint_timer_query not found.
[libmpv_render] Function glGetTranslatedShaderSourceANGLE from extension GL_ANGLE_translated_shader_source not found.

[libmpv_render] GL_*_swap_control extension missing.
[libmpv_render] 16 bit UNORM textures not available.
[libmpv_render] Disabling HDR peak computation (one or more of the following is not supported: compute shaders=0, SSBO=0).
[libmpv_render] No advanced processing required. Enabling dumb mode.
[libmpv_render] Loading hwdec driver 'vaapi-egl'
[libmpv_render] Loading failed.
[libmpv_render] Loading hwdec driver 'vdpau-glx'
[libmpv_render] Loading failed.
[libmpv_render] Loading hwdec driver 'rpi-overlay'
[libmpv_render] Loading hwdec driver 'drmprime-drm'
[libmpv_render/drmprime-drm] Failed to retrieve DRM fd from native display.
[libmpv_render] Loading failed.

[ao/alsa] Error received from snd_pcm_avail (-77, File descriptor in bad state)!
(Paused) AV: 00:00:06 / 00:00:12 (47%) A-V: -0.000 Dropped: 130
[ao/alsa] Error received from snd_pcm_avail (-77, File descriptor in bad state)!
[vo/opengl-cb] mpv_render_context_render() not being called or stuck.
[ao/alsa] Error received from snd_pcm_avail (-77, File descriptor in bad state)!
[ao/alsa] Error received from snd_pcm_avail (-77, File descriptor in bad state)!
[vo/opengl-cb] mpv_render_context_render() not being called or stuck.

@itshaadi
Copy link
Contributor Author

itshaadi commented Aug 13, 2018

Can you reproduce issue with SDL example?

The issue exist in the SDL example. as well in mpv --vo=gl but work's perfect with mpv --vo=rpi

@itshaadi
Copy link
Contributor Author

it's a known issue mpv-player/mpv#5405

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

2 participants