Archlinux on Rock5b

Yes, I have put the hwdec=rkmpp etc. flags to mpv.conf. The decoding just fails if trying to play youtube videos. And when using ffmpeg-mpp I have actually deprioritized the hardware codecs from ffmpeg-mpp source because they were giving problems with firefox, and using vd=h264_rkmpp_decoder… parameter to force their use with mpv, as for some reason using hwdec=rkmpp then with ffmpeg-mpp causes mpv to freeze at the end of the video, requiring killing it.

Lines from verbose log that seem to have some relevance to the issue:

[vd] Container reported FPS: 30.000000
[vd] Codec list:
[vd] h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[vd] h264_v4l2m2m (h264) - V4L2 mem2mem H.264 decoder wrapper
[vd] h264_qsv (h264) - H264 video (Intel Quick Sync Video acceleration)
[vd] h264_rkmpp (h264) - Rockchip MPP (Media Process Platform) H264 decoder
[vd] Opening decoder h264
[vd] Looking at hwdec h264_rkmpp-rkmpp…
[vo/gpu] Loading hwdec drivers for format: ‘drm_prime’
[vo/gpu] Loading hwdec driver ‘drmprime’
[vo/gpu/drmprime] using EGL dmabuf interop
[vo/gpu/drmprime] Using DRM device: /dev/dri/renderD128
[ffmpeg] AVHWDeviceContext: Opened DRM device /dev/dri/renderD128: driver rockchip version 3.0.0.
[vo/gpu] Loading hwdec driver ‘drmprime-overlay’
[vo/gpu/drmprime-overlay] Failed to retrieve DRM fd from native display.
[vo/gpu] Loading failed.
[vd] Trying hardware decoding via h264_rkmpp-rkmpp.
[vd] Using underlying hw-decoder ‘h264_rkmpp’
[ffmpeg] h264_mp4toannexb: The input looks like it is Annex B already
[vd] Pixel formats supported by decoder: drm_prime nv12
[vd] Codec profile: Main (0x4d)
[vd] Hardware decoding of this stream is unsupported?
[vd] Requesting pixfmt ‘nv12’ from decoder.
[ffmpeg/video] h264_rkmpp: Format nv12 chosen by get_format().
[ffmpeg/video] h264_rkmpp: Created a RKMPP hardware device
[vd] Selected codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[ffmpeg] detected 8 logical cores
[vf] User filter list:
[vf] scale_rkrga (scale_rkrga.00)
[cplayer] Starting playback…
[ffmpeg/video] h264_rkmpp: Decoder could not get packet, retrying
[ffmpeg/video] h264_rkmpp: Decoder flushing
[vd] Attempting next decoding method after failure of h264_rkmpp-rkmpp.
[vd] Skipping previously attempted hwdec: h264_rkmpp-rkmpp
[vd] Using software decoding.

Could you send the whole command of mpv so that i can try to reproduce?

[ffmpeg/video] h264_rkmpp: Format nv12 chosen by get_format().

This looks suspicous, should have been drm prime

It seems that the problem only appears with live streams (and maybe recently ended live streams before the standard formats become available).

For example:

mpv --config=no --hwdec=rkmpp --vd-lavc-o=afbc=on --vf=scale_rkrga=force_yuv=8bit --ytdl-format=95/94 “https://youtu.be/BJ3Yv572V1A

thanks for the feedback, reproduced the error, i think this might be related to recent update of mpp, let me work on it if there is an easy fix.

@nyanmisaka

dmesg

Feb 12 20:14:25 alarm rtkit-daemon[782]: Supervising 0 threads of 0 processes of 0 users.
Feb 12 20:14:25 alarm rtkit-daemon[782]: Supervising 0 threads of 0 processes of 0 users.
Feb 12 20:14:25 alarm rtkit-daemon[782]: Supervising 0 threads of 0 processes of 0 users.
Feb 12 20:14:25 alarm rtkit-daemon[782]: Failed to look up client: No such file or directory
Feb 12 20:14:28 alarm kernel: mpp_rkvdec2 fdc48100.rkvdec-core: resetting...
Feb 12 20:14:28 alarm kernel: mpp_rkvdec2 fdc48100.rkvdec-core: reset done
Feb 12 20:14:28 alarm kernel: mpp_rkvdec2 fdc38100.rkvdec-core: resetting...
Feb 12 20:14:28 alarm kernel: mpp_rkvdec2 fdc38100.rkvdec-core: reset done
Feb 12 20:14:28 alarm kernel: mpp_rkvdec2 fdc48100.rkvdec-core: resetting...
Feb 12 20:14:28 alarm kernel: mpp_rkvdec2 fdc48100.rkvdec-core: reset done
Feb 12 20:14:28 alarm kernel: mpp_rkvdec2 fdc38100.rkvdec-core: resetting...
Feb 12 20:14:28 alarm kernel: mpp_rkvdec2 fdc38100.rkvdec-core: reset done
Feb 12 20:14:28 alarm kernel: mpp_rkvdec2 fdc48100.rkvdec-core: resetting...
Feb 12 20:14:28 alarm kernel: mpp_rkvdec2 fdc48100.rkvdec-core: reset done
Feb 12 20:14:28 alarm kernel: mpp_rkvdec2 fdc38100.rkvdec-core: resetting...
Feb 12 20:14:28 alarm kernel: mpp_rkvdec2 fdc38100.rkvdec-core: reset done

