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

[question] does this mpv log indicate some error? #10381

Closed
alexmercerind opened this issue Jul 8, 2022 · 3 comments
Closed

[question] does this mpv log indicate some error? #10381

alexmercerind opened this issue Jul 8, 2022 · 3 comments

Comments

@alexmercerind
Copy link

alexmercerind commented Jul 8, 2022

First off, I'm trying to render mpv video output using ANGLE. I'm not much sure about anything in this regard.

In theory, everything is working, no visible errors from ANGLE or Direct3D11 APIs. But, the screen is just blank black. And mpv just gets "stuck" after logging this.

All the code is available here: https://github.com/alexmercerind/flutter-windows-ANGLE-OpenGL-Direct3D-Interop/tree/mpv.

More specifically, this section includes all the mpv specific calls: https://github.com/alexmercerind/flutter-windows-ANGLE-OpenGL-Direct3D-Interop/blob/8b5f1f51f3a13c1509d120859089e75c5794928b/windows/flutter_windows_angle_d3d_texture_plugin.cpp#L347-L385.

Log file

Full Logs: log.txt

Please ignore glActiveTexture: 00007FFCD8E63880 logs, those were added for a check.

[cplayer] Waiting for scripts...
[libmpv_render] GL_VERSION='OpenGL ES 3.0.0 (ANGLE 2.1.18629 git hash: 53e1711046b8)'
[libmpv_render] Detected GLES 3.0.
[libmpv_render] GL_VENDOR='Google Inc. (AMD)'
[libmpv_render] GL_RENDERER='ANGLE (AMD, AMD Radeon(TM) Vega 3 Mobile Graphics Direct3D11 vs_5_0 ps_5_0, D3D11-25.20.14016.1)'
[libmpv_render] GL_SHADING_LANGUAGE_VERSION='OpenGL ES GLSL ES 3.00 (ANGLE 2.1.18629 git hash: 53e1711046b8)'
[osd/libass] libass API version: 0x1502000
[libmpv_render] Loaded extension GL_EXT_texture_norm16.
[libmpv_render] Loaded extension GL_EXT_color_buffer_half_float.
[osd/libass] libass source: commit: 0d170d9a1d7e7fee948141eac988c1e6391dfc62
[libmpv_render] Loaded extension GL_EXT_disjoint_timer_query.
[libmpv_render] Loaded extension GL_KHR_debug.
[libmpv_render] Loaded extension GL_ANGLE_translated_shader_source.
[libmpv_render] GL_*_swap_control extension missing.
[libmpv_render] Testing FBO format rgba16f
[libmpv_render] Using FBO format rgba16f.
[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 'd3d11-egl'
[libmpv_render] Loading failed.
[libmpv_render] Loading hwdec driver 'dxva2-egl'
[osd/libass] Shaper: FriBidi 1.0.11 (SIMPLE) HarfBuzz-ng 3.2.0 (COMPLEX)
[osd/libass] Setting up fonts...
[osd/libass] Using font provider directwrite (with GDI)
[osd/libass] Done.
[cplayer] Done loading scripts.
[libmpv_render/dxva2-egl] Failed to create EGL surface
[libmpv_render] Loading failed.
[libmpv_render] Loading hwdec driver 'd3d11va'
[libmpv_render] Loading failed.
[libmpv_render] Loading hwdec driver 'dxva2-dxgi'
[libmpv_render] Loading failed.
[libmpv_render] Loading hwdec driver 'dxva2-dxinterop'
[libmpv_render] Loading failed.
[libmpv_render] Loading hwdec driver 'cuda-nvdec'
[libmpv_render/cuda-nvdec] Failed to load CUDA symbols
[libmpv_render] Loading failed.
[cplayer] Set property: volume=0.000000 -> 1
[cplayer] Running hook: ytdl_hook/on_load
[ytdl_hook] ytdl:// hook
[ytdl_hook] not a ytdl:// url
[ifo_dvdnav] Opening D:\Music\Videos\4_5911051253399422970.mp4
[bdmv/bluray] Opening D:\Music\Videos\4_5911051253399422970.mp4
[file] Opening D:\Music\Videos\4_5911051253399422970.mp4
[demux] Trying demuxers for level=normal.
[lavf] Found 'mov,mp4,m4a,3gp,3g2,mj2' at score=100 size=2048.
[file] stream level seek from 131072 to 97082093
[demux] Detected file format: mov,mp4,m4a,3gp,3g2,mj2 (libavformat)
[cplayer] Opening done: D:\Music\Videos\4_5911051253399422970.mp4
[find_files] Loading external files in D:\Music\Videos\
[cplayer] Running hook: ytdl_hook/on_preloaded
[lavf] select track 0
[lavf] select track 1
 (+) Video --vid=1 (*) (h264 1920x1080 23.976fps)
 (+) Audio --aid=1 --alang=eng (*) (aac 2ch 44100Hz)
[vd] Container reported FPS: 23.976024
[vd] Codec list:
[vd]     h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[vd]     h264_qsv (h264) - H264 video (Intel Quick Sync Video acceleration)
[vd]     h264_cuvid (h264) - Nvidia CUVID H264 decoder
[vd] Opening decoder h264
[vd] Looking at hwdec h264-d3d11va...
[vd] Could not create device.
[vd] Looking at hwdec h264-dxva2...
[vd] Could not create device.
[vd] Looking at hwdec h264-nvdec...
[vd] Could not create device.
[vd] Looking at hwdec h264-dxva2-copy...
Cannot load nvcuda.dll
[vd] Trying hardware decoding via h264-dxva2-copy.
[vd] Selected codec: h264 (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10)
[vf] User filter list:
[vf]   (empty)
[ad] Codec list:
[ad]     aac - AAC (Advanced Audio Coding)
[ad]     aac_fixed (aac) - AAC (Advanced Audio Coding)
[ad] Opening decoder aac
[ad] Requesting 1 threads for decoding.
[ad] Selected codec: aac (AAC (Advanced Audio Coding))
[af] User filter list:
[af]   (empty)
[cplayer] Starting playback...
[file] stream level seek from 97304706 to 48
[vd] Pixel formats supported by decoder: cuda dxva2_vld d3d11va_vld d3d11 yuv420p
[vd] Codec profile: High (0x64)
[vd] Requesting pixfmt 'dxva2_vld' from decoder.
Using hardware decoding (dxva2-copy).
[vd] Decoder format: 1920x1080 nv12 bt.709/bt.709/bt.1886/limited/auto CL=mpeg2/4/h264
[vd] Using container aspect ratio.
[vf] [in] 1920x1080 nv12 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] 1920x1080 nv12 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] (disabled)
[vf] [autorotate] 1920x1080 nv12 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [autorotate] (disabled)
[vf] [convert] 1920x1080 nv12 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [convert] (disabled)
[vf] [out] 1920x1080 nv12 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[af] [in] 44100Hz stereo 2ch floatp
[af] [userspeed] 44100Hz stereo 2ch floatp
[af] [userspeed] (disabled)
[af] [convert] 44100Hz stereo 2ch floatp
[ao] Trying audio driver 'wasapi'
[ao/wasapi] requested format: 44100 Hz, stereo channels, floatp
[ao/wasapi] No device specified. Selecting default.
[ao/wasapi] Selecting device '{f698aec9-8c3b-4d68-9e66-7ae20cf37902}' (Speakers (Realtek(R) Audio))
[ao/wasapi] Monitoring changes in device {0.0.0.00000000}.{f698aec9-8c3b-4d68-9e66-7ae20cf37902}
[ao/wasapi] Trying stereo float (32/32 bits) @ 48000hz (shared) -> ok
[ao/wasapi] Accepted as stereo float @ 48000hz -> stereo float (32/32 bits) @ 48000hz (shared)
[ao/wasapi] Device period: 11 ms
[ao/wasapi] Buffer frame count: 2560 (53 ms)
[ao/wasapi] IAudioClock::GetFrequency gave a frequency of 384000.
[ao/wasapi] device buffer: 2560 samples.
[ao/wasapi] using soft-buffer of 9600 samples.
AO: [wasapi] 48000Hz stereo 2ch float
[cplayer] AO: Description: Windows WASAPI audio output (event mode)
[autoconvert] inserting resampler
[swresample] format change, reinitializing resampler
[swresample] 44100Hz stereo floatp -> 48000Hz stereo float
[af] [out] 48000Hz stereo 2ch float
VO: [libmpv] 1920x1080 nv12
[cplayer] VO: Description: render API for libmpv
[vo/libmpv] reconfig to 1920x1080 nv12 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[libmpv_render] Window size: 1280x720 (Borders: l=0 t=0 r=0 b=0)
[libmpv_render] Video source: 1920x1080 (1:1)
[libmpv_render] Video display: (0, 0) 1920x1080 -> (0, 0) 1280x720
[libmpv_render] Video scale: 0.666667/0.666667
[libmpv_render] OSD borders: l=0 t=0 r=0 b=0
[libmpv_render] Video borders: l=0 t=0 r=0 b=0
[libmpv_render] Texture for plane 0: 1920x1080
[libmpv_render] Texture for plane 1: 960x540
[libmpv_render] Testing FBO format rgba16f
[libmpv_render] Using FBO format rgba16f.
[libmpv_render] No advanced processing required. Enabling dumb mode.

Thanks a lot!

@alexmercerind

This comment was marked as resolved.

@alexmercerind

This comment was marked as resolved.

@alexmercerind
Copy link
Author

alexmercerind commented Jul 8, 2022

So, there are no errors. It's just that mpv_render_context_set_update_callback isn't invoking the passed callback for some reason.

Spinning a detached frame constantly calling mpv_render_context_render actually makes video show up in the UI & nothing freezes.

What could be reason of mpv_render_context_set_update_callback not working.

Moral of the story: read docs carefully.

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

1 participant