jellyfin / jellyfin-web

Web Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.2k stars 1.17k forks source link

Player halts when playing any transcoded media on webOS 23 #5068

Open lawadr opened 7 months ago

lawadr commented 7 months ago

Describe The Bug

On a new (2023) LG 65" C3 (webOS 23) I am unable to play anything that is transcoded. No matter what the video or audio codec is, if it is coming from an HLS stream via transcoding it won't play correctly.

If I play from the start of the stream, everything works fine. If I skip ahead to an already transcoded time (within the red bar on the server's dashboard), it works fine. But if I skip ahead too far (past the red bar), or just start playing part way through, it bugs out.

When it bugs out, the screen updates to the correct frame, but playback doesn't carry on from that point. If I skip back or forward from then on, the same thing occurs. I can see the correct still frames, but no playback. It's like it's permanently paused. Sometimes I'll hear a couple of seconds of audio before it stops.

Oddly, I see no error in the Jellyfin server logs. The transcoding works fine and continues as normal while the playback has halted in the client. The client's Playback Info shows no dropped or corrupted frames, and the transcoding progress ticks upwards, but only if I repeatedly pause and unpause the stream (while it remains halted on screen).

This behaviour also occurs using the web interface in the webOS browser, so it isn't specific to the webOS client. I can't reproduce this anywhere outside of webOS though.

This issue should be reproducible every time by forcing any sort of transcoding. As I can't seem to find any related bug report for such a common use case, I'm thinking that this is either a regression or a webOS 23 specific issue.

Steps To Reproduce

  1. Find a movie with an image based subtitle track (e.g. PGS or DVDSUB)
  2. Disable the subtitle tracks and play it
  3. Skip ahead half way through the movie and stop (go back to Jellyfin)
  4. Turn on the image based subtitle track and continue playing from where you left off

or...

  1. Play any movie
  2. Skip ahead half way through the movie
  3. Change the quality to something like 720p
  4. Stop (go back to Jellyfin)
  5. Continue playing from where you left off

Expected Behavior

Plays the stream correctly

System

jellyfin-bot commented 3 months ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

lawadr commented 2 months ago

This still occurs. I've found quite a few mentions of this issue, especially in relation to DoVi. It seems to be a problem when the "prefer fMP4" option is enabled. Transcoding seems to work fine with this option turned off.

Here are some related links: https://github.com/jellyfin/jellyfin-webos/issues/208 https://github.com/jellyfin/jellyfin-webos/issues/207 https://github.com/jellyfin/jellyfin-web/issues/3416 https://github.com/jellyfin/jellyfin-web/pull/5553#issuecomment-2119191906 https://github.com/jellyfin/jellyfin/issues/11705#issuecomment-2118725221 https://github.com/jellyfin/jellyfin/issues/11705#issuecomment-2118904780

N8-Yue commented 2 months ago

I get an issue where the webOS client on my 2013 model stopps working correctly whenever it transcodes sth. If I use direct play, i loads perfectly fine.. But when I try to transcode or use an unsupported audio track/subtitle track it stops the image and keeps running fine with the audio but without an imag. This only happens while transcding without giving me any error

https://pastebin.com/fDsBdNt1

Der Prinz aus Zamunda runs fine as it is streaming fine, bur Deadpool or Boss Baby crash as they don't stream directly

Edit: I disabled fMP4 and now all my media works fine.That goes for HDR,DV,SDR and before they did not work

meibensteiner commented 2 months ago

Can confirm. 4K HEVC HDR content was not playing after updating to 10.9.3 until I disabled fMP4 on my LG C1. No errors. Just the usual stand-in art.

orhid commented 2 months ago

can also confirm, the exact same issue, video was not playing on WebOS if transcoded until i disabled fMP4

DCCentR commented 2 months ago

I have similar issue but with video plays as remux (LG SK9500 (WebOS 4.0))

https://forum.jellyfin.org/t-file-playback-stops-with-fmp4-hls-enabled-on-lg-tv-10-9-3

justinlime commented 2 months ago

+1 anything transcoded causes severe playback issues with prefer fMP4 enabled.

Any transcode output will cause this. Observed when encoding to H264, H265, and AV1

Some examples I've noticed:

Jellyfin server version - 10.9.1 LG B2 - Software Version 13.30.60

justinlime commented 2 months ago

Can confirm. 4K HEVC HDR content was not playing after updating to 10.9.3 until I disabled fMP4 on my LG C1. No errors. Just the usual stand-in art.

Do you remember the last working version of jellyfin server where you did not have these errors?

justinlime commented 1 month ago

Given the time frame, it seems to be caused by this commit: https://github.com/jellyfin/jellyfin-web/pull/4916

Hopefully will be resolved here: https://github.com/jellyfin/jellyfin-web/pull/5553

dmitrylyzo commented 1 month ago

If fMP4 doesn't work on your TV, don't enable it. It is currently enabled by default on LG TVs because webOS is also Chrome. No need to wait for #5553 - disable it manually. But it is required for DoVi in TS though.

mfizz1 commented 1 month ago

I too have the same issue. To the point now that unless I watch video from start to finish, I am unable to resume playback. Disabling fMP4 allows at least resumes playback from the same position but about 10-30 seconds later it stops again. There are a couple of threads related to this issue. I have also found disabling subtitles delays the halting.

I really hope #5553 fixes this issue because at the moment my entire library is unplayable.

dmitrylyzo commented 1 month ago

Disabling fMP4 allows at least resumes playback from the same position but about 10-30 seconds later it stops again.

It looks more like the transcoding folder has run out of free space. What is in the ffmpeg logs when it halts? Does the halting item contain Dolby Vision? #5553 is only necessary if you want direct streaming DoVi in TS container.

mfizz1 commented 1 month ago

I have attached all the log files. It indeed has DoVi, It plays for a few seconds then pauses, subtitles continue, then it continues playing albeit it will pause every now and then, and then finally, the screen will just be stuck and this is the end of the logs (appears that jellyfin thinks the stream has been cancelled). Not sure space is an issue, Jellyfin is installed on on its own drive separate to media. Just checked it is showing over 350gb+ available)

