Log in

View Full Version : Commandline app to mux from TS to MKV with chapters?


stattik
30th August 2008, 05:48
Hi all,

I'm trying to find the most efficient to convert some TS recordings to MKV with chapters. Since there are dozen's of files I'd like to automates the process via command line. I've researched a few apps that do some of the things but not all (please correct me if I'm wrong.).

dsmux - command line, muxes TS to MKV, but no chapters

gdsmux - muxes to TS, chapters, but no commandline

eac3to - command line, muxes TS to MKV, but no chapters

ffmpeg - command line, muxes TS to MKV, but no chapters

mkvmerge - command line, chapters, no muxing TS to MKV


Any help would be greatly appreciated.

Comatose
30th August 2008, 19:13
Well, you'll probably just have to add a middle step for demuxing the streams out of the TS then give them to mkvmerge :3

stattik
31st August 2008, 05:48
Yeah, that's how I currently do it. Just wondering if there was something around that i was unaware of that would cut the processing time in half. I noticed that mkvmerge can "apply" chapters directly to a MKV file without remuxing but I didn't see a command line switch for that.

Comatose
31st August 2008, 07:12
If you're referring to mkvmerge GUI, then look through the menus. There's a button you can press to show the current commandline it would use.

stattik
4th September 2008, 20:33
In the Chapter Editor menu, there's a "Save to Matroka File." It seems faster than remuxing but there's no commandline argument for it that I'm aware of.

pc_speak
5th September 2008, 01:12
This is the OGG format. 10 minute chapters. You only need to create the chapter file(s) once. I have 2.
One for 4 hours at 10 minutes and 1 for 4 hours at 3 minutes. If the video is shorter then the chapter file is truncated. No worries. :)
The time index is in format of hours:minutes:seconds.milliseconds.
The chapters file cannot have any leading blank lines.

CHAPTER01=00:00:00.000
CHAPTER01NAME=Chapter 01
CHAPTER02=00:10:00.000
CHAPTER02NAME=Chapter 02
CHAPTER03=00:20:00.300
CHAPTER03NAME=Chapter 03
CHAPTER04=00:30:00.000
CHAPTER04NAME=Chapter 04
CHAPTER05=00:40:00.000
CHAPTER05NAME=Chapter 05

This works. (MPEG with one AC3 audio track)
"C:\VidAud\MKVtoolnix\mkvmerge" -o "F:\myvideo.mkv" -a 1 -d 0 -S "D:\z\myvideo.mpg" --track-order 0:0,0:1 --chapter-language eng --chapters "C:\VIDAUD\ChaptOGG_10.txt"

Hope it helps.

stattik
5th September 2008, 16:20
Thanks pc_speak.

I currently have a script that takes an comskip generated EDL file and creates the chapter file in the OGM format. Since the original file is a TS file and mkvmerge can't demux it directly, I first run the file though dsmux to create the MKV and then I run that file though mkvmerge using a command line similar to yours.