plexinc / plex-media-player

Next generation Plex Desktop/Embedded Client
GNU General Public License v2.0
1.16k stars 170 forks source link

Can't resume playback of a HEVC/H.265 file when using Hardware Decoding #960

Closed alexandrevryghem closed 3 years ago

alexandrevryghem commented 4 years ago

Test environment

PMS Version: 1.19.1.2645-ccb6eb67e (installed on Windows 10 x64) PMP Version: 1.8.2.1192-89432618 (on Windows 10 x64) Platform: Windows 10

Steps to reproduce

It always happens when I try resuming a H.265 encoded video.

Current behavior

When I try to watch an episode/movie and I select Resume from last position and the episode/movie is a H.265 file the playback never starts. When I try to close the player, put it on pause, … the plex app crashes but when I select Start from Beginning and then manually set it on the right time the playback starts.

Expected behavior

It should just play

error.zip Plex.log Plex Media Server Logs_2020-04-14_20-02-45.zip

mseeley commented 4 years ago

Hi @r0747249 👋 thanks for the logs and demo video.

It appears that it could be a decoder hang:

2020-04-27T00:31:59.264 [ DEBUG ] mkv: seek done 
2020-04-27T00:31:59.285 [ DEBUG ] vd: Pixel formats supported by decoder: dxva2_vld d3d11va_vld d3d11 cuda yuv420p10le 
2020-04-27T00:31:59.285 [ DEBUG ] vd: Codec profile: Main 10 (0x2) 
2020-04-27T00:31:59.285 [ DEBUG ] vd: Requesting pixfmt 'dxva2_vld' from decoder.

After the above there are no more player activity logs.

Do any of these avoid the crash?

alexandrevryghem commented 4 years ago

When I disable hardware decoding I can resume HEVC files but this is only in the latest update not the 1.9 pre-release build I don't know if you fixed the issue. These were the log files of the pre-release build. logs.zip

mseeley commented 4 years ago

Hi @r0747249, we did make some changes to the player but weren't expecting a fix for this specifically. I've added this an internal issue to validate hwdec handling.

If you're interested in investigating we could make use of a sample file: https://support.plex.tv/hc/en-us/articles/201035968-Generating-Sample-Files-from-Media that reproduces the problem. If you'd like to share the original file instead (via Google Drive or similar hosting) then you can send me a message via our forums: https://forums.plex.tv/u/mattseeley/

alexandrevryghem commented 4 years ago

Hi @mseeley, this is the sample file you requested: black_widow.zip

Steps to reproduce

  1. Play the file
  2. Close the file after playback has reached 1 minute
  3. Try to play the file again by clicking Resume from x:xx
  4. The app doesn't respond anymore and if I click on a button the app crashes
alexandrevryghem commented 4 years ago

Is there any update on this issue?

chrisallen commented 4 years ago

I tried to reproduce this on my ApolloLake NUC running Windows 10 and I can resume HEVC video with and without HW decoding enabled. Could you try again using Plex Desktop 1.12?

alexandrevryghem commented 4 years ago

I used the plex desktop app and I still can't resume the files when hardware encoding is enabled (I test it every time there is a new update so when it will be fixed I will close this thread). I tried it on different laptops and they all had the same problem :/

alexandrevryghem commented 4 years ago

I saw that you guys updated the mpv so I tested it again but it still doesn't work 😕. Here are the logs from when he is buffering and where he finally crashes. I also made these logs, here I didn't click on resume playback but on start from beginning and then I manually changed the time (this doesn't crash), I hoped you could maybe compare the logs and find the bug idk 😛

mseeley commented 3 years ago

Apologies @alexandrevryghem that we weren't able to figure this one out. :(

alexandrevryghem commented 3 years ago

It doesn't happen on my new laptop so it doesn't bother me that much and I told the other users on my server to disable hardware encoding