M HYPE SPLASH
// news

Using ffmpeg, is it possible to convert a blu-ray folder to a MKV file and add chapter titles in one go?

By Emily Wilson

From time to time, I have to convert the files which are referenced by a playlist from a blu-ray disc to a MKV file. I normally use ffmpeg under Windows in a command line like the following:

"C:\Program Files\ffmpeg\bin\ffmpeg.exe" -analyzeduration 1G -probesize 1G -fix_sub_duration -playlist 00001 -i "bluray:D:\Daten\Temp\My Blu-Ray Disc" -map 0:0 -map 0:1 -map 0:2 -codec copy c:\Users\User\Desktop\result.mkv

That works so far.

However, I am looking for a way to add chapter titles (metadata) to the resulting MKV file directly along with the initial conversion in one go.

I am aware that I can add chapter titles to the MKV file after it has been created. However, that means copying (i.e. demuxing and remuxing) it again. Since the files sometimes are about 40 GB, this causes a non-negligible wear for the disks.

Therefore I'd like to know how to change the command line so that the chapter title metadata is inserted into the MKV file in one go during the first conversion. I have tried the following command line:

"C:\Program Files\ffmpeg\bin\ffmpeg.exe" -analyzeduration 1G -probesize 1G -fix_sub_duration -playlist 00001 -i "bluray:D:\Daten\Temp\My Blu-Ray Disc" -i metadata.txt -map 0:0 -map 0:1 -map 0:2 -map_metadata 1 -codec copy c:\Users\User\Desktop\result.mkv

with metadata.txt being something like that:

[CHAPTER]
TIMEBASE=1/1000
START=0
END=9999
title=Chapter Title 1
[CHAPTER]
TIMEBASE=1/1000
START=10000
END=19999
title=Chapter Title 2

That did not produce an error message, but the resulting MKV file did not contain the chapter metadata. What am I doing wrong?

5 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy