mpv icon indicating copy to clipboard operation
mpv copied to clipboard

Video rotate not working with mpv rkmpp

Open Adegres opened this issue 6 years ago • 2 comments

mpv version and platform

mpv - 0.28.0-1ayufan5 for Rock64 Armhf from the ppa:ayufan/rock64-ppa. I understand this isn't the newest version, but there really don't seem to be any changes to the functionality for this issue. The issue also persists on TinkerBoard S armhf.

Reproduction steps

mpv --vo-gpu --gpu-api=opengl --gpu-context=drm --gpu-hwdec-interop=drmprime-drm --hwdec=rkmpp --keep-open --video-rotate=0 On a 1080x1920 or any portrait video, or mpv --vo-gpu --gpu-api=opengl --gpu-context=drm --gpu-hwdec-interop=drmprime-drm --hwdec=rkmpp --keep-open --video-rotate=90 On a 1920x1080 or any landscape video

Expected behavior

The video is rotated.

Actual behavior

Black screen in this case, and an error message for each frame: [vo/gpu/drmprime-drm] Failed to create framebuffer on layer 0.

Log file

https://0x0.st/zc8l.txt

Adegres avatar Apr 29 '19 16:04 Adegres

Since the video frame is rendered as overlay in this case, someone would have to dive the code and determine how rotated DRM overlays can be created.

Or alternatively, if there's a good way yet to makle rkmpp surfaces as textures, and remove the overlay code.

ghost avatar Oct 24 '19 10:10 ghost

Yeah, the Rockchip display controller can’t do rotation. DRM/KMS won’t do it via a copy either: if the hardware doesn’t support it (which is iirc exposed as a plane property), then it must be done by the post-processor, which IIRC mpp can handle.

fooishbar avatar Sep 12 '22 17:09 fooishbar