Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add chapters into mp4/mkv file using ffmpeg?

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.

like image 245
Alex Zubkov Avatar asked Nov 21 '17 14:11

Alex Zubkov


People also ask

How do I add chapters to MKV?

Firstly, install the mkvmerge command by installing the mkvtoolnix package. Now use mkvmerge to add that to your mkv file (this will remove any existing chapters in the file). Wait for the processing to complete (shou'dn't take long), and now you will be able to use your video-player's buttons to skip between chapters.

How do I add chapters to MP4?

Launch Handbrake, import the MP4 file and add the chapter file. Click on Start Encode to add chapters to MP4.

How do I add chapters to MP4 in VLC?

Select a video file and click OK. The file is played in the VLC media player. Select Chapter in the Playback menu to view the list of chapters. Select a chapter of your choice.


1 Answers

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.

like image 60
MRousse Avatar answered Oct 28 '22 23:10

MRousse