• 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 Subtitle burn-in won't use extracted embeded subtitles

     
    • 0 Vote(s) - 0 Average

    Subtitle burn-in won't use extracted embeded subtitles

    Try to use extracted subtitles as input to the ffmpeg to avoid forever probing
    homelabResearcher
    Offline

    Junior Member

    Posts: 10
    Threads: 2
    Joined: 2024 Mar
    Reputation: 0
    Country:United States
    #1
    2024-03-27, 01:26 AM
    Hey guys, recently I ran into issues with some subtitle streams in specific files can be very slow to load and renders burn-in virtually unusable. After checking the logs, I believe that's because these subtitles don't have specified sizes and the ffmpeg have to probe through the entire file to find them. Luckily Jellyfin has a subtitle extraction plugin that could extract embeded subtitles for faster subtitle loading.

    So I just ran the subtitle extraction on my entire library and all embeded subtitles have been extracted to local /config/data folder, then I did a full scan to make sure they are correctly mapped with the files. The subtitles do popup instantly if they're not burnt-in, however if I choose to burn them in, ffmpeg would still get embeded subtitles as input, the command would be:

    Code:
    /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -init_hw_device vaapi=va:,kernel_driver=i915,driver=iHD -init_hw_device qsv=qs@va -init_hw_device opencl=ocl@va -filter_hw_device qs -hwaccel qsv -hwaccel_output_format qsv -c:v hevc_qsv -autorotate 0 -i file:"/media/Tests/TestLib_Movie/Star Wars Episode II Attack of the Clones (2002).mkv" -autoscale 0 -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:0 -codec:v:0 h264_qsv -low_power 1 -preset 7 -look_ahead 0 -b:v 60073405 -maxrate 60073405 -bufsize 120146810 -g:v:0 72 -keyint_min:v:0 72 -filter_complex "alphasrc=s=2578x1080:r=5:start='0',format=bgra,subtitles=f='/media/Tests/TestLib_Movie/Star Wars Episode II Attack of the Clones (2002).mkv':si=0:alpha=1:sub2video=1:fontsdir='/config/cache/attachments/2289313a163e3e45fc50f0bc01906bd5',hwupload=derive_device=qsv:extra_hw_frames=64[sub];[0:0]setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,hwmap=derive_device=opencl,tonemap_opencl=format=nv12:p=bt709:t=bt709:m=bt709:tonemap=bt2390:peak=100:desat=0,hwmap=derive_device=qsv:reverse=1:extra_hw_frames=16,format=qsv[main];[main][sub]overlay_qsv=eof_action=endall:shortest=1:repeatlast=0:w=3840:h=1608" -start_at_zero -codec:a:0 libfdk_aac -ac 2 -ab 384000 -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_segment_filename "/config/transcodes/6c7bb8e7935fa54b98a7b2201f015581%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/config/transcodes/6c7bb8e7935fa54b98a7b2201f015581.m3u8"

    and ffmpeg will just probe forever:

    Code:
    [Parsed_subtitles_2 @ 0x56419c233500] Shaper: FriBidi 1.0.8 (SIMPLE) HarfBuzz-ng 2.7.4 (COMPLEX)
    [matroska,webm @ 0x56419c31a440] Could not find codec parameters for stream 7 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
    Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
    [matroska,webm @ 0x56419c31a440] Could not find codec parameters for stream 8 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
    Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
    [matroska,webm @ 0x56419c31a440] Could not find codec parameters for stream 9 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
    Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
    [matroska,webm @ 0x56419c31a440] Could not find codec parameters for stream 10 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
    Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
    [matroska,webm @ 0x56419c31a440] Could not find codec parameters for stream 11 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
    Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
    [matroska,webm @ 0x56419c31a440] Could not find codec parameters for stream 12 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
    Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
    [matroska,webm @ 0x56419c31a440] Could not find codec parameters for stream 13 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
    Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
    [matroska,webm @ 0x56419c31a440] Could not find codec parameters for stream 14 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
    Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

    Later I pulled all generated subtitles and library.db as well, but I don't see any entries in the db that matched the extracted subtitles' filenames, all embeded subtitles still have null as their path, and I can't tell if these subtitles are correctly linked with the media files. 
    [Image: 1wlbdp.png]

    I think it would be wonderful if the plugin just have an option to save the subtitles in media folders just as the opensubtitle plugin.


    Attached Files
    .txt   ffmpeg.log.txt (Size: 164.67 KB / Downloads: 85)
    Jellyfin 10.9.7
    Ubuntu23.10 Linux 6.6
    Intel N100 
    16GB DDR4
    All media files attached via NFS
    Test servers on 10.9.2 and 10.9.6, backup servers on 10.8.13
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    Messages In This Thread
    Subtitle burn-in won't use extracted embeded subtitles - by homelabResearcher - 2024-03-27, 01:26 AM
    RE: Subtitle burn-in won't use extracted embeded subtitles - by TheDreadPirate - 2024-03-27, 12:33 PM
    RE: Subtitle burn-in won't use extracted embeded subtitles - by homelabResearcher - 2024-03-27, 12:49 PM
    RE: Subtitle burn-in won't use extracted embeded subtitles - by TheDreadPirate - 2024-03-27, 12:55 PM
    RE: Subtitle burn-in won't use extracted embeded subtitles - by homelabResearcher - 2024-03-27, 01:11 PM
    RE: Subtitle burn-in won't use extracted embeded subtitles - by TheDreadPirate - 2024-03-27, 01:19 PM
    RE: Subtitle burn-in won't use extracted embeded subtitles - by homelabResearcher - 2024-03-27, 01:43 PM
    RE: Subtitle burn-in won't use extracted embeded subtitles - by TheDreadPirate - 2024-03-27, 01:47 PM
    RE: Subtitle burn-in won't use extracted embeded subtitles - by homelabResearcher - 2024-03-27, 02:01 PM
    RE: Subtitle burn-in won't use extracted embeded subtitles - by TheDreadPirate - 2024-03-27, 03:01 PM
    RE: Subtitle burn-in won't use extracted embeded subtitles - by homelabResearcher - 2024-03-27, 03:46 PM

    • 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