mpv-android icon indicating copy to clipboard operation
mpv-android copied to clipboard

AV1 gpu-next color plane rotated 180° in playback

Open faustaahmad opened this issue 1 year ago • 14 comments

Important information

Android version: 11 mpv-android version: 2023-11-30-release / 8033 (latest november 2023 release)

Description

Just enable gpu-next then play AV1 video wih SW decoder Video used E09 Yuru Yuri (Trix's release)

gpu-next (landscape only)
playback paused

Additional information

# mpv.conf
no-deband
cache=no
demuxer-readahead-secs=60
dither=no
vd-queue-enable=yes
vd-queue-max-bytes=1000MiB
vd-queue-max-samples=36000
vd-queue-max-secs=60

# Language & subtitles
sub-visibility=yes
alang=jp,jpn,ja,en,eng
slang=jp,jpn,ja,en,eng

# Subtitle
demuxer-mkv-subtitle-preroll=yes
sub-auto=fuzzy
audio-file-auto=fuzzy
sub-file-paths=ass:srt:sub:subs:subtitles
embeddedfonts=yes
sub-fix-timing=no
sub-ass-force-style=Kerning=yes

# Scaling
scaler-resizes-only=no
linear-downscaling=yes
correct-downscaling=yes
sigmoid-upscaling=yes

scale=bilinear
dscale=spline16
cscale=bilinear

# Antiring
scale-antiring=0
dscale-antiring=0
cscale-antiring=0

faustaahmad avatar Dec 21 '23 15:12 faustaahmad

Both your screenshots are from gpu-next. Are you sure it's not another option doing this?

Can't reproduce here either.

sfan5 avatar Dec 21 '23 16:12 sfan5

Potrait mode work fine though Landscape mode caused the problem on my side Video resolution is 720p, while my phone still using 720p display too

Tried: Blank mpv.conf - same problem occur Changing scaling filter in "Video" settings - same problem occur Enable Low quality decoding - same problem occur 480p AV1 video (sw upscaled by mpv to 720p) - no problem in both potrait/landscape 1080p AV1 video (sw downscaled by mpv to 720p) - no problem in both potrait/landscape 720p AV1 video (same & different encoder, 2 video) - potrait fine, landscape has this issue

Idk how to grab logcat without computer or root

faustaahmad avatar Dec 21 '23 17:12 faustaahmad

Idk how to grab logcat without computer or root

Me neither but without the log there's no chance at investigating this.

sfan5 avatar Dec 23 '23 10:12 sfan5

cmd_LecpCAlsm9 Tried to grab the logcat (my device didnt hv root) Enable USB debugging & connect to laptop Then I used adb logcat -s 'mpv:*' '*:F' and it doesnt output anything other than "Beginning of crash or system or main" Tried using different usb cable & still same

This bug seems to only happen on my device with gpu-next, AV1, and same resolution as my screen (720p) Other than that, it's fine even with gpu (gpu-next disabled)

faustaahmad avatar Jan 03 '24 07:01 faustaahmad

If adb logcat also prints nothing then your device does not expose any debug info.

sfan5 avatar Jan 03 '24 08:01 sfan5

Tried with this app, but still doesnt output any log for mpv until I enabled some random debugging settings inside dev options (that idk what it'll change) Also tried with my laptop too after those random dev options that I have enabled, but it still spit out nothing 🙃 So here we go my logcat.txt but I cant use the command, sorry if it's noisy Hope this'll help

faustaahmad avatar Jan 03 '24 09:01 faustaahmad

This also happens to me.

Some Device Info:

Xiaomi Redmi Note 8 Pro, Android 14 AOSP. mpv-android 2023-11-30-release

Configuration info

The only things i changed from installing mpv-android are Enabled gpu-next mpv.conf:

vf=format=yuv420p

Episode 3 of MTBB'S Release

Video of it happening

abdallahmehiz avatar Jan 17 '24 11:01 abdallahmehiz

As it turns out this seems to affect certain AV1 videos and not all. I can also reproduce it myself now (w/ the FOSDEM recordings).

sfan5 avatar Feb 07 '24 16:02 sfan5

For some reason, using any video aspect in the settings and even using the property video-aspect-override to an aspect ratio different from the video's original fixed this for me.

abdallahmehiz avatar Jul 23 '24 23:07 abdallahmehiz

For some reason, using any video aspect in the settings and even using the property video-aspect-override to an aspect ratio different from the video's original fixed this for me.

The bug only occur if the the video isnt up/downscaled Also if aspect ratio set to different value, it's working properly but... need to do it manually and it wont look as good as with original aspect ratio

faustaahmad avatar Jul 24 '24 17:07 faustaahmad

it wont look as good as with original aspect ratio

You can try making it unnoticeable like 1920/1081 or something like that

abdallahmehiz avatar Jul 24 '24 17:07 abdallahmehiz

Here's better solution to the problem without sacrificing aspect ratio that much, thanks for the idea

# change height to your native device
[av1 fix rotate]
profile-cond=get("video-dec-params/codec")==av1 and get("height")==720
video-scale-x=0.999999

faustaahmad avatar Jul 24 '24 17:07 faustaahmad

Here's better solution to the problem without sacrificing aspect ratio that much, thanks for the idea

video-scale-x=0.99999
video-scale-y=0.99999

~~Shouldn't changing only one of these fix it? :sweat_smile: Why change both?~~

abdallahmehiz avatar Jul 24 '24 17:07 abdallahmehiz

simpler workaround: vd-lavc-film-grain=cpu

sfan5 avatar Aug 08 '24 09:08 sfan5

The workaround is now enabled by default.

sfan5 avatar Sep 17 '24 16:09 sfan5