Rockbox Development > Starting Development and Compiling
iPod chapter format
everwicked:
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.
NicolasP:
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: ---MP4Box -srt 2 Zemixx119.m4b
MP4Box -ttxt 2 Zemixx119.m4b
MP4Box -raw 2 Zemixx119.m4b
--- End code ---
The output is a file in the current directory.
To extract the audio track :
--- Code: ---MP4Box -raw 1 Zemixx119.m4b
--- End code ---
"1" or "2" indicates the track to extract. You can get a list of tracks (and other interesting information) like this :
--- Code: ---MP4Box -info Zemixx119.m4b
--- End code ---
Track 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: ---MP4Box -add inputFile destinationFile
--- End code ---
There can be several -add statements, i.e. :
--- Code: ---MP4Box -add Zemixx119_track1.aac -add Zemixx119_2_text.ttxt Zemixx119.mp4
--- End code ---
Maybe 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: ---gcc srt2cue.c -o srt2cue
--- End code ---
Then 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: ---bash m4b2cue.sh [FILE1 [FILE2 ...]]
--- End code ---
will output a cuesheet file of the same name for each MP4 file it finds (it will always try to extract the second track).
NicolasP:
No results ?
everwicked:
I haven't tried it yet - I need a few days, life's caught up with me!
everwicked:
--- Quote ---MP4Box.exe -add Zemixx119_track1.aac test.mp4
Cannot open destination file test.mp4: I/O Error
--- End quote ---
I get this - any ideas?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version