<p>Turns out the latest version by BtbN and gyan.dev <strong>does</strong> have an issue, because the chapters encoded just fine when I used the version 5.1.2 build by gyan.dev.</p>
<p>I previously tried using the release version 6.0 but it had the same problem, so the solution is to simply use release version 5.1.2.</p>

CC BY-SA 4.0
2023-10-31T13:18:44.620Z
Possibly related: https://trac.ffmpeg.org/ticket/10482
AMJ
CC BY-SA 4.0
2023-10-22T09:44:16.157Z
2023-10-22T09:44:16.157Z
Shironats
<p>I am trying to add chapters to a .mp4 file.
When I tried extracting the metadata using the following command:</p>
<p><code>ffmpeg -i INPUT.mp4 -f ffmetadata FFMETADATAFILE.txt</code></p>
<p>I got an output file as follows:</p>
<pre><code>;FFMETADATA1
major_brand=mp42
minor_version=0
compatible_brands=isommp42
encoder=Lavf60.15.100
</code></pre>
<p>So now I try to add some chapters as such</p>
<pre><code>[CHAPTER]
TIMEBASE=1/1000
START=0
END=424510
title=mytitle1

[CHAPTER]
TIMEBASE=1/1000
START=424511
END=941600
title=mytitle2

[CHAPTER]
TIMEBASE=1/1000
START=941601
END=1227260
title=mytitle3
</code></pre>
<p>I use the <code>ffmpeg -i INPUT.mp4 -i FFMETADATAFILE.txt -map_metadata 1 -codec copy OUTPUT.mp4</code> command to encode the metadata to my video file, and for some reason I only ever get 'Chapter 0', 'Chapter 1', and 'Chapter 2'.</p>
<p>I tried using the <code>-map_chapters 1</code> argument as well but results have been unchanged.</p>
<p>I am using the <code>Latest Auto-Build (2023-10-14 13:02)</code> Windows build by BtbN. Thanks in advance for the help.</p>

CC BY-SA 4.0
2024-05-29T03:25:47.720Z
Does adding using the combination `-map_metadata 1 -map_chapters 1` work? See https://superuser.com/a/1320404 .
baltakatei
CC BY-SA 4.0
2024-11-11T00:18:29.633Z
@baltakatei adding -map_chapters was the solution for me. thank you
Jeremy Cantrell
<ffmpeg><video>
FFmpeg does not encode chapter titles
Shironats
# FFmpeg does not encode chapter titles

(Asked by: username_0 on 2023-10-15)

I am trying to add chapters to a .mp4 file.
When I tried extracting the metadata using the following command:
ffmpeg -i INPUT.mp4 -f ffmetadata FFMETADATAFILE.txt
I got an output file as follows:
;FFMETADATA1
major_brand=mp42
minor_version=0
compatible_brands=isommp42
encoder=Lavf60.15.100

So now I try to add some chapters as such
[CHAPTER]
TIMEBASE=1/1000
START=0
END=424510
title=mytitle1

[CHAPTER]
TIMEBASE=1/1000
START=424511
END=941600
title=mytitle2

[CHAPTER]
TIMEBASE=1/1000
START=941601
END=1227260
title=mytitle3

I use the ffmpeg -i INPUT.mp4 -i FFMETADATAFILE.txt -map_metadata 1 -codec copy OUTPUT.mp4 command to encode the metadata to my video file, and for some reason I only ever get 'Chapter 0', 'Chapter 1', and 'Chapter 2'.
I tried using the -map_chapters 1 argument as well but results have been unchanged.
I am using the Latest Auto-Build (2023-10-14 13:02) Windows build by BtbN. Thanks in advance for the help.

**Tags:** ffmpeg, video

> **Comments:**
> **username_1**: Does adding using the combination `-map_metadata 1 -map_chapters 1` work? See https://superuser.com/a/1320404 .  
> **username_2**: @username_1 adding -map_chapters was the solution for me. thank you  

---

## 1 answers

### Answer by username_0 on 2023-10-22. Score: 2 | Accepted answer

Turns out the latest version by BtbN and gyan.dev **does** have an issue, because the chapters encoded just fine when I used the version 5.1.2 build by gyan.dev.

I previously tried using the release version 6.0 but it had the same problem, so the solution is to simply use release version 5.1.2.

> **Comments:**
> **username_3**: Possibly related: https://trac.ffmpeg.org/ticket/10482  

---

