• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting Live TV Hanging/Freezing (10.10.7) Antenna, HDHomeRun, Corrupt Packets

     
    • 0 Vote(s) - 0 Average

    Live TV Hanging/Freezing (10.10.7) Antenna, HDHomeRun, Corrupt Packets

    RoR
    Offline

    Junior Member

    Posts: 1
    Threads: 1
    Joined: 2025 Oct
    Reputation: 0
    #1
    2025-10-14, 06:08 PM (This post was last modified: 2025-10-14, 06:09 PM by RoR. Edited 1 time in total.)
    Hi everyone,

    I am currently running Jellyfin 10.10.7 on Ubuntu Server 24.04 virtualized in Proxmox 8.4.14. 

    I have a passive antenna in my attic which connects to a HDHomeRun Flex 4K, which is detected in Jellyfin. All streams coming into my Jellyfin server via the HDHomeRun end up being transcoded, as they natively appear as .ts files. 

    After any given while, my Live TV will hang/freeze, requiring me (or any other user) to exit the Live TV app and restart the stream. Looking at transcode logs, I see that ffmpeg is being passed a corrupt input packet by the HDHomeRun. I am no expert, but I assume this results from weakening TV broadcast signals. Since OTA TV is destined to have interference, there are always corrupt packets that jellyfin-ffmpeg will encounter. This makes the Live TV experience quite annoying, especially when bad weather worsens OTA signals.

    I noticed that ffmpeg has a flag called discardcorrupt. I am wondering if it can be enabled in Jellyfin somehow? I reason that this could possibly fix the server's issue with hanging/freezing when it encounters a corrupt packet in the stream while transcoding. I have found a post here on GitHub that echoes my exact problem.

    Any feedback would be greatly appreciated, as I assume many people with OTA Live TV must be experiencing this issue.

    I am attaching my jellyfin and transcode logs to show evidence of the problem. For less advanced users, search the logs for "corrupt" and you will find the error.

    Jellyfin is such a great product. I'm hoping there is a solution to this problem, or, if not, it will be noticed.

    Thank you!

    -RoR


    Attached Files
    .txt   transcodelog.txt (Size: 198.53 KB / Downloads: 10)
    .txt   jellyfinlog.txt (Size: 91.71 KB / Downloads: 17)
    Pleune
    Offline

    Junior Member

    Posts: 2
    Threads: 0
    Joined: 2025 Oct
    Reputation: 0
    Country:United States
    #2
    Yesterday, 03:48 PM
    Hi, thanks for finding my GH issue. It seems like nobody on the development team uses the HDHR, which is a real shame.

    I have managed to patch jellyfin to use the discardcorrupt feature, but it did not help. Here is a log of what that looks like:

    Code:
    frame= 2889 fps= 39 q=22.0 size=N/A time=00:00:44.73 bitrate=N/A speed=0.608x
    frame= 2889 fps= 39 q=22.0 size=N/A time=00:00:44.73 bitrate=N/A speed=0.604x
    frame= 2889 fps= 39 q=22.0 size=N/A time=00:00:44.73 bitrate=N/A speed= 0.6x 
    frame= 2889 fps= 39 q=22.0 size=N/A time=00:00:44.73 bitrate=N/A speed=0.596x   
    [mpegts @ 0x561c8cc13800] PES packet size mismatch
    [mpegts @ 0x561c8cc13800] Packet corrupt (stream = 1, dts = 6520092009), dropping it.
    [mpeg2video @ 0x561c8edc7a40] slice too small
    [vist#0:0/mpeg2video @ 0x561c8dee6ac0] [dec:mpeg2video @ 0x561c8cd835c0] Error submitting packet to decoder: Invalid data found when processing input
    [hls @ 0x561c8edc6fc0] Opening '/var/cache/jellyfin/transcodes/6ac185d824c6774fa01b64af06ba7e6215.ts' for writing
    [hls @ 0x561c8edc6fc0] Opening '/var/cache/jellyfin/transcodes/6ac185d824c6774fa01b64af06ba7e62.m3u8.tmp' for writing
    [hls @ 0x561c8edc6fc0] Opening '/var/cache/jellyfin/transcodes/6ac185d824c6774fa01b64af06ba7e6216.ts' for writing
    [hls @ 0x561c8edc6fc0] Opening '/var/cache/jellyfin/transcodes/6ac185d824c6774fa01b64af06ba7e62.m3u8.tmp' for writing
    [out#0/hls @ 0x561c8edb8400] video:40079KiB audio:1483KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown
    frame= 2913 fps= 39 q=-1.0 Lsize=N/A time=00:00:44.82 bitrate=N/A dup=2 drop=0 speed=0.595x   
    [libx264 @ 0x561c8ea9e480] frame I:17    Avg QP:20.76  size:121845
    [libx264 @ 0x561c8ea9e480] frame P:2896  Avg QP:23.80  size: 13456
    [libx264 @ 0x561c8ea9e480] mb I  I16..4: 100.0%  0.0%  0.0%
    [libx264 @ 0x561c8ea9e480] mb P  I16..4:  3.7%  0.0%  0.0%  P16..4: 32.6%  0.0%  0.0%  0.0%  0.0%    skip:63.7%
    [libx264 @ 0x561c8ea9e480] coded y,uvDC,uvAC intra: 30.7% 54.0% 21.8% inter: 14.9% 11.9% 1.9%
    [libx264 @ 0x561c8ea9e480] i16 v,h,dc,p: 33% 33% 16% 18%
    [libx264 @ 0x561c8ea9e480] i8c dc,h,v,p: 35% 33% 20% 12%
    [libx264 @ 0x561c8ea9e480] kb/s:6755.85
    [aac @ 0x561c8eed59c0] Qavg: 33523.980


    You can see ffmpeg does drop the corrupt packet, but I still get "Error submitting packet to decoder: Invalid data found when processing input" which brings the stream to a stuck black screen.

    This has been really frustrating because I ended up paying for emby premiere just so I can use my HDHR... and emby is able to tackle these corrupt packet issues no problem. But I can't find the difference between JF and Emby to copy it over to JF.
    Pleune
    Offline

    Junior Member

    Posts: 2
    Threads: 0
    Joined: 2025 Oct
    Reputation: 0
    Country:United States
    #3
    Yesterday, 03:59 PM (This post was last modified: Yesterday, 05:59 PM by Pleune. Edited 4 times in total.)
    Here is the ffmpeg command that emby uses:

    /opt/emby-server/bin/ffmpeg -loglevel +timing -y -print_graphs_file "/var/lib/emby/logs/ffmpeg-transcode-141b2ab2-0954-401a-b99a-8d3b72819789_1graph.txt" -copyts -start_at_zero -init_hw_device "vaapi=dev1:/dev/dri/renderD128" -analyzeduration 3000000 -f mpegts -c:v:0 mpeg2video -threads:v:0 1 -hwaccel:v:0 vaapi -hwaccel_device:v:0 dev1 -hwaccel_output_format:v:0 vaapi -noautorotate -i "http://127.0.0.1:8096/LiveTv/LiveStreamFiles/1c75b24e6ef5423b889480942ecf3228/stream.ts" -map 0:0 -map 0:1 -sn -c:v:0 h264_vaapi -b:v:0 5678698 -g:v:0 180 -maxrate:v:0 5678698 -bufsize:v:0 11357396 -keyint_min:v:0 180 -r:v:0 59.940059661865234 -profile:v:0 high -c:a:0 libmp3lame -ab:a:0 192000 -ac:a:0 2 -metadata:s:a:0 language=eng -filter:a:0 "volume=2" -disposition:a:0 default -fflags +discardcorruptts+fillwallclockdts -max_delay 5000000 -avoid_negative_ts disabled -f segment -map_metadata -1 -map_chapters -1 -segment_format mpegts -segment_list "/var/lib/emby/transcoding-temp/9FDFDF/9FDFDF.m3u8" -segment_list_type m3u8 -segment_time 00:00:03.000 -segment_list_entry_prefix hls/9FDFDF/ -segment_start_number 0 -individual_header_trailer 0 -write_header_trailer 0 -segment_write_temp 1 "/var/lib/emby/transcoding-temp/9FDFDF/9FDFDF_%d.ts"


    compared to jellyfin:

    /nix/store/9qy1ff65bybyap8y39v6jk5gj97i407p-jellyfin-ffmpeg-7.1.2-2-bin/bin/ffmpeg -analyzeduration 3000000 -probesize 1G -fflags +igndts+discardcorrupt  -i "https://192.168.10.164:8920/LiveTv/LiveStreamFiles/5557bd830ebe4928b41cecaef8798423/stream.ts" -map_metadata -1 -map_chapters -1 -threads 0 -sn -codec:v:0 libx264 -preset ultrafast -crf 23 -maxrate 8000000 -bufsize 16000000 -profile:v:0 high -level 51 -x264opts:0 subme=0:me_range=16:rc_lookahead=10:me=hex:open_gop=0 -force_key_frames:0 "expr:gte(t,n_forced*3)" -sc_threshold:v:0 0 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(1280\,720*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(1280/a\,720))/2)*2,format=yuv420p" -flags -global_header -codec:a:0 aac -ac 2 -ab 256000 -af "volume=2" -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_base_url "hls/6ac185d824c6774fa01b64af06ba7e62/" -hls_segment_filename "/var/cache/jellyfin/transcodes/6ac185d824c6774fa01b64af06ba7e62%d.ts" -hls_playlist_type event -hls_list_size 0 -y "/var/cache/jellyfin/transcodes/6ac185d824c6774fa01b64af06ba7e62.m3u8"


    I have tried also adding the discardcorruptts and fillwallclockdts options, but these don't seem to exist with jellyfin-ffmpeg
    I have also tried adding a lot of error handling flags to ffmpeg, which results in this:

    with +discardcorrupt+genpts -err_detect ignore_err -avoid_negative_ts disabled -timeout 5000000 -rw_timeout 5000000 -reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 2:


    frame= 8305 fps= 61 q=30.0 size=N/A time=00:02:15.93 bitrate=N/A speed=0.995x   
    frame= 8332 fps= 61 q=29.0 size=N/A time=00:02:16.51 bitrate=N/A speed=0.996x   
    frame= 8361 fps= 61 q=27.0 size=N/A time=00:02:16.89 bitrate=N/A speed=0.995x   
    frame= 8394 fps= 61 q=24.0 size=N/A time=00:02:17.47 bitrate=N/A speed=0.996x   
    frame= 8425 fps= 61 q=25.0 size=N/A time=00:02:18.04 bitrate=N/A speed=0.996x   
    frame= 8458 fps= 61 q=24.0 size=N/A time=00:02:18.43 bitrate=N/A speed=0.996x   
    frame= 8464 fps= 61 q=24.0 size=N/A time=00:02:18.62 bitrate=N/A speed=0.993x   
    frame= 8464 fps= 60 q=24.0 size=N/A time=00:02:18.62 bitrate=N/A speed=0.99x   
    frame= 8464 fps= 60 q=24.0 size=N/A time=00:02:18.62 bitrate=N/A speed=0.986x   
    frame= 8464 fps= 60 q=24.0 size=N/A time=00:02:18.62 bitrate=N/A speed=0.983x   
    frame= 8464 fps= 60 q=24.0 size=N/A time=00:02:18.62 bitrate=N/A speed=0.979x   
    frame= 8464 fps= 60 q=24.0 size=N/A time=00:02:18.62 bitrate=N/A speed=0.976x   
    frame= 8464 fps= 59 q=24.0 size=N/A time=00:02:18.62 bitrate=N/A speed=0.972x   
    frame= 8464 fps= 59 q=24.0 size=N/A time=00:02:18.62 bitrate=N/A speed=0.969x   
    frame= 8464 fps= 59 q=24.0 size=N/A time=00:02:18.62 bitrate=N/A speed=0.966x   
    frame= 8464 fps= 59 q=24.0 size=N/A time=00:02:18.62 bitrate=N/A speed=0.962x   
    [tls @ 0x5607ee1eba40] Error in the pull function.
    [tls @ 0x5607ee1eba40] IO error: Connection timed out
    [https @ 0x5607ee1ed480] Will reconnect at 129212284 in 0 second(s), error=Connection timed out.
    [https @ 0x5607ee1ed480] HTTP error 404 Not Found
    [tls @ 0x5607ee1eba40] The specified session has been invalidated for some reason.
    [https @ 0x5607ee1ed480] Will reconnect at 129212284 in 1 second(s), error=Input/output error.
    frame= 8464 fps= 59 q=24.0 size=N/A time=00:02:18.62 bitrate=N/A speed=0.959x   
    frame= 8464 fps= 58 q=24.0 size=N/A time=00:02:18.62 bitrate=N/A speed=0.956x   
    [https @ 0x5607ee1ed480] HTTP error 404 Not Found
    [tls @ 0x5607ee1eba40] The specified session has been invalidated for some reason.
    [mpegts @ 0x5607ee1ec2c0] PES packet size mismatch
    [mpegts @ 0x5607ee1ec2c0] Packet corrupt (stream = 1, dts = 7230213609), dropping it.
    [in#0/mpegts @ 0x5607ee1aef40] Error during demuxing: Input/output error
    [mpeg2video @ 0x5607f03a1f40] ac-tex damaged at 19 21
    [mpeg2video @ 0x5607f03a1f40] Warning MVs not available
    [mpeg2video @ 0x5607f03a1f40] concealing 1920 DC, 1920 AC, 1920 MV errors in P frame
    [vist#0:0/mpeg2video @ 0x5607ef4e8200] [dec:mpeg2video @ 0x5607ee35ab40] corrupt decoded frame
    [hls @ 0x5607eea21e80] Opening '/var/cache/jellyfin/transcodes/465ffa4d14ff24de02d662ab8857dd4c46.ts' for writing
    [hls @ 0x5607eea21e80] Opening '/var/cache/jellyfin/transcodes/465ffa4d14ff24de02d662ab8857dd4c.m3u8.tmp' for writing
    [hls @ 0x5607eea21e80] Opening '/var/cache/jellyfin/transcodes/465ffa4d14ff24de02d662ab8857dd4c47.ts' for writing
    [hls @ 0x5607eea21e80] Opening '/var/cache/jellyfin/transcodes/465ffa4d14ff24de02d662ab8857dd4c.m3u8.tmp' for writing
    [out#0/hls @ 0x5607f0076f40] video:109408KiB audio:4607KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown
    frame= 8489 fps= 58 q=-1.0 Lsize=N/A time=00:02:18.70 bitrate=N/A dup=2 drop=0 speed=0.954x   
    [libx264 @ 0x5607ee9ff680] frame I:48    Avg QP:22.35  size: 88961
    [libx264 @ 0x5607ee9ff680] frame P:8441  Avg QP:24.90  size: 12767
    [libx264 @ 0x5607ee9ff680] mb I  I16..4: 100.0%  0.0%  0.0%
    [libx264 @ 0x5607ee9ff680] mb P  I16..4:  5.3%  0.0%  0.0%  P16..4: 35.9%  0.0%  0.0%  0.0%  0.0%    skip:58.9%
    [libx264 @ 0x5607ee9ff680] coded y,uvDC,uvAC intra: 30.5% 44.1% 14.0% inter: 15.2% 13.1% 1.2%
    [libx264 @ 0x5607ee9ff680] i16 v,h,dc,p: 41% 28% 15% 17%
    [libx264 @ 0x5607ee9ff680] i8c dc,h,v,p: 42% 25% 24%  9%
    [libx264 @ 0x5607ee9ff680] kb/s:6328.46
    [aac @ 0x5607f04c8080] Qavg: 867.942


    I think this shows the the HDHR is loosing the signal for so long that it closes the stream. So I think the only way to work around this in jellyfin would be to add some proper re-connection logic that know when video is lost and does a full reload.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode