Use ffmpeg to remove specific chapters out of an MP4
This can be done using the concat demuxer. If the Video chapters begin with a keyframe, then encoding can be skipped.

#1 Copy/Paste the following into a text file, or pipe it to the command in the next step

    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


#2 Prepare the text file for concat

It should end up like this

file 'myfile.mp4'
inpoint 0.000000
outpoint 19.142000
file 'myfile.mp4'
inpoint 34.017000
outpoint 810.551000
file 'myfile.mp4'
inpoint 915.283000
outpoint 1206.940000
file 'myfile.mp4'
inpoint 1291.963000
outpoint 1614.738000
file 'myfile.mp4'
inpoint 1694.709000
outpoint 2068.249000
file 'myfile.mp4'
inpoint 2173.261000
outpoint 2472.440000
file 'myfile.mp4'
inpoint 2582.395000
outpoint 3143.276000


Each set of three lines corresponds to an included video chapter. The file entry is on the first line, chapter start and end times on the 2nd and 3rd lines.

I used the following command to generate it

grep -B2 'Video' chp.txt | awk '(NR-1) % 4 == 0' | sed -E 's/\ *Chapter #[0-9]:[0-9]+:/file \'myfile.mp4\'\n/g;s/\ *start/inpoint/g;s/,\ end/\noutpoint/g' &gt; list.txt


If you don't have these utilities (if you're on Windows), get them from https://github.com/bmatzelle/gow/releases

#3 Concat the files

ffmpeg -f concat -i list.txt -c copy stripped.mp4


If the Video chapters don't start with a keyframe, you'll have to re-encode.