iosffmpegpodcast

Adding chapters to MP4 files, and being identified on iOS 12 podcast app


I have an MP4 file, where I've added chapters via ffmpeg.

But in the iOS 12 Podcasts app, from Apple, the chapters don't appear. This should happen, as noted by idownloadblog.com

Preview of how Chapters should look in iOS

In comparison, when using QuickLook on MacOS, the list of chapters can be seen by clicking the chapters button (in the bottom right hand side of the window).

Preview of QuickLook in MacOS

And opening in QuickTime Player, while there isn't a list of chapters to view, you can use the "View > Next Chapter" menu item.

So I'm assuming this is a bug in iOS... but I'm wondering if there is another way to add chapters? or if I've made a mistake?


My current process is to create a "ffmetadata" file, as noted in the ffmpeg documentation:

;FFMETADATA1
title=Example

[CHAPTER]
TIMEBASE=1/1000
START=0
END=221913
title=Chapter 1

[CHAPTER]
TIMEBASE=1/1000
START=221913
END=1169241
title=Chapter 2

https://ffmpeg.org/ffmpeg-formats.html#Metadata-1

Then I've tried each of the following commands:

ffmpeg -i 2019-01-02.mp4 -i 2019-01-02.meta -map_metadata 1 -codec copy 2019-01-02-chapters.mp4
ffmpeg -i 2019-01-02.mp4 -i 2019-01-02.meta -map_metadata 1 2019-01-02-chapters.mp4
ffmpeg -i 2019-01-02.mp4 -i 2019-01-02.meta -map_metadata 1 2019-01-02-chapters.mp3

On a slightly unrelated note, the third party app "RSSRadio" does list the chapters, but the feature added in version 4 that allows you to "skip directly to the start of the next chapter", if the next chapter starts within the next 3 minutes, does not seem to work.


Solution

  • Simple answer, it needs to be an M4A file.

    While MP4 and M4A files are pretty much the same, M4A is limited to audio format, whereas an MP4 can also contain video.