Repository: yt-dlp
Issue: --split-chapters with --add-metadata enabled produces incorrect metadata for m4a files
Labels: bug,external issue,triage,core:post-processor

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting that yt-dlp is broken on a **supported** site
- [X] I've verified that I'm running yt-dlp version **2023.10.13** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

USA

### Provide a description that is worded well enough to be understood

Run command 

```
yt-dlp -f bestaudio[ext=m4a] --extract-audio  --add-metadata --split-chapters https://www.youtube.com/watch?v=UoY2jh-lHMU
```

It produces 3 files

```
[SplitChapters] Chapter 001; Destination: ADMO - 77 (Full EP) - 001 1. Chamomile Tea [UoY2jh-lHMU].m4a
[SplitChapters] Chapter 002; Destination: ADMO - 77 (Full EP) - 002 2. 77 [UoY2jh-lHMU].m4a
[SplitChapters] Chapter 003; Destination: ADMO - 77 (Full EP) - 003 3. Aftershock [UoY2jh-lHMU].m4a
```

the problem is ffmpeg appends all chapters to all split files. For example:

```
ffmpeg -i "ADMO - 77 (Full EP) - 003 3. Aftershock [UoY2jh-lHMU].m4a"
...
Chapters:
    Chapter #0:0: start 0.000000, end 0.000000
      Metadata:
        title           : 2. 77
    Chapter #0:1: start 0.000000, end 141.000000
      Metadata:
        title           : 3. Aftershock
```

