NOTE - I've never seen an M4B file, so maybe someone else can give you a better answer.Do you need to do it automatically? I don't know how to do it automatically, but with any audio editor you can cut-out sections and save the separate sections in a variety of formats. (That assumes the audio editor can open the M4B files.) If you don't already have an audio editor, Audacity is FREE!!! (open source).Or, MP3DirectCut[/u] (FREE!!!) can take the one-big MP3 file and chop it into little files (manually).
Would you point me to a link with such file (m4b with chapters), for test purposes? Maybe you can upload some?
Have you tried foobar2000?It can handle m4a/m4b with chapters and should be able to convert to individual mp3 files.You'll need lame.exe for converting to mp3, though.
Is there any particular reason you need to transcode from AAC to MP3, rather than just splitting the file into multiple AAC (.m4a) files?
Quote from: Zarggg on 24 September, 2009, 11:10:00 AMIs there any particular reason you need to transcode from AAC to MP3, rather than just splitting the file into multiple AAC (.m4a) files?Hello Zarggg,No, there is no particular reason. Splitting to AAC is ok as long as it keeps the same structure of chapters as in the ipod and it is done automatically. I can always convert it back to MP3. Any ideas?Thanks.
If anyone is still interested I wrote a little python script to do this. You can find the git repository here: https://github.com/valekhz/m4b-converter. If you don't use git you can just download the python file here: https://github.com/valekhz/m4b-converter/raw/master/m4b.py.You'll need python (only tested with 2.7 so far) and ffmpeg. Place the m4b.py somewhere and drag your *.m4b file onto m4b.py, or use the command line. There's a README in the git repository for more info on how to use it. I haven't been able to test that many .m4b files yet but those I've tried have worked great. I've tested it on Windows 7 and Ubuntu.Basically it works by parsing the output of ffmpeg -i file.m4b to get the chapter data, encodes the audio and splits it based on the data from ffmpeg. Sorry if the code is a bit messy, haven't been coding in python for a while.
Thank you, I also have been looking for this for weeks! Now my problem: I get the message "no chapter information found", although iTunes shows them and ffmpeg parses a 'subtitle' stream... What can I do?File-Info:m4b_Info.txt
4. Put m4b.py into any directory, which has enough space for the .mp3-output files (of course, as valekhz points out you may change the output-dir by editing the .py file, but I wouldn't dare, never having come close to coding such things...)
Thank you for writing the guide, nbarzgar.
If you could post the output of ffmpeg.exe -i myfile.m4b I may be able to help. This particular error message shows up when the script couldn't find/parse chapter data from the output. The current implementation of getting the chapter data is very ugly and if anyone knows of a library that can read the chapters directly I could improve the script.
I put the output here.Thanks for trying to help and being so fast about it!
VLC shows the chapters!!So now what would I do? I know that VLC allows converting, but how would I go about it in this case? Or did you mean yet another solution?
Awesome. I will remove the old chapter code and use VLC's API to get them instead. This will be a lot more reliable than parsing command output. There should be a new version out tomorrow.
I finally got the time to finish the script.
When I ran the new script from Dec 10 (I think I'm following the instructions right), I simply get an error message "This application has failed to start because MSVCP100.dll was not found. Reinstalling the application may fix this problem." The first few letters do suggest that the dll you compiled may be creating a need for other components of Microsoft Visual Studio, so I downloaded and installed it.