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

Internal mpv-android player does not play HEVC 10 bit on Findroid #176

Closed
AnonymousWebHacker opened this issue Oct 16, 2022 · 20 comments
Closed
Labels
bug Something isn't working

Comments

@AnonymousWebHacker
Copy link
Contributor

I have problems, with some HEVC videos.

NO WORK

Codec: HEVC
Profile: Main 10
Level: 93
Resolution: 1280x640
Aspect ratio: 2:1
Interlaced: No
Framerate: 23.976025
Bitrate: 886 kbps
Bit depth: 10 bit
Video range: SDR
Video range type: SDR
Color space: bt709
Color transfer: bt709
Color primaries: bt709
Pixel format: yuv420p10le
Ref frames: 1

WORKING

Codec: HEVC
Profile: Main
Level: 93
Resolution: 1280x720
Aspect ratio: 16:9
Interlaced: No
Framerate: 23.976025
Bitrate: 736 kbps
Bit depth: 8 bit
Video range: SDR
Video range type: SDR
Color space: bt709
Color transfer: bt709
Color primaries: bt709
Pixel format: yuv420p
Ref frames: 1

The difference is in [Pixel format: yuv420p10le] or may be [Bit depth: 10 bit].

I tried with another external player (MX Player) and it plays the video without problems, to which I came to the conclusion that findroid, does it need the codec for that [Pixel format: yuv420p10le], right?

@AnonymousWebHacker AnonymousWebHacker added the bug Something isn't working label Oct 16, 2022
@AnonymousWebHacker AnonymousWebHacker changed the title HEVC Problems Pixel format: yuv420p10le Findroid player does not play HEVC 10 bit [Pixel format: yuv420p10le] Oct 18, 2022
@AnonymousWebHacker
Copy link
Contributor Author

AnonymousWebHacker commented Oct 18, 2022

[UPDATE]

I just used mpv-android , and it can play HEVC 10 bit videos perfectly.

In findroid, I am using the MPV and the videos are lagged/frozen.

I think findroid is incorrectly using libmpv

Device : Redmi 9A (dandelion)
Android: 11 MIUI 12.5.18
Findroid Version: lasted

@AnonymousWebHacker AnonymousWebHacker changed the title Findroid player does not play HEVC 10 bit [Pixel format: yuv420p10le] mpv-android player does not play HEVC 10 bit on Findroid [Pixel format: yuv420p10le] Oct 18, 2022
@AnonymousWebHacker AnonymousWebHacker changed the title mpv-android player does not play HEVC 10 bit on Findroid [Pixel format: yuv420p10le] Internal mpv-android player does not play HEVC 10 bit on Findroid Oct 18, 2022
@AnonymousWebHacker
Copy link
Contributor Author

AnonymousWebHacker commented Oct 23, 2022

Situation:

There are several devices, which support transcoding at the hardware level.

Other devices cannot transcode at the hardware level, and this is where the codecs used by mpv-android, mxplayer ..etc come into play (they activate the transcoding at the software level)

When testing with both devices, using mpv-android , mxplayer, exoplayer ..etc, they worked perfectly so far.

BUT [Update]

In testing other devices with support only for software level encoding like Samsung Tab A7, the mpv build inside findroid works perfect. (that is, if it works for some devices)

Everything seems to indicate that the build of mpv and explayer used in findroid for som devices, have some problem in detecting the transcoding of devices, which only support at the software level

This error is the cause of so many issues of playback problems, sockets, etc.

Most of these errors are due to using H265/HEVC videos, or AV1, or AV9 in 10 bit (one of the highest transcoding requirements)

@AnonymousWebHacker
Copy link
Contributor Author

AnonymousWebHacker commented Oct 24, 2022

Update

I tried a build made by a user of jellyfin android + mpv , and it works great. It would be necessary to check what is different about that mpv to the findroid

Jellyfin Test
https://github.com/NIK679/jellyfin-android/releases

PTR mpv used
jellyfin/jellyfin-android#475

@jarnedemeulemeester
Copy link
Owner

Okay so I have the same problem on my device (PIxel 6). Using mpv, if I force software decoding, all 10-bit files (only tested H.264 and HEVC) are very laggy.

The build of mpv you used in the jellyfin-android+mpv build is using an older build of libmpv. This older version does not have that issue. I only noticed this in newer versions. Findroid, as you may guess, uses a newer version of libmpv.
Now the strange part is that the newest version of mpv-android does not have this issue.
The build of libmpv used in Findroid is almost exactly the same as the one in mpv-android.

