I would like to know how to use ffmpeg to remove specific chapters from a video file. Below is an example. I would like to remove all the Chapters marked "Advertisement". I've searched everywhere and I can't seem to find a way. I don't even mind re-encoding, but I just don't want to do it by hand.
Duration: 00:52:24.45, start: 0.042989, bitrate: 3290 kb/s
Chapter #0:0: start 0.000000, end 19.142000
Metadata:
title : Video
Chapter #0:1: start 19.142000, end 34.017000
Metadata:
title : Advertisement
Chapter #0:2: start 34.017000, end 810.551000
Metadata:
title : Video
Chapter #0:3: start 810.551000, end 915.283000
Metadata:
title : Advertisement
Chapter #0:4: start 915.283000, end 1206.940000
Metadata:
title : Video
Chapter #0:5: start 1206.940000, end 1291.963000
Metadata:
title : Advertisement
Chapter #0:6: start 1291.963000, end 1614.738000
Metadata:
title : Video
Chapter #0:7: start 1614.738000, end 1694.709000
Metadata:
title : Advertisement
Chapter #0:8: start 1694.709000, end 2068.249000
Metadata:
title : Video
Chapter #0:9: start 2068.249000, end 2173.261000
Metadata:
title : Advertisement
Chapter #0:10: start 2173.261000, end 2472.440000
Metadata:
title : Video
Chapter #0:11: start 2472.440000, end 2582.395000
Metadata:
title : Advertisement
Chapter #0:12: start 2582.395000, end 3143.276000
Metadata:
title : Video
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720, 3088 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 193 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream #0:2(eng): Data: bin_data (text / 0x74786574)
Metadata:
handler_name : SubtitleHandler
Stream #0:3: Video: png, rgb24(pc), 640x360 [SAR 2834:2834 DAR 16:9], 90k tbr, 90k tbn, 90k tbc