[{"data":1,"prerenderedAt":334},["ShallowReactive",2],{"Categories":3,"NavIndexCategoriesCountFooter":203,"content-\u002F2011\u002F10\u002F02\u002Fsplitting-mkv-files-on-chapter-marks\u002F":204},[4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,68,70,71,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202],{"category":5},"System Administration",{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},"Software Development",{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":27},{"category":27},{"category":67},"Drones & RC",{"category":69},"DIY Projects",{"category":67},{"category":72},"Photography",{"category":69},{"category":69},{"category":69},{"category":67},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":67},{"category":69},{"category":69},{"category":67},{"category":67},{"category":72},{"category":72},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":5},{"category":5},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":5},{"category":67},{"category":67},{"category":72},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":72},{"category":67},{"category":138},"3D Printing - Laser Cutting - CNC",{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":5},{"category":138},{"category":27},{"category":27},{"category":138},{"category":138},{"category":72},{"category":158},"Photography,3D Printing - Laser Cutting - CNC",{"category":27},{"category":27},{"category":69},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":67},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":27},{"category":69},{"category":27},{"category":27},{"category":27},{"category":27},{"category":181},"Home Assistant",{"category":181},{"category":72},{"category":27},{"category":27},{"category":72},{"category":138},{"category":5},{"category":72},{"category":72},{"category":138},{"category":27},{"category":181},{"category":181},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},191,{"id":205,"title":206,"body":207,"category":318,"date":319,"description":216,"embedImage":318,"extension":320,"image":318,"intro":318,"meta":321,"navigation":322,"path":323,"seo":324,"series":318,"sitemap":325,"stem":326,"tags":327,"__hash__":333},"content\u002F2011\u002F10\u002F02\u002Fsplitting-mkv-files-on-chapter-marks.md","Splitting MKV files on chapter marks",{"type":208,"value":209,"toc":315},"minimark",[210,217,220,231,234,239,245,248,251,254,257,260,266,269,305,308,311],[211,212,213],"p",{},[214,215,216],"strong",{},"Update - 2014-04-16",[211,218,219],{},"As pointed out in the comments below - mkvmerge --split now has a chapters option",[221,222,227],"pre",{"className":223,"code":225,"language":226},[224],"language-text","  mkvmerge -o output.mkv --split chapters:1,3,5 testfile.mkv\n","text",[228,229,225],"code",{"__ignoreMap":230},"",[211,232,233],{},"I have no idea how long that option has been there - but it certainly makes life a lot easier. Thanks to the commmenter for the update.",[211,235,236],{},[214,237,238],{},"Original post",[211,240,241],{},[242,243,244],"em",{},"The original post shows how to do timecode based splitting which may still be useful for people:",[211,246,247],{},"I had the need to split some mkv (matroska video) files on chapter marks.",[211,249,250],{},"I'd normally use handbrake for this - split and encode. But I didn't really want to reencode each time.",[211,252,253],{},"Downloaded mkvtoolsnix (machomebrew: brew install mkvtoolsnix).",[211,255,256],{},"Most tutorials concentrate on mkvmerge gui which I didn't have - just the command line",[211,258,259],{},"So - an example:",[221,261,264],{"className":262,"code":263,"language":226},[224],"    $ mkvinfo testfile.mkv  | grep ChapterTimeStart\n        |   + ChapterTimeStart: 00:00:00.000000000\n        |   + ChapterTimeStart: 00:08:45.000000000\n        |   + ChapterTimeStart: 00:14:47.856000000\n        |   + ChapterTimeStart: 00:19:03.576000000\n        |   + ChapterTimeStart: 00:27:23.656000000\n        |   + ChapterTimeStart: 00:36:08.496000000\n        |   + ChapterTimeStart: 00:41:30.776000000\n        |   + ChapterTimeStart: 00:45:42.896000000\n        |   + ChapterTimeStart: 00:51:40.256000000\n        |   + ChapterTimeStart: 01:03:57.336000000\n        |   + ChapterTimeStart: 01:16:19.296000000\n        |   + ChapterTimeStart: 01:26:53.456000000\n",[228,265,263],{"__ignoreMap":230},[211,267,268],{},"Let's say we want to split off the first chapter:",[221,270,274],{"className":271,"code":272,"language":273,"meta":230,"style":230},"language-shell shiki shiki-themes github-dark","$ mkvmerge -o output.mkv --split \"timecodes:00:08:45.00\" testfile.mkv\n","shell",[228,275,276],{"__ignoreMap":230},[277,278,281,285,289,293,296,299,302],"span",{"class":279,"line":280},"line",1,[277,282,284],{"class":283},"svObZ","$",[277,286,288],{"class":287},"sU2Wk"," mkvmerge",[277,290,292],{"class":291},"sDLfK"," -o",[277,294,295],{"class":287}," output.mkv",[277,297,298],{"class":291}," --split",[277,300,301],{"class":287}," \"timecodes:00:08:45.00\"",[277,303,304],{"class":287}," testfile.mkv\n",[211,306,307],{},"timecodes has hh:mm:ss.ss (hours, mins, secs in decimal) as format and can take comma sep list for splitting at several points.",[211,309,310],{},"Bingo - chapter split matroska video still in matroska with all video and subtitles intact and no reencoding.",[312,313,314],"style",{},"html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":230,"searchDepth":316,"depth":316,"links":317},2,[],null,"2011-10-02 17:49:10 +0200","md",{},true,"\u002F2011\u002F10\u002F02\u002Fsplitting-mkv-files-on-chapter-marks",{"title":206,"description":216},{"loc":323},"2011\u002F10\u002F02\u002Fsplitting-mkv-files-on-chapter-marks",[328,329,330,331,332],"mkv","mkvtoolsnix","mkvmerge","mkvinfo","matroska","u_2zMcIXUFSfxotG1t3BDFHLkA3filIy80VDKmRU7CE",1775293013512]