Then add first file 'ADMO - 77 (Full EP) - 001 1. Chamomile Tea [UoY2jh-lHMU].m4a' to Deadbeef or haruna
Deadbeef adds it  as three files . 
Haruna displays 3 chapters for the single file and fails to play the 2 out of 3 because they are not exist.
![Screenshot_20231610_221545](https://github.com/yt-dlp/yt-dlp/assets/9714823/99407fe4-2611-4384-9686-eea854aad815)

It's an ffmpeg problem since its used for splitting files and adding metadata and happens only for m4a files. 
Opus works fine. 


### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [ ] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
~/tmp$  yt-dlp -f bestaudio[ext=m4a] --extract-audio  --add-metadata --split-chapters --verbose https://www.youtube.com/watch?v=UoY2jh-lHMU
[debug] Command-line config: ['-f', 'bestaudio[ext=m4a]', '--extract-audio', '--add-metadata', '--split-chapters', '--verbose', 'https://www.youtube.com/watch?v=UoY2jh-lHMU']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.09.24 [088add956] (zip)
[debug] Python 3.11.5 (CPython x86_64 64bit) - Linux-6.5.3-1rodete1-amd64-x86_64-with-glibc2.37 (OpenSSL 3.0.10 1 Aug 2023, glibc 2.37)
[debug] exe versions: ffmpeg 5.1.3-1 (setts), ffprobe 5.1.3-1
[debug] Optional libraries: Cryptodome-3.11.0, brotli-1.0.9, certifi-2022.09.24, pyxattr-0.8.1, secretstorage-3.3.3, sqlite3-3.42.0
[debug] Proxy map: {}
[debug] Post-Processor Plugins: SplitAndTagPP
[debug] Plugin directories: ['/home/sdanilov/.yt-dlp/plugins/SplitAndTag/yt_dlp_plugins']
[debug] Loaded 1886 extractors
[youtube] Extracting URL: https://www.youtube.com/watch?v=UoY2jh-lHMU
[youtube] UoY2jh-lHMU: Downloading webpage
[youtube] UoY2jh-lHMU: Downloading ios player API JSON
[youtube] UoY2jh-lHMU: Downloading android player API JSON
[youtube] UoY2jh-lHMU: Downloading m3u8 information
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[info] UoY2jh-lHMU: Downloading 1 format(s): 140
[debug] Invoking http downloader on "https://rr4---sn-o097znse.googlevideo.com/videoplayback?expire=1697541440&ei=4BguZbjSEO2VsfIPxdOr0Aw&ip=73.231.186.144&id=o-AFVVNjgy-SxknZhHwIXylb-fmDdXxksUvJYGMyw707h5&itag=140&source=youtube&requiressl=yes&mh=av&mm=31%2C29&mn=sn-o097znse%2Csn-n4v7snll&ms=au%2Crdu&mv=m&mvi=4&pl=23&initcwndbps=1698750&vprv=1&svpuc=1&mime=audio%2Fmp4&gir=yes&clen=7658144&dur=473.129&lmt=1565410361577101&mt=1697519581&fvip=2&keepalive=yes&fexp=24007246&beids=24350017&c=IOS&txp=5311222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AGM4YrMwRgIhALy7_V395NRWoFdZr_suVnllIctjhzFt-8RFjxVHVTLjAiEApZ3uA1_lKzyBPVwHgu-DxJUwqR-oFRNYcbPXRGrcx3Y%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AK1ks_kwRgIhAOCo4uShgxnXrOsgbknpcvkSKDE8rYzea7NEFE7vT-D1AiEA-KwHG91z7sAvb378unbzuqiNFtbtS4CTxBwBa9w7gwQ%3D"
[download] ADMO - 77 (Full EP) [UoY2jh-lHMU].m4a has already been downloaded
[download] 100% of    7.30MiB
[ExtractAudio] Not converting audio ADMO - 77 (Full EP) [UoY2jh-lHMU].m4a; the file is already in a common audio format
[Metadata] Adding metadata to "ADMO - 77 (Full EP) [UoY2jh-lHMU].m4a"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:ADMO - 77 (Full EP) [UoY2jh-lHMU].m4a' -i 'file:ADMO - 77 (Full EP) [UoY2jh-lHMU].meta' -map 0 -dn -ignore_unknown -vn -acodec copy -map_metadata 1 -write_id3v1 1 -metadata 'title=ADMO - 77 (Full EP)' -metadata date=20190808 -metadata 'description=ADMO'"'"'s brand new EP dropped today featuring a more acoustic and laid back style with more indie elements than his previous work.

► https://open.spotify.com/album/6Ow6ZKzYPjeTCR2HcqJi3v
► https://soundcloud.com/admoyo/sets/77-ep
► https://admoyo.bandcamp.com/album/77

► Polychora Merch: https://polychora.xyz/merch
► Follow my Spotify playlist: https://open.spotify.com/playlist/7yvr3Cp48xRQ5BzGTTimJh
► Discord: https://polychora.xyz/discord
► Second channel: https://youtube.com/Polychora2

Follow me:
► https://twitter.com/PolychoraYT
► https://soundcloud.com/PolychoraYT

Track List:
1. Chamomile Tea - 0:00
2. 77 - 2:57
3. Aftershock - 5:32' -metadata 'synopsis=ADMO'"'"'s brand new EP dropped today featuring a more acoustic and laid back style with more indie elements than his previous work.

► https://open.spotify.com/album/6Ow6ZKzYPjeTCR2HcqJi3v
► https://soundcloud.com/admoyo/sets/77-ep
► https://admoyo.bandcamp.com/album/77

► Polychora Merch: https://polychora.xyz/merch
► Follow my Spotify playlist: https://open.spotify.com/playlist/7yvr3Cp48xRQ5BzGTTimJh
► Discord: https://polychora.xyz/discord
► Second channel: https://youtube.com/Polychora2

Follow me:
► https://twitter.com/PolychoraYT
► https://soundcloud.com/PolychoraYT

Track List:
1. Chamomile Tea - 0:00
2. 77 - 2:57
3. Aftershock - 5:32' -metadata 'purl=https://www.youtube.com/watch?v=UoY2jh-lHMU' -metadata 'comment=https://www.youtube.com/watch?v=UoY2jh-lHMU' -metadata artist=Polychora -movflags +faststart 'file:ADMO - 77 (Full EP) [UoY2jh-lHMU].temp.m4a'
[SplitChapters] Splitting video by chapters; 3 chapters found
[SplitChapters] Chapter 001; Destination: ADMO - 77 (Full EP) - 001 1. Chamomile Tea [UoY2jh-lHMU].m4a
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -ss 0.0 -t 177.0 -i 'file:ADMO - 77 (Full EP) [UoY2jh-lHMU].m4a' -map 0 -dn -ignore_unknown -c copy -movflags +faststart 'file:ADMO - 77 (Full EP) - 001 1. Chamomile Tea [UoY2jh-lHMU].m4a'
[SplitChapters] Chapter 002; Destination: ADMO - 77 (Full EP) - 002 2. 77 [UoY2jh-lHMU].m4a
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -ss 177.0 -t 155.0 -i 'file:ADMO - 77 (Full EP) [UoY2jh-lHMU].m4a' -map 0 -dn -ignore_unknown -c copy -movflags +faststart 'file:ADMO - 77 (Full EP) - 002 2. 77 [UoY2jh-lHMU].m4a'
[SplitChapters] Chapter 003; Destination: ADMO - 77 (Full EP) - 003 3. Aftershock [UoY2jh-lHMU].m4a
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -ss 332.0 -t 141.0 -i 'file:ADMO - 77 (Full EP) [UoY2jh-lHMU].m4a' -map 0 -dn -ignore_unknown -c copy -movflags +faststart 'file:ADMO - 77 (Full EP) - 003 3. Aftershock [UoY2jh-lHMU].m4a'
```