Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  iPod chapter format
« previous next »
  • Print
Pages: [1] 2

Author Topic: iPod chapter format  (Read 11551 times)

Offline everwicked

  • Member
  • *
  • Posts: 13
iPod chapter format
« on: May 27, 2007, 05:28:22 PM »
Hello everyone

I am trying to create software similar to ChapterTool for MacOS but for Windows since there is no reliable way to make audiobooks with chapters from MP3s at the monent.

Does anyone know what the chapter format is for iPod MP4 files?

Thanks
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: iPod chapter format
« Reply #1 on: May 27, 2007, 05:51:33 PM »
Rockbox doesn't yet use the chapters in MP4 files. You might want to start by implementing support for them in Rockbox.
Logged

Offline linuxstb

  • Developer
  • Member
  • *
  • Posts: 1163
Re: iPod chapter format
« Reply #2 on: May 27, 2007, 06:02:18 PM »
Quote from: everwicked on May 27, 2007, 05:28:22 PM
I am trying to create software similar to ChapterTool for MacOS but for Windows since there is no reliable way to make audiobooks with chapters from MP3s at the monent.

If your aim is to make audiobooks with chapters from MP3s, why not just create a cuefile (supported by Rockbox), or simply just split the MP3 file into one file per chapter?
Logged

Offline everwicked

  • Member
  • *
  • Posts: 13
Re: iPod chapter format
« Reply #3 on: May 27, 2007, 06:34:59 PM »
Quote from: Llorean on May 27, 2007, 05:51:33 PM
Rockbox doesn't yet use the chapters in MP4 files. You might want to start by implementing support for them in Rockbox.

Where can I find information on how chapters are coded in MP4 files? I have been looking for a day and a half now and found nothing.
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: iPod chapter format
« Reply #4 on: May 27, 2007, 06:49:12 PM »
Well, since Rockbox doesn't support them, you're not likely to find an expert in them around here...
Logged

Offline NicolasP

  • Developer
  • Member
  • *
  • Posts: 195
Re: iPod chapter format
« Reply #5 on: May 28, 2007, 10:01:59 AM »
everwicked: I once tried to find that information too but never found anything really useful. What I can tell you is that Apple uses some sort of proprietary format to store the chapters, as opposed to the standardised way others seem to use. I'd really like to get more information about this, so that I could implement these chapters in rockbox like cuesheets are.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9230
Re: iPod chapter format
« Reply #6 on: May 28, 2007, 11:17:39 AM »
You could ask on Hydrogenaudio.  A number of AAC developers read that site.
Logged

Offline NicolasP

  • Developer
  • Member
  • *
  • Posts: 195
Re: iPod chapter format
« Reply #7 on: May 28, 2007, 05:30:59 PM »
I've found that MP4Box is capable of reading the chapter info from iTunes podcasts (those created with Apple's ChapterTool or an equivalent). It can output an SRT file, so I wrote a small tool to convert an SRT file to a cuesheet and a small bash script to extract a cuesheet directly from an MP4 (ie MP4, M4A or M4B) file. I'll make these tools available soon.
The thing is that directories get a bit cluttered with one cuesheet per audio file, so I want to give rockbox the capability of looking for cuesheets in one precise directory.
Logged

Offline everwicked

  • Member
  • *
  • Posts: 13
Re: iPod chapter format
« Reply #8 on: May 28, 2007, 07:09:16 PM »
Do you know if MP4Box can also WRITE those chapters?
Logged

Offline NicolasP

  • Developer
  • Member
  • *
  • Posts: 195
Re: iPod chapter format
« Reply #9 on: May 28, 2007, 07:58:35 PM »
It can add chapter info to an MP4 file, but I don't think that info will be compatible with iTunes and the iPods.
EDIT: Actually it might be worth trying. you can try adding an SRT stream to an audio file and see if you get any results. Also maybe the chapter feature will work but I don't expect that. I can't test anything because I have neither iTunes (linux only) nor an iPod.
« Last Edit: May 28, 2007, 08:40:46 PM by NicolasP »
Logged

Offline everwicked

  • Member
  • *
  • Posts: 13
Re: iPod chapter format
« Reply #10 on: May 29, 2007, 12:13:10 AM »
Can you provide me with an SRT file to try with? Also, if you know the command to add the SRT to the MP4 files with MP4box, please let me know, I have never used it before.
Logged

Offline NicolasP

  • Developer
  • Member
  • *
  • Posts: 195
Re: iPod chapter format
« Reply #11 on: May 29, 2007, 09:08:16 PM »
I uploaded a sample M4B file, from which I extracted the second track (the chapters, stored as subtitles) in various formats : SRT, TimedText (TTXT), and raw.
The commands I used are easy :
Code: [Select]
MP4Box -srt 2 Zemixx119.m4b
MP4Box -ttxt 2 Zemixx119.m4b
MP4Box -raw 2 Zemixx119.m4b
The output is a file in the current directory.

To extract the audio track :
Code: [Select]
MP4Box -raw 1 Zemixx119.m4b"1" or "2" indicates the track to extract. You can get a list of tracks (and other interesting information) like this :
Code: [Select]
MP4Box -info Zemixx119.m4bTrack 3 contains the pictures and track 4 has the URLS for the links displayed throughout the podcast.

To create a new MP4 file from the tracks I extracted, it's easy too :
Code: [Select]
MP4Box -add inputFile destinationFileThere can be several -add statements, i.e. :
Code: [Select]
MP4Box -add Zemixx119_track1.aac -add Zemixx119_2_text.ttxt Zemixx119.mp4Maybe an MP4 file created like this (and maybe renamed to M4A or M4B) would display chapters in iTunes and an iPod, but I doubt it.

The full documentation for MP4Box can be found here.



Also, I uploaded my tools to extract chapters from an iTunes M4B file and convert them to a cuesheet file for rockbox : srt2cue.c and m4btocue.sh.
To compile srt2cue.c, just type :
Code: [Select]
gcc srt2cue.c -o srt2cueThen to use m4b2cue.sh you need to edit it so it knows the path to srt2cue and MP4Box, and then it's quite straightforward :
Code: [Select]
bash m4b2cue.sh [FILE1 [FILE2 ...]]will output a cuesheet file of the same name for each MP4 file it finds (it will always try to extract the second track).
Logged

Offline NicolasP

  • Developer
  • Member
  • *
  • Posts: 195
Re: iPod chapter format
« Reply #12 on: May 31, 2007, 03:33:38 PM »
No results ?
Logged

Offline everwicked

  • Member
  • *
  • Posts: 13
Re: iPod chapter format
« Reply #13 on: May 31, 2007, 08:15:22 PM »
I haven't tried it yet - I need a few days, life's caught up with me!
Logged

Offline everwicked

  • Member
  • *
  • Posts: 13
Re: iPod chapter format
« Reply #14 on: June 06, 2007, 05:47:34 PM »
Quote
MP4Box.exe -add Zemixx119_track1.aac test.mp4
Cannot open destination file test.mp4: I/O Error

I get this - any ideas?
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  iPod chapter format
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.111 seconds with 22 queries.