Jellyfin Forum
Transcode working for 10secs and then stops playing the videos and loops to start - 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: Transcode working for 10secs and then stops playing the videos and loops to start (/t-transcode-working-for-10secs-and-then-stops-playing-the-videos-and-loops-to-start)



Transcode working for 10secs and then stops playing the videos and loops to start - e3n - 2025-08-23

Hi I am getting a weird issue where when i try to do transcoding it works fine for 8-10 secs and then it restarts the video from starting and then keeps doing that 2-3 times and then error comes up saying "Issue with HLS Stream". When i try to check the transcoded segments during the video playback all of them have data around 250kbs
I am using i5-14400 with iGPU on latest truenas scale and using portainer to deploy jellyfin with latest linuxserverio image with the optional opencl mod.
I got this error from the jellyfin logs
Code:
[2025-08-24 00:33:06.914 +05:30] [INF] [55] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
I believe this may be the issue?
Here is the ffmpeg log:
Code:
{"Protocol":0,"Id":"7214b5af027cdf249c2d4b20b9e72c66","Path":"/data/shows/The Mentalist/Season 4/The Mentalist - S04E02 - Little Red Book WEBRip-1080p.mp4","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mov,mp4,m4a,3gp,3g2,mj2","Size":713387625,"Name":"The Mentalist - S04E02 - Little Red Book WEBRip-1080p","IsRemote":false,"ETag":"8daeecef568a3811d29486ddc50875df","RunTimeTicks":25595830000,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"UseMostCompatibleTranscodingProfile":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"subrip","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Rotation":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":0,"VideoRangeType":0,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":"Undefined","LocalizedDefault":"Default","LocalizedForced":"Forced","LocalizedExternal":"External","LocalizedHearingImpaired":"Hearing Impaired","DisplayTitle":"English - SUBRIP - External","NalLengthSize":null,"IsInterlaced":false,"IsAVC":false,"ChannelLayout":null,"BitRate":null,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":false,"IsHearingImpaired":false,"Height":0,"Width":0,"AverageFrameRate":null,"RealFrameRate":null,"ReferenceFrameRate":null,"Profile":null,"Type":2,"AspectRatio":null,"Index":0,"Score":null,"IsExternal":true,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":true,"SupportsExternalStream":true,"Path":"/data/shows/The Mentalist/Season 4/The Mentalist - S04E02 - Little Red Book WEBRip-1080p.en.srt","PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"hevc","CodecTag":"hev1","Language":"und","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Rotation":null,"Comment":null,"TimeBase":"1/24000","CodecTimeBase":null,"Title":null,"VideoRange":1,"VideoRangeType":1,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"LocalizedHearingImpaired":null,"DisplayTitle":"1080p HEVC SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":false,"ChannelLayout":null,"BitRate":2000208,"BitDepth":10,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"IsHearingImpaired":false,"Height":1080,"Width":1920,"AverageFrameRate":23.976025,"RealFrameRate":23.976025,"ReferenceFrameRate":23.976025,"Profile":"Main 10","Type":1,"AspectRatio":"16:9","Index":1,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p10le","Level":120,"IsAnamorphic":false},{"Codec":"aac","CodecTag":"mp4a","Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Rotation":null,"Comment":null,"TimeBase":"1/48000","CodecTimeBase":null,"Title":null,"VideoRange":0,"VideoRangeType":0,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":"Default","LocalizedForced":null,"LocalizedExternal":"External","LocalizedHearingImpaired":null,"DisplayTitle":"English - AAC - 5.1 - Default","NalLengthSize":null,"IsInterlaced":false,"IsAVC":false,"ChannelLayout":"5.1","BitRate":224000,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"IsHearingImpaired":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"ReferenceFrameRate":null,"Profile":"LC","Type":0,"AspectRatio":null,"Index":2,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null}],"MediaAttachments":[],"Formats":[],"Bitrate":2229699,"FallbackMaxStreamingBitrate":null,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":0,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null,"HasSegments":true}

/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -f mov,mp4,m4a,3gp,3g2,mj2 -init_hw_device vaapi=va:,vendor_id=0x8086,driver=iHD -init_hw_device qsv=qs@va -filter_hw_device qs -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i file:"/data/shows/The Mentalist/Season 4/The Mentalist - S04E02 - Little Red Book WEBRip-1080p.mp4" -noautoscale -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 hevc_qsv -tag:v:0 hvc1 -preset veryfast -b:v 496000 -maxrate 496000 -bufsize 992000 -profile:v:0 main -level 40 -g:v:0 72 -keyint_min:v:0 72 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_vaapi=w=960:h=540:format=nv12:extra_hw_frames=24,hwmap=derive_device=qsv,format=qsv" -codec:a:0 libfdk_aac -ab 224000 -af "pan=stereo|c0=c0+0.707*c2+0.707*c4|c1=c1+0.707*c2+0.707*c5,volume=3" -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "3c38abe47487277cdf07464c173bb2ad-1.mp4" -start_number 0 -hls_segment_filename "/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad.m3u8"


