Jellyfin Forum
SOLVED: Hanging in Linux Only - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: Hanging in Linux Only (/t-solved-hanging-in-linux-only)



Hanging in Linux Only - mdkb - 2024-06-17

I have a laptop and installed Jellyfin on Windows 10. Worked perfectly for weeks, no delay when playing anything.

I am now using dual-boot on the system with a plan to migrate away from windows 10. It has Debian 12 on the other partition with latest updates and Jellyfin downloaded using the method recommended here (just changing it to ffmpeg6) https://linuxcapable.com/how-to-install-jellyfin-media-server-on-debian-linux/

I quickly noticed a problem in Linux with the video hanging and totally refusing to play on some movies. I traced it - so far - to happening when some PGSSub subtitles are embedded in the mkv file (it probably happens on others too, I just havent tested it fully yet as I ran into this problem).

I checked the logs and initially it wasnt even creating ffmpeg logs, or adding entries to the main log, it just wheel-spinned trying to do something that never happened.

I stopped subtitles automatic playing, and was able to play the video, but when I tried to add the subtitles again it went wonky and refused to play.

I then checked the logs again, in there saw it was transcoding , or trying to, coz it never finished even if I left it for ages. In the ffmpeg logs I saw it said it did not recognise the PGSsub subtitle streams, only the srt one, which I wanted anyway.  But this same movie works fine with exact same settings in Jellyfin on the very same lappy in windows 10. I checked transcoding settings and setups and matched them between systems, but still nothing fixed this issue.

As a test I ffmpeg'd the subtitles I wanted out to an mkv file, then used ffmpeg to wipe all the embedded subtitles and then it runs fine with external subs as srt.

Any ideas on what might fix this, or am I going to have to rip the subtitles out of all my mkv files to make them work in Debian 12 version of Jellyfin? I have looked for solutions but everyone talks about it being hardware transcoding but I think my test proves it isnt that, its got an issue only in Linux with certain embedded subtitles.


RE: Hanging in Linux Only - TheDreadPirate - 2024-06-18

What are the hardware specs? And can you share your full jellyfin log via pastebin?

Also, Linux setup for transcoding usually requires a few extra steps to get that working right.


RE: Hanging in Linux Only - mdkb - 2024-06-19

(2024-06-18, 01:29 PM)TheDreadPirate Wrote: What are the hardware specs?  And can you share your full jellyfin log via pastebin?

thanks for looking into it.
here is my jellyfin log for the time when it happened - https://pastebin.com/gqeUcsa6
here is my hardware info (hope its enough and not too much) - https://pastebin.com/ZAXraaJF
here is the ffmpeg log from the time it happened - https://pastebin.com/wtgYqhZ8

I've been using it okay since, and not run into the same issue, but dont think any of the subs have been embedded the same way as the "midnight in paris" was.


RE: Hanging in Linux Only - TheDreadPirate - 2024-06-19

It doesn't look like you setup hardware acceleration.

Code:
Stream mapping:
  Stream #0:0 -> #0:0 (av1 (libdav1d) -> av1 (libsvtav1))

Looks like you are software transcoding. Show me screenshots of Dashboard > Playback.


RE: Hanging in Linux Only - mdkb - 2024-06-19

(2024-06-19, 02:58 PM)TheDreadPirate Wrote: It doesn't look like you setup hardware acceleration.
Show me screenshots of Dashboard > Playback.

I tried vaapi and some of the other setups from various suggestions but none seemed to make any difference.
here is screen shots of my current playback settings - https://imgur.com/a/a3Kcs8z


RE: Hanging in Linux Only - TheDreadPirate - 2024-06-19

You should be using Intel QSV. And you still need to configure it correctly. The codec check boxes are for hardware accelerated decoding. Use this table to check the correct boxes (Coffee Lake column).

https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video#Hardware_decoding_and_encoding

Your iGPU does not support ENCODING to AV1 so don't check "Allow encoding in AV1 format".

You will need to install one Intel package for OpenCL since it is required for tone mapping. Which you should also enable.

Code:
sudo apt install intel-opencl-icd

https://jellyfin.org/docs/general/administration/hardware-acceleration/intel/#debian-and-ubuntu-linux


RE: Hanging in Linux Only - mdkb - 2024-06-20

(2024-06-19, 11:06 PM)TheDreadPirate Wrote: You should be using Intel QSV.  

okay, I followed all the various instructions. I tested it on the offending movie with pgsubs and though it still crashes on it even if not using the subs, I can at least stop the movie and back out, which I couldnt before. I also noticed the movie says it is AV1 codec but I switched all that off. Anyway, I will test it with other movies and see how it goes.

Thanks for all the help. Its been really useful. I'll let you know how it goes.

EDIT: actually it had worse problems with not playing some movies until I adjusted a few other settings as well:
In the logs I could see "Current HLS implementation doesn't support non-keyframe breaks but one is requested"
which suggested there was still transcoding issues and I dont know what fixed it but I changed the following:


I tried setting hardware acceleration in playback\Trickplay.
checked Enable hardware decoding
Enable hardware accelerated MJPEG encoding

went back into playback/transcoding to change some stuff:

- unchecked "Prefer OS native DXVA or VA-API hardware decoders"
- unchecked "mpeg2"
- disabled both "low-power encoding" options as it said it needs configuring on linux to use.
- checked "Enable fallback fonts" in \playback\transcoding settings.

something fixed everything because now even the pgsub video played so long as I used the srt subtitles.

so this is now fixed so far. if I have other issues I will report them.