arrbee99 1559 Posted August 22, 2018 Share Posted August 22, 2018 Am wondering if anybody knows how to split a video at a chapter marker, possibly using MKVToolNix (seeing as I've got it already). I've ripped a TV series using MakeMKV but its actually saved two episodes into one file, two chapters for each episode, so would like to split at chapter two. Have googled and it sounds easy to do but it seems to use commands that I can't even find (unusually for me). Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted August 22, 2018 Share Posted August 22, 2018 Assuming you are on Windows This script assumes the video,mkvinfo.exe and mkvmerge.exe are in the same directory as the script file it creates an "output" dir below the current directory it will split at all chapter markers - i.e. you get a file per chapter Save below as a bat file @[member="Echo"] off &setlocal EnableDelayedExpansion set source=%~1 set destination=output\%~nx1 if not exist output\ mkdir output for /f "usebackq tokens=4" %%i in (`mkvinfo --ui-language en "%source%" ^| findstr /i /c:"ChapterTimeStart: "`) do ( if defined timecodes set timecodes=!timecodes!, set timecodes=!timecodes!%%i ) mkvmerge -o "%destination%" --split timecodes:%timecodes% "%source%" endlocal Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted August 22, 2018 Share Posted August 22, 2018 (edited) and to join videos together you can use ffmpeg (could also use that for the splitting as well) F:\Video\ffmpeg\bin\ffmpeg.exe -f concat -safe 0 -i F:\Video\testing\JoinFilelist.txt -c copy F:\Video\testing\output\output.mp4 and the joinfilelist.txt looks like this file 'F:\Video\testing\output\part 1.mp4' file 'F:\Video\testing\output\part 2.mp4' Just change the video file extensions for you required output to mkv Edited August 22, 2018 by PenkethBoy Link to comment Share on other sites More sharing options...
arrbee99 1559 Posted August 22, 2018 Author Share Posted August 22, 2018 Thanks very much. I shall give it a go and see what comes out in the wash, as they say... Link to comment Share on other sites More sharing options...
Guest asrequested Posted August 23, 2018 Share Posted August 23, 2018 Link to comment Share on other sites More sharing options...
arrbee99 1559 Posted August 23, 2018 Author Share Posted August 23, 2018 Thanks. So thats where it is, I was stupidly looking under Chapter Editor... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now