Log ffmpeg 2.txt Log ffmpeg 1.txt Log.txt

Just to add, both server and client are on the same network via ethernet. I am sort of direct playing the file through sftp / dlna via another android player and it is playing fine, no stuttering.

dmitrylyzo commented 1 month ago

Not sure space is an issue, Jellyfin is installed on on its own drive separate to media. Just checked it is showing over 350gb+ available)

It looks like it is Docker (I was referring to /config/cache/transcodes/ folder, btw). But never mind, I don't see any "run out of free space" errors in the logs.

Moreover, it is already remuxing to TS, so you have #5553 virtually applied (disabled fMP4 and probably disabled video transcoding).

We need to see what is happening on the client side.

lawadr commented 1 month ago

I have attached all the log files. It indeed has DoVi, It plays for a few seconds then pauses, subtitles continue, then it continues playing albeit it will pause every now and then, and then finally, the screen will just be stuck and this is the end of the logs (appears that jellyfin thinks the stream has been cancelled). Not sure space is an issue, Jellyfin is installed on on its own drive separate to media. Just checked it is showing over 350gb+ available)

Log ffmpeg 2.txt Log ffmpeg 1.txt Log.txt

Just to add, both server and client are on the same network via ethernet. I am sort of direct playing the file through sftp / dlna via another android player and it is playing fine, no stuttering.

I think I hit this issue earlier in the week. It wasn't due to running out of space for the transcode and it also wasn't a network speed issue. I ended up having to manually remux to mp4 in order to direct play and avoid Jellyfin doing anything.

When I get time I'll try to debug this issue if no one else has figured it out by then.

ammgws commented 1 month ago

I just created two new installations of Jellyfin, one with v10.8.13 and the other with v10.9.6. Both running in containers with no hardware acceleration for transcoding. Tried with both fMp4 on and off.

I tested with one file that requires transcoding with both versions - a mkv container with H264 and VORBIS. I think the audio is what triggers the transcode.

v10.8.13 was able to play the file with no issues while transcoding.

v10.9.6 basically freezes up as reported here. Sometimes I can get the playback info overlay to show and the contents are exactly the same as v10.8.13.

Have not had a chance to grok logs yet.

This only happens with WebOS client - browser on PC works fine.

EDIT: my specific issue was due to Prefer fMP4-HLS Media Container being turned on after the update to v10.9.7. Disabling it solved my issues.

mfizz1 commented 1 month ago

Moreover, it is already remuxing to TS, so you have #5553 virtually applied (disabled fMP4 and probably disabled video transcoding).

I have disabled fMp4 but I haven't disabled video transcoding (not actively)

We need to see what is happening on the client side.

Happy to provide but I cannot seem to find any options on the app on TV for logs