ffmpeg version 7.1.1-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers
  built with gcc 13 (Ubuntu 13.3.0-6ubuntu2~24.04)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      59. 39.100 / 59. 39.100
  libavcodec    61. 19.101 / 61. 19.101
  libavformat    61.  7.100 / 61.  7.100
  libavdevice    61.  3.100 / 61.  3.100
  libavfilter    10.  4.100 / 10.  4.100
  libswscale      8.  3.100 /  8.  3.100
  libswresample  5.  3.100 /  5.  3.100
  libpostproc    58.  3.100 / 58.  3.100
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file:/data/shows/The Mentalist/Season 4/The Mentalist - S04E02 - Little Red Book WEBRip-1080p.mp4':
  Metadata:
    major_brand    : isom
    minor_version  : 512
    compatible_brands: isomiso2mp41
    creation_time  : 2021-12-19T11:32:09.000000Z
    title          : The.Mentalist.S04E02.1080p.WEBRip.x265-RARBG
    encoder        : Lavf58.20.100
    comment        : The.Mentalist.S04E02.1080p.WEBRip.x265-RARBG
  Duration: 00:42:39.58, start: 0.000000, bitrate: 2229 kb/s
  Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv), 1920x1080 [SAR 1:1 DAR 16:9], 2000 kb/s, 23.98 fps, 23.98 tbr, 24k tbn (default)
      Metadata:
        creation_time  : 2021-12-19T11:32:09.000000Z
        handler_name    : VideoHandler
        vendor_id      : [0][0][0][0]
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 224 kb/s (default)
      Metadata:
        creation_time  : 2021-12-19T11:32:09.000000Z
        handler_name    : SoundHandler
        vendor_id      : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> hevc (hevc_qsv))
  Stream #0:1 -> #0:1 (aac (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad-1.mp4' for writing
Output #0, hls, to '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad.m3u8':
  Metadata:
    encoder        : Lavf61.7.100
  Stream #0:0: Video: hevc (hvc1 / 0x31637668), qsv(tv, bt709, progressive), 960x540 [SAR 1:1 DAR 16:9], q=2-31, 496 kb/s, 23.98 fps, 24k tbn (default)
      Metadata:
        encoder        : Lavc61.19.101 hevc_qsv
      Side data:
        cpb: bitrate max/min/avg: 496000/0/496000 buffer size: 992000 vbv_delay: N/A
  Stream #0:1: Audio: aac, 48000 Hz, stereo, s16, 224 kb/s (default)
      Metadata:
        encoder        : Lavc61.19.101 libfdk_aac
      Side data:
        cpb: bitrate max/min/avg: 224000/224000/224000 buffer size: 0 vbv_delay: N/A
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad0.mp4' for writing
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad1.mp4' for writing
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad2.mp4' for writing
frame=  260 fps=0.0 q=-0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=  0x   
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad3.mp4' for writing
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad4.mp4' for writing
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad5.mp4' for writing
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad6.mp4' for writing
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad7.mp4' for writing
frame=  606 fps=606 q=-0.0 size=N/A time=00:00:14.43 bitrate=N/A speed=14.4x   
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad8.mp4' for writing
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad9.mp4' for writing
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad10.mp4' for writing
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad11.mp4' for writing
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad12.mp4' for writing
frame=  951 fps=634 q=-0.0 size=N/A time=00:00:28.82 bitrate=N/A speed=19.2x   
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad13.mp4' for writing
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad14.mp4' for writing
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad15.mp4' for writing
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad16.mp4' for writing


[q] command received. Exiting.

[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad17.mp4' for writing
[hls @ 0x562a2a405c00] Opening '/config/cache/transcodes/3c38abe47487277cdf07464c173bb2ad18.mp4' for writing
[out#0/hls @ 0x562a2ab82a80] video:3376KiB audio:1509KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown
frame= 1327 fps=645 q=-0.0 Lsize=N/A time=00:00:44.46 bitrate=N/A dup=2 drop=0 speed=21.6x   



RE: Transcode working for 10secs and then stops playing the videos and loops to start - bitmap - 2025-08-23

The first item is not an issue. The INF tells you the log line is informational, not warning or error. That log line doesn't matter.

Out of curiosity....why is your transcode directory inside your cache directory? Can't say for certain that's the cause here, but it's definitely likely to cause issues overall.


RE: Transcode working for 10secs and then stops playing the videos and loops to start - e3n - 2025-08-24

(2025-08-23, 09:38 PM)bitmap Wrote: The first item is not an issue. The INF tells you the log line is informational, not warning or error. That log line doesn't matter.

Out of curiosity....why is your transcode directory inside your cache directory? Can't say for certain that's the cause here, but it's definitely likely to cause issues overall.

I believe its default for linuxserver io image. I haven’t updated it. Another update is that the transcode works on other clients like swiftfin on ipad. I believe there might be a issue in the web client itself but i am still checking this


RE: Transcode working for 10secs and then stops playing the videos and loops to start - e3n - 2025-08-24

(Yesterday, 07:03 AM)e3n Wrote:
(2025-08-23, 09:38 PM)bitmap Wrote: The first item is not an issue. The INF tells you the log line is informational, not warning or error. That log line doesn't matter.

Out of curiosity....why is your transcode directory inside your cache directory? Can't say for certain that's the cause here, but it's definitely likely to cause issues overall.

I believe its default for linuxserver io image. I haven’t updated it. Another update is that the transcode works on other clients like swiftfin on ipad. I believe there might be a issue in the web client itself but i am still checking this

I checked for playback using transcoding on chrome on iPad and its working fine. I think the issue might be with that specific machine itself. I will check that out. I don’t have an idea on what to check if anyone has any suggestions please let me know 
Thanks


RE: Transcode working for 10secs and then stops playing the videos and loops to start - nyanmisaka - 2025-08-24

https://github.com/jellyfin/jellyfin-web/pull/6985