2025-02-10, 05:52 PM
(This post was last modified: 2025-02-10, 05:56 PM by thymon. Edited 3 times in total.)
Hello,
I'm using Jellyfin's Live TV feature with an M3U playlist, which is proxied through a Docker container named aiptv. I've noticed an issue where the first attempt to start a stream always fails, but the second attempt works perfectly.
After checking the logs, I found that on the second attempt, Jellyfin correctly uses this user-agent, and the stream works:
To fix the issue, I manually set this user-agent in the Live TV settings.
However, despite this configuration, Jellyfin still uses :on the first connection, which causes the stream to fail.
Why is Jellyfin not applying the configured user-agent on the first request?
Logs Analysis
On the first attempt, Jellyfin makes a request with the default user-agent (Jellyfin-Server/10.10.5), which leads to a failure:
However, on the second attempt, Jellyfin now correctly uses the configured user-agent, and the stream starts successfully:
I'm using Jellyfin's Live TV feature with an M3U playlist, which is proxied through a Docker container named aiptv. I've noticed an issue where the first attempt to start a stream always fails, but the second attempt works perfectly.
After checking the logs, I found that on the second attempt, Jellyfin correctly uses this user-agent, and the stream works:
Code:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
However, despite this configuration, Jellyfin still uses :
Code:
Jellyfin-Server/10.10.5
Why is Jellyfin not applying the configured user-agent on the first request?
Logs Analysis
On the first attempt, Jellyfin makes a request with the default user-agent (Jellyfin-Server/10.10.5), which leads to a failure:
Code:
[18:29:23] [INF] [108] Jellyfin.LiveTv.LiveTvMediaSourceProvider: Opening channel stream from Emby, external channel Id: m3u_48befa82a0e2e34bd7396e3c0edc788e3022ce538d29744f03b832863039f1d4
[18:31:03] [WRN] [135] Jellyfin.LiveTv.TunerHosts.M3UTunerHost: HEAD request to check MIME type failed, shared stream disabled
However, on the second attempt, Jellyfin now correctly uses the configured user-agent, and the stream starts successfully:
Code:
[18:31:06] [INF] [144] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Starting /usr/lib/jellyfin-ffmpeg/ffprobe with args -analyzeduration 3000000 -probesize 1G -user_agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"