Jellyfin Forum
SOLVED: Audio transcoding issues - 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: Audio transcoding issues (/t-solved-audio-transcoding-issues)



Audio transcoding issues - sam_sepi0l7 - 2024-08-24

Hi everyone, I am facing a strange issue with audio transcoding. Let me detail my setup first :
OS : Debian 12 up-to-date
Jellyfin in a Docker Container (Linux Server's image) version 10.9.8
Hardware : 
- Ryzen 5 1600X (6C, 12 threads) @3.6GHz (AMD C-states disabled) 
- RTX 3070Ti FE (proprietary drivers installed and working, nvidia-container-toolkit also)
- 16GB of RAM @3200MT/s
- 2.5gbps network card
- OS running on a 1TB SSD
- Medias stored on a 4x4TB RAIDZ1.

Video transcoding using NVIDIA NVENC is working properly and is fast (~100FPS when transcoding 4K HEVC HDR content)
However there is a weird behavior happening when transcoding audio : it makes my server "laggy", playback stutters and freezes for many seconds and does very often. By "laggy" I mean that when SSHing into my server it takes an extra two seconds, when typing a command there is a delay in both what I type and the output, when accessing Jellyfin's web interface it takes way longer to load, same for my other sevices' web interface. However, when checking in htop or btop, the overall CPU usage is sitting at around 10% up to 25%, temps are fine and stable, plenty of RAM is available, disk I/O is not at 100% (way below), network is working properly. In fact, this weird behavior only happens when transcoding audio. As for the settings in Jellyfin : enabling or disabling VBR audio encoding does not change a thing, same for max musing queue size, encoding preset is set to auto (although I tried some others but it gave the same results), transcodes are not throttled. Lastly, Jellyfin logs do not show any error and I am not sure on how to check FFMPEG's logs. If anyone have any idea on what might be happening, I will be happy to provide more information and logs.
Thank you !


RE: Audio transcoding issues - TheDreadPirate - 2024-08-24

Can you post one of your ffmpeg logs on pastebin?

They are in the same directory as your main jellyfin log.


RE: Audio transcoding issues - TheDreadPirate - 2024-08-24

Also, do you have anything else running on this host?

And can you look at the system load vs just the CPU usage?


RE: Audio transcoding issues - sam_sepi0l7 - 2024-08-25

Here are FFmpeg logs : https://pastebin.com/CkKnrUa0
I was playing a 4K HDR movie (in Direct streaming, so only the audio was transcoded according to Jellyfin), meanwhile the load average figures given by btop after 3-4 minutes of playback were : 23.0, 17.4, 9.7 . I am not sure how to interpret these load average figures in this context though.
Finally, there are other services running (Immich but not transcoding at the time, Nextcloud, an ARR stack for media requesting but not doing anything, not even downloading) and some other light services like Vaultwarden. I tried stopping these services but still encountered the same issues (while the load averages were lower). Also, glances tell me CPU_IOWAIT is high (up to ~60%)


RE: Audio transcoding issues - sam_sepi0l7 - 2024-08-25

Oh I think I found a solution : thanks to you asking the load average values I found this Reddit post (https://www.reddit.com/r/jellyfin/comments/j251mk/audio_transcoding_causing_high_load_server_locks/). So I moved the transcode path to my RAIDZ-1 where my content is stored and the issue is much less present but still happens a bit. I think throttling the transcode will help even more, I will mark the thread as solved if it fixes my issue ! Thanks for your help !!!


RE: Audio transcoding issues - sam_sepi0l7 - 2024-08-27

The issue is disappearing, marking thread as fixed !