Using ffmpeg, is it possible to convert a blu-ray folder to a MKV file and add chapter titles in one go?
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.mkvThat 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.mkvwith 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 2That 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