Answers.Body: <p>Try adding this <code>ffmpeg</code> parameter:</p>
  
  <pre><code>-map_chapters -1
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-06T05:01:21.610Z
Answers.Text: This only removes the chapter ToC, and doesn't affect the actual video stream.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-04T21:07:58.683Z
Answers.Text: Finally, thank you!!
Answers.UserDisplayName: Riveascore
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2017-01-06T00:22:43.447Z
Answers.LastActivityDate: 2019-12-20T18:09:30.250Z
Answers.LastEditDate: 2019-12-20T18:09:30.250Z
Answers.UserDisplayName: user17660
Answers.Body: <p>I'm unaware of a function similar Mkvtoolnix' split before chapters functionality in ffmpeg, so you probably have to use <a href="https://stackoverflow.com/q/5651654/2010467">seeking</a> or MP4box as one has suggested in this thread. You are likely to face the same issues as have been reported for mkvmerge/Mkvtoolnix, being that splitting is not accurate for compressed video streams and can only be done at key frame boundaries. There is probably no way around loading the file into a video editor, cutting and re-encoding it for an accurate result… or splitting and re-encoding with ffmpeg instead of just copying the stream data.</p>
  
  <p>I haven't heard of a format for chapters in subtitles, are these just regular subtitles? If so, which format? In this case you probably need to parse the file and extract or reformat the time codes if necessary.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-06T14:20:50.387Z
Answers.LastActivityDate: 2017-05-06T14:20:50.387Z
Answers.LastEditDate: 2017-05-23T12:40:36.170Z
Answers.UserDisplayName: LiveWireBT
Body: <p>I have a video file, video.mp4. This file has 3 chapters, 'Beginning', 'Middle' and 'End'. I want to delete chapter 'Middle' (the actual video, not just the metadata) and combine chapters 'Beginning' and 'End' back into one file. The chapters appear to be stored as subtitles.</p>
  
  <p>How can I do this with ffmpeg?</p>
  
Tags: <ffmpeg>
Title: FFMPEG: Delete chapters
UserDisplayName: Tomás Gray
ThreadText: # FFMPEG: Delete chapters
  
  (Asked by: username_0 on 2016-12-30)
  
  I have a video file, video.mp4. This file has 3 chapters, 'Beginning', 'Middle' and 'End'. I want to delete chapter 'Middle' (the actual video, not just the metadata) and combine chapters 'Beginning' and 'End' back into one file. The chapters appear to be stored as subtitles.
  
  How can I do this with ffmpeg?
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-01-06. Score: 21
  
  Try adding this `ffmpeg` parameter:
  
  ```
  -map_chapters -1
  
  ```
  
  > **Comments:**
  > **username_2**: This only removes the chapter ToC, and doesn't affect the actual video stream.  
  > **username_3**: Finally, thank you!!  
  
  ---
  
  ### Answer by username_4 on 2017-05-06. Score: 0
  
  I'm unaware of a function similar Mkvtoolnix' split before chapters functionality in ffmpeg, so you probably have to use [seeking](https://stackoverflow.com/q/5651654/2010467) or MP4box as one has suggested in this thread. You are likely to face the same issues as have been reported for mkvmerge/Mkvtoolnix, being that splitting is not accurate for compressed video streams and can only be done at key frame boundaries. There is probably no way around loading the file into a video editor, cutting and re-encoding it for an accurate result… or splitting and re-encoding with ffmpeg instead of just copying the stream data.
  
  I haven't heard of a format for chapters in subtitles, are these just regular subtitles? If so, which format? In this case you probably need to parse the file and extract or reformat the time codes if necessary.
  
  
  ---
  
  