• 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 Off Topic General Discussion Split MKV with chapters

     
    • 0 Vote(s) - 0 Average

    Split MKV with chapters

    felix920506
    Offline

    Team Member

    Posts: 13
    Threads: 6
    Joined: 2023 Jun
    Reputation: 0
    #1
    2023-07-20, 02:17 AM
    I have a couple of DVD Rips from DVD releases of TV shows. In these releases. Each episode is a chapter and the whole thing is one very long mkv.
    However, Jellyfin's metadata system doesn't really play nicely with this kind of media layout. Is there any easy way to split them up into individual files?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2023-07-20, 03:13 AM
    Handbrake allows you to select what chapter(s) to output. While you are using Handbrake, recompress the video if you haven't done so already. I've achieved over 80% file size reduction with HEVC while maintaining the DVD original quality.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    Tempus
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2023 Jul
    Reputation: 0
    Country:Australia
    #3
    2023-07-20, 10:07 AM
    I literally just had to deal with this issue too. If you use ffmpeg you can do this:

    Get timecodes for all the chapters
    ffprobe -i input.mkv -show_chapters > chapters.txt

    Note the start_time and end_time for each chapter/episode

    Make and run a .bat file for ffmpeg to create individual videos based on the timecodes, using -ss for the start time and -to for the end time
    For example:
    ffmpeg -i input.mkv -c:v libx264 -c:a aac -map 0:v:0 -map 0:a:0 -map_chapters -1 -sn -ss 0 -to 1310.32 "S01E01.mp4" -c:v libx264 -c:a aac -map 0:v:0 -map 0:a:0 -map_chapters -1 -sn -ss 1310.32 -to 2628.2 "S01E02.mp4" -c:v libx264 -c:a aac -map 0:v:0 -map 0:a:0 -map_chapters -1 -sn -ss 2628.2 -to 3940.92 "S01E03.mp4"
    Perseverant
    Offline

    Junior Member

    Posts: 42
    Threads: 12
    Joined: 2023 Jun
    Reputation: 4
    #4
    2023-07-20, 10:41 PM (This post was last modified: 2023-07-20, 10:48 PM by Perseverant. Edited 1 time in total.)
    I haven't had a chance to add this to my media handling guide yet, but there is a way to handle a situation like this doesn't require re-encoding or command line.  You can use an application called avidemux.  You can drag and drop the file in, set your start point on the timeline, set your end point, and when you save it'll spit out a file pretty quickly.

    There are a couple of downsides to avidemux
    1) It will only split on I-frames, but this shouldn't be a problem for you.  Because you're chopping up episodes, you should have plenty of black space between episodes to comfortably set your start and end points on I-frames.
    2) It'll chop your video and audio, but it won't split subtitles for you.

    If you have any questions, give me a shout.
    New to media handling?  Check out my guide: From Disc to Drive: A Beginner's Guide to Preparing Your Media for Jellyfin
    « 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