One thing I don't want to do is downgrade to a previous version of libmpv. I would rather fix the issue.

I also plan on making the libmpv library available on GitHub so that other people can also contribute and help with issues.

So the main issue is:
All 10-bit content fails to play correctly on mpv using software decoding.
Am I correct in saying this?

@AnonymousWebHacker
Copy link
Contributor Author

AnonymousWebHacker commented Oct 26, 2022

All 10-bit content fails to play correctly on mpv (findroid build) using software decoding.

@jarnedemeulemeester By the way, the problem will also close many issues with H264/H265 10 bit

@AnonymousWebHacker
Copy link
Contributor Author

AnonymousWebHacker commented Oct 26, 2022

@jarnedemeulemeester
Copy link
Owner

@jarnedemeulemeester Findroid are using https://github.com/mpv-android/mpv-android ?

No, Findroid is using a slightly modified version of https://github.com/CarlosOlivo/mpv-android/tree/libmpv

@AnonymousWebHacker
Copy link
Contributor Author

@jarnedemeulemeester Findroid are using https://github.com/mpv-android/mpv-android ?

No, Findroid is using a slightly modified version of https://github.com/CarlosOlivo/mpv-android/tree/libmpv

There are chances to test a beta with https://github.com/mpv-android/mpv-android ?
It is more updated

@jarnedemeulemeester
Copy link
Owner

Well, https://github.com/CarlosOlivo/mpv-android/tree/libmpv is just changes made on https://github.com/mpv-android/mpv-android
I took those changes and applied them myself with updated dependencies.
So the build in Findroid is already more up to date.

But don't worry, I am testing different versions to find out where the problem lies.

@jarnedemeulemeester
Copy link
Owner

After searching around the internet for people with a simular issue I found out that mpv-android also had this exact problem.
The fix is to disable vd-lavc-dr mpv-android/mpv-android@ffd1e8f
I will apply the same option to mpv in Findroid.

@AnonymousWebHacker
Copy link
Contributor Author

Looking forward to the new build :)

jarnedemeulemeester added a commit that referenced this issue Nov 4, 2022
@AnonymousWebHacker
Copy link
Contributor Author

@jarnedemeulemeester When will there be a new release?

@jarnedemeulemeester
Copy link
Owner

When I'm done implementing user switching. New release should be this month.

@AnonymousWebHacker
Copy link
Contributor Author

Is there any possibility to test a beta or prebuild , to check the mpv changes?

@AnonymousWebHacker
Copy link
Contributor Author

AnonymousWebHacker commented Nov 21, 2022

OMG Fixeddd Tnks :) @jarnedemeulemeester

Observation: Findroid tries to play the videos with exoplayer, and it is not capable of playing the HEVC 10 bit, now with the MPV option, if it allows to play the videos correctly.

For people not very skilled in options, I think findroid should recognize when it can't play with exoplayer, and should activate mpv automatically

@jarnedemeulemeester
Copy link
Owner

Maybe in the future. But for now the mpv player is still experimental

@AnonymousWebHacker
Copy link
Contributor Author

@jarnedemeulemeester
Copy link
Owner

@AnonymousWebHacker I have already updated ExoPlayer to 2.18.2. It's in the main branch already...

I also have set up a GitHub bot which automatically creates pull requests for dependency updates so no need to ping me :)

@AnonymousWebHacker
Copy link
Contributor Author

AnonymousWebHacker commented Mar 17, 2023

@jarnedemeulemeester I am reproducing this error on other devices.

It was fixed for low ranges like Redmi 9A, I go to settings, enable mpv and the transcoding at the software level works perfectly.

However, in slightly higher range devices such as Samsungs, with 4 GB of RAM, and with native support for transcoding at the hardware level, they will not work with exoplayer, nor with mpv. [does not work for hevc 10bit]

I will make a more detailed report in the following hours

@AnonymousWebHacker
Copy link
Contributor Author

@jarnedemeulemeester
Device: Xiaomi Redmi Note 11 4G
RAM: 4 gb RAM
CPU: Mediatek Helio G88
Android: 11

Exoplayer
Supposedly it has hardware-level decoding, it's a good micro, 4 gb of ram, and a high-end cell phone, so to speak. However exoplayer is not able to play HEVC 10Bit

mpv options
With the mpv option enabled, it plays, but without video, only the audio is heard

others mpv options
I tried changing the Hardware Decoding no, mediacodec and mediacodec-copy
I also tried changing the video output to gpu-next and the same results
(Either it plays without video, or it plays slowly, as if it were a lot of quality for that device.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants