Skip to content

Instantly share code, notes, and snippets.

@FabianBartl
FabianBartl / create-chapters.py
Last active October 24, 2024 23:21 — forked from cliss/mergechapters.py
Create chapters from text file by modifying ffmetadata. Merge videos with chapters while keeping all audio and subtitle tracks.
# Create chapters from text file by modifying ffmetadata
# https://ikyle.me/blog/2020/add-mp4-chapters-ffmpeg
import re, sys
if len(sys.argv) < 2:
print(f"Usage: {__file__} [chapters file]")
exit()
chapters = list()