ffmpeg

[ffmpeg/video] vp9_rkmpp: Received a 'errinfo' frame
[ffmpeg/video] vp9_rkmpp: Decoder could not get packet, retrying
[ffmpeg/video] vp9_rkmpp: Decoder could not get packet, retrying
[ffmpeg/video] vp9_rkmpp: Wrote 2576 bytes to decoder
[ffmpeg/video] vp9_rkmpp: Received a 'errinfo' frame
[ffmpeg/video] vp9_rkmpp: Decoder could not get packet, retrying
[ffmpeg/video] vp9_rkmpp: Decoder could not get packet, retrying
[ffmpeg/video] vp9_rkmpp: Wrote 2089 bytes to decoder
[ffmpeg/video] vp9_rkmpp: Received a 'errinfo' frame
[ffmpeg/video] vp9_rkmpp: Decoder could not get packet, retrying
[ffmpeg/video] vp9_rkmpp: Decoder could not get packet, retrying
[ffmpeg/video] vp9_rkmpp: Wrote 2569 bytes to decoder
[ffmpeg/video] vp9_rkmpp: Received a 'errinfo' frame
[ffmpeg/video] vp9_rkmpp: Decoder failed to get frame: -542398533

to reproduce

mpv --msg-level=ffmpeg=trace --profile=fast --config=no --hwdec=rkmpp https://www.youtube.com/watch?v=aqz-KE-bpKQ

happens on vp9 decoder with pther files as well
even crashes the kernel

https://github.com/rockchip-linux/mpp/commit/5cb29df8d369e0d0b42797a7132d365820fd4046 is the culprit.

1 Like

exactly what i was thinking, i am reverting to 1.0.3 in repo, though there might be another problem in format selection of ffmpeg as well.

for the mpp issue i have downgraded the repos.
for the youtube case of mpv, it really looks like an mpv issue, however i think it would be beneficial to have such a workaround in PR @nyanmisaka

@meadows
if the PR is merged,

then you can do a agr update and run mpv with --vd-lavc-o=afbc=on,forcedrm=on option so that mpv will pickup the right hw format.

I Changed to agr.

Now I have this error with smplayer and mpv with ffmpeg-rockchip-git.

[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: moov atom not found

[lavf] avformat_open_input() failed

Failed to recognize file format.

E

Could you give me a command i can reproduce?

smplayer parameter,
-config=no -hwdec=rkmpp -hwdec-codecs=all -gpu-api=opengl
file downloaded from youtube

Never tried smplayer yet, does it also happen in m0v?

Same result with mpv.
smplayer is just GUI frontend for mplayer and mpv.
It worked bfore with ffmpeg-mpp
regards
uli

1 Like

mpv now works after update of repo.
Still have a problem to install chromium-mpp.
Got error
Can not find package ibv4l-rkmpp
any advise
regards
uli

Chromium-mpp can be installled from binary repo, there is no need to install it from agr, it takes so much time to compole it, and there is no specific improvement in agr

Btw, anyone knows why KDE Plasma freezes randomly on Arch Linux?

Whenever it happens I need to run
killall plasmashell && kstart plasmashell

Updates: This seems only happened on Wayland

It freezes to me on Ubuntu all the time too. Because it has been happening so often, I set up the keyboard shortcut to restart the plasmashell. I read somewhere that freezing plasmashell is quite common for years already.

I would like to know if there is any solution for this too.

1 Like

An alternative that is working fairly good with with Wayland is cinnamon de. They now have the option available and its pretty stable.

1 Like

Cinnamon wayland is my favorit. The only problem I have , I cannnot change to german keyboard layout. Any help ?
Uli

RKBSP Kernel 6.1
Graphics … X11 works, apps in Wayland does not launch.
No WiFi and Bluetooth yet (RTL8852BE).

1 Like

I could not find installable Kodi package for rock 5b , are there any alternative repos for kodi mpp?
thanks