Git master (https://github.com/mpv-player/mpv/commit/a5f53da229f0f3f5b7e248c47061a67f6d61d81e)
Raspberry Pi 3 - Buildroot image with patches:
0004-rpi-compile-fix.patch.txt
0003-gpu.patch.txt (Recently merged)
0002-fix-powerpc64-altivec.patch.txt
0001-wscript-don-t-check-for-fork-on-POSIX-checks.patch.txt
Issue additionally occurs on 0.27.0.
Play any h264 encoded video on the Raspberry Pi with the gpu video output driver enabled.
mpv --vo=gpu FILE
This is using the Raspberry Pi userland drivers, not vc4.
To be able to see the video that is being played. The rpi driver does not have this issue.
The subtitles and the OSD are both displayed on the screen, but the video itself is not displayed.

Frame drops still occur when subtitles and OSD is displayed, just like with the rpi video output driver.
Any h264 encoded video file. Other video files were not tested, but may be able to reproduce the issue.
Did you try what I told you to try?
Yes, I did that yesterday and made a comment here.
Then take it up with the firmware maintainers. From what I can tell we're actually decode some video and are giving it the mmal video output video, so it's expected to work.
Looking at hwdec_rpi.c and vo_rpi.c, I think mpv does the same (or at least there is some resemblance) in the rpi video out driver too.
The layer used to configurable, but with gpu it seems that the layer is set automatically here. The default layer is 0, but with rpi the default layer was -10. Unsure why the magic number -10 was used.
I will have a more thorough look later.
Setting the layer to -10 here didn't make any difference.
I will continue to use the rpi video output driver in the meantime.
Edit: I deleted a comment after this one since it meant for a different issue. Apologies.
Setting hwdec to none works, the video is displayed on the screen. So the issue only occurs when using --vo=gpu --hwdec=mmal.
@wm4 Are you positive its a firmware issue? Using 7428272f93 with the mpv commandline:
./mpv -v --hwdec=mmal --vo=gpu ~/test.mp4
Listing DISPMANX layers using
/opt/vc/bin/vcgencmd dispmanx_list
I see:
display:2 format:RGBA32 transform:20000 layer:0 src:0,0,853,480 dst:213,120,853,480 cost:563 lbm:0
In comparison to mpv 2.4.2 --hwdec=rpi --vo=rpi i get this:
display:2 format:YUV_UV transform:0 layer:-9 src:0,0,720,480 dst:0,0,1920,1080 cost:1216 lbm:12288
display:2 format:RGBA32 transform:20000 layer:1 src:0,0,1920,1080 dst:0,0,1920,1080 cost:1156 lbm:0
These are done with a blanked console, so you don't see the console layer showing up.
I was able to use GPU with --vo=gl --hwdec=rpi on mpv-0.26.0, ffmpeg-master. although SDL example doesn't work.
platform: RPI3-Raspbian-lite (stretch) with openbox.
I have the same (?) problem on an old Model B Rev 2 running Raspbian Buster.
With --hwdec=mmal-copy instead of --hwdec=mmal I can actually see the video, but this leads to lots of frame drops and A/V go completely out of sync.
$ mpv --hwdec=mmal video.mkv
…
Using hardware decoding (mmal).
AO: [alsa] 48000Hz stereo 2ch s16
VO: [gpu] 854x480 mmal
[vo/gpu] Using HW-overlay mode. No GL filtering is performed on the video!
AV: 00:00:03 / 00:01:24 (4%) A-V: 0.000 Dropped: 1
vs.
$ mpv --hwdec=mmal-copy video.mkv
…
Using hardware decoding (mmal-copy).
AO: [alsa] 48000Hz stereo 2ch s16
VO: [gpu] 854x480 yuv420p
AV: 00:00:03 / 00:01:24 (4%) A-V: 0.077 Dropped: 72
By the way: It works with omxplayer.
$ ldd ./omxplayer.bin | grep -iE gl\|mmal
libbrcmGLESv2.so => /opt/vc/lib/libbrcmGLESv2.so (0xb6ed9000)
libbrcmEGL.so => /opt/vc/lib/libbrcmEGL.so (0xb6ea0000)
libmmal_core.so => /opt/vc/lib/libmmal_core.so (0xb4de7000)
libmmal_util.so => /opt/vc/lib/libmmal_util.so (0xb4dc7000)
libmmal_vc_client.so => /opt/vc/lib/libmmal_vc_client.so (0xb4dac000)
$ ldd ./mpv | grep -iE gl\|mmal
libbrcmEGL.so => /opt/vc/lib/libbrcmEGL.so (0xb5b4d000)
libbrcmGLESv2.so => /opt/vc/lib/libbrcmGLESv2.so (0xb5b28000)
libmmal.so => /opt/vc/lib/libmmal.so (0xb594d000)
libmmal_core.so => /opt/vc/lib/libmmal_core.so (0xb592f000)
libmmal_util.so => /opt/vc/lib/libmmal_util.so (0xb590f000)
libmmal_vc_client.so => /opt/vc/lib/libmmal_vc_client.so (0xb58f4000)
libEGL.so.1 => /usr/lib/arm-linux-gnueabihf/libEGL.so.1 (0xb517d000)
libGL.so.1 => /usr/lib/arm-linux-gnueabihf/libGL.so.1 (0xb4f6a000)
libmmal_components.so => /opt/vc/lib/libmmal_components.so (0xb4af5000)
libGLX.so.0 => /usr/lib/arm-linux-gnueabihf/libGLX.so.0 (0xb464c000)
libGLdispatch.so.0 => /usr/lib/arm-linux-gnueabihf/libGLdispatch.so.0 (0xb45bb000)
libwayland-egl.so.1 => /usr/lib/arm-linux-gnueabihf/libwayland-egl.so.1 (0xb4342000)
Most helpful comment
I have the same (?) problem on an old Model B Rev 2 running Raspbian Buster.
With
--hwdec=mmal-copyinstead of--hwdec=mmalI can actually see the video, but this leads to lots of frame drops and A/V go completely out of sync.vs.
By the way: It works with
omxplayer.