0

I am trying to add chapters to a .mp4 file. When I tried extracting the metadata using the following command:

ffmpeg -i INPUT.mp4 -f ffmetadata FFMETADATAFILE.txt

I got an output file as follows:

;FFMETADATA1
major_brand=mp42
minor_version=0
compatible_brands=isommp42
encoder=Lavf60.15.100

So now I try to add some chapters as such

[CHAPTER]
TIMEBASE=1/1000
START=0
END=424510
title=mytitle1

[CHAPTER]
TIMEBASE=1/1000
START=424511
END=941600
title=mytitle2

[CHAPTER]
TIMEBASE=1/1000
START=941601
END=1227260
title=mytitle3

I use the ffmpeg -i INPUT.mp4 -i FFMETADATAFILE.txt -map_metadata 1 -codec copy OUTPUT.mp4 command to encode the metadata to my video file, and for some reason I only ever get 'Chapter 0', 'Chapter 1', and 'Chapter 2'.

I tried using the -map_chapters 1 argument as well but results have been unchanged.

I am using the Latest Auto-Build (2023-10-14 13:02) Windows build by BtbN. Thanks in advance for the help.

1 Answer 1

2

Turns out the latest version by BtbN and gyan.dev does have an issue, because the chapters encoded just fine when I used the version 5.1.2 build by gyan.dev.

I previously tried using the release version 6.0 but it had the same problem, so the solution is to simply use release version 5.1.2.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.