How to add chapters into mp4/mkv file using ffmpeg? [closed]
Asked Answered
Q

1

8

Currently i'm using MKVToolNix for my needs which is fine but i would prefer some CLI also. As far as i know ffmpeg supports chapters management.

Quintana answered 21/11, 2017 at 14:34 Comment(4)
;FFMETADATA1 - header [CHAPTER] TIMEBASE=1/1 - forcing ffmpeg use seconds START=0 - beginning END=60 - ending title=chapter \#1 - title itself [CHAPTER] TIMEBASE=1/1 START=61 END=120 title=chapter \#2 [CHAPTER] TIMEBASE=1/1 START=121 END=140 title=chapter \#3Quintana
ffmpeg -i INPUT -i FFMETADATAFILE -map_metadata 1 -codec copy OUTPUT - Reinserting edited metadata information from the FFMETADATAFILE fileQuintana
Isn't mkvtoolnix a frontend for the command line tool mkvmerge?Wellman
superuser.com/questions/1320389/…Bolognese
D
16

The ffmetadata format allows you to add chapters to a file.

Have a look at https://ffmpeg.org/ffmpeg-formats.html#Metadata-1 for an example.

Dodecasyllable answered 21/11, 2017 at 14:41 Comment(1)
A working example of how to do it would be fabulous.Calamitous

© 2022 - 2024 — McMap. All rights reserved.