Jellyfin Forum
Playback stops when DirectPlay, then start transcoding - 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: Playback stops when DirectPlay, then start transcoding (/t-playback-stops-when-directplay-then-start-transcoding)



Playback stops when DirectPlay, then start transcoding - Bekkk - 2024-04-14

Hello everyone,

New to this channel, I will try to make my post as good as I can.

I am running Jellyfin on a RaspberryPi 4B, in a docker container.

Videos are stored on a 4TB HDD, plugged to a 4 USB port with PSU, plugged to the RPi.

I am using mergerfs to group multiple disk into one repository only (I do have only 1 disk for now, more are coming).

I am not transcoding, I try not to because my clients don't need it and the RPi is not very powerful.

When I am playing some videos on my NVIDIA shield on my local network, I do have playback problem. It sometimes stop, in an irregular way, and then, I get this log message :

jellyfin  | [21:13:34] [WRN] [42] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from http://192.168.1.146:8096/Videos/ff9e981b-db95-b15e-9df0-be1f32a85f40/stream.mkv?api_key=6ed714f26b5b4b2fbbeff3e3dc7f686c&DeviceId=1cb68c611d5e74132ed467891044d4904b4d99e1&MediaSourceId=ff9e981bdb95b15e9df0be1f32a85f40&Tag=d033b4e699e2fd42ee75e76708e4d810&Static=true to 192.168.1.101 in 0:00:07.6626119 with Status Code 206
jellyfin  | [21:14:56] [INF] [26] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for rmorel. EnablePlaybackRemuxing: False EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
jellyfin  | [21:14:56] [INF] [26] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=AndroidTV-libVLC, Path=/media/movies/Oppenheimer (2023)/Oppenheimer.2023.MULTI.VFF.2160p.10bit.4K.Light.HDR.BluRay.DTS.5.1.x265-Elcrackito.mkv, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) mediaConfused-facevideos/ff9e981b-db95-b15e-9df0-be1f32a85f40/stream.mkv?MediaSourceId=ff9e981bdb95b15e9df0be1f32a85f40&Static=true&VideoCodec=hevc&AudioCodec=eac3&AudioStreamIndex=2&SubtitleStreamIndex=9&api_key=<token>&SubtitleMethod=Embed&Tag=d033b4e699e2fd42ee75e76708e4d810
jellyfin  | [21:14:56] [INF] [42] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app Android TV 0.16.7 playing Oppenheimer. Stopped at 776499 ms
jellyfin  | [21:14:56] [INF] [70] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for rmorel. EnablePlaybackRemuxing: False EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
jellyfin  | [21:14:56] [INF] [70] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=AndroidTV-ExoPlayer, Path=/media/movies/Oppenheimer (2023)/Oppenheimer.2023.MULTI.VFF.2160p.10bit.4K.Light.HDR.BluRay.DTS.5.1.x265-Elcrackito.mkv, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=AudioCodecNotSupported ) mediaConfused-facevideos/ff9e981b-db95-b15e-9df0-be1f32a85f40/stream?MediaSourceId=ff9e981bdb95b15e9df0be1f32a85f40&AudioStreamIndex=2&SubtitleStreamIndex=9&api_key=<token>&SubtitleMethod=Encode&RequireAvc=false&Tag=d033b4e699e2fd42ee75e76708e4d810&TranscodeReasons=AudioCodecNotSupported
jellyfin  | [21:15:07] [WRN] [44] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from http://192.168.1.146:8096/Videos/ff9e981b-db95-b15e-9df0-be1f32a85f40/stream.mkv?api_key=6ed714f26b5b4b2fbbeff3e3dc7f686c&DeviceId=1cb68c611d5e74132ed467891044d4904b4d99e1&MediaSourceId=ff9e981bdb95b15e9df0be1f32a85f40&Tag=d033b4e699e2fd42ee75e76708e4d810&Static=true to 192.168.1.101 in 0:00:51.9143898 with Status Code 206

I do have several questions :
1) Regarding the logs, am I really not transcoding ? It looks like Jellyfin is trying to transcode even though I refuses it.
2) Should I do : No transcoding / Remux / Audio ? (For sure I can't transcode video)
3) Do you have any idea what could be the reason of it ?

Thanks for the help !


RE: Playback stops when DirectPlay, then start transcoding - TheDreadPirate - 2024-04-15

Nothing stands out server side. Does it always happen in the same spot in the movie? And does it only happen with Oppenheimer?


RE: Playback stops when DirectPlay, then start transcoding - Bekkk - 2024-04-15

Hello, I couldn't tell if it the exact same time, but I don't think so. It happens around 10 - 20 min (which makes it hard to debug...)

It also happened on some episodes of Ozark, but not all of them.

Other tests I did :
- Phone - external network : no problem for more than 20 min. (I am using Cloudflare to redirect to my server)
- Windows PC - local network : no problem for more than 20 min.
- Someone of my family - external network : no problem.

What do you think I should test ?


RE: Playback stops when DirectPlay, then start transcoding - Bekkk - 2024-04-15

Ok I did more check :
- It appears Oppenheimer is not working on any devices at all. It stops randomly while playing (external or local network)
- I tried to change the volume in JF docker from my mergerfs pool to the disk directly, and things seem much better now.

More details on mergerfs :
I created a partition /mnt/toshiba4TB for my disk, and a partition /mnt/pool for mergerfs. While having the problem, JF was reading on /mnt/pool
I changed the volume I am using in docker-compose from /mnt/pool to /mnt/toshiba4TB (meaning now JF is directly looking onto the disk instead of using mergerfs), and it doesn't give me any trouble.

Seems like mergerfs could be the reason of it. Do you guys have any idea why ?
Here is my fstab :

/mnt/toshiba4TB /mnt/pool fuse.mergerfs cache.files=off,dropcacheonclose=true,category.create=mfs 0 2



RE: Playback stops when DirectPlay, then start transcoding - TheDreadPirate - 2024-04-15

I have no idea. Never used mergefs, but I don't see why that would cause issues.


RE: Playback stops when DirectPlay, then start transcoding - Bekkk - 2024-04-17

Hello,

I did precise what was the cause of the problem. I used dmseg to find out if I had I/O errors, and that was it. This was due to a failure reading the file from my HDD drives, which is plugged to powered USB port, which is plugged to my Raspberry PI 4b.

Probable causes : disk problem, cable problem, powered hub problem.

Do you know by chance anyone who used a Raspberry PI with a powered hub and encountered those kind of issues ?

I keep going with the investigation.