Jump to content

Audiobooks: Recognize Chapters in Single File


negativzeroe

Recommended Posts

negativzeroe

Mostly pertains to m4b but I have seen tags on mp3 files that have time stamps you can jump around in too. Can pm if example needed.

  • Like 7
  • Agree 6
Link to comment
Share on other sites

mrfragger

I spent many hours yesterday screwing around with m4b-tool (command line (win, linux, Mac -- free wrapper for ffmpeg to create m4b audiobooks).

Followed the instructions to install on macOS Catalina with brew m4b-tool version 0.4.2 (from August 11, 2019)

https://github.com/sandreas/m4b-tool

then I wish I read the instructions better but after that's finished upgrade to the latest pre-release (Feb 9, 2021) or if a newer one comes out.

https://github.com/sandreas/m4b-tool/releases/tag/latest

Here is the basic command I used.

m4b-tool merge -v --skip-cover --audio-channels 1 --audio-bitrate 32k --audio-samplerate 22050 --audio-codec aac --audio-profile aac_he_v2 --jobs 4 --use-filenames-as-chapters "data/my-audio-book/" -o "data/my-audio-book.m4b"

-v verbose
-- skip-cover (I hardly ever use covers otherwise put cover.jpg in same directory as all the mp3 files and don't specify this option)
--audio-channel 1 (used to save data.  Of course if plays to both left and right but for audio books no need for stereo)
--audio-codec (AAC I think this one is default so might not have to specify this...can't remember)
-- audio-bitrate (done tons of testing and 32kbps with 22050 Hz and AAC using aac_he_v2 (AAC High Efficiency version 2) seems to save about 7MB for a typically audiobook)
--jobs 4 (I have a quad core CPU so it uses all cores to process.  This speeds it up so much faster (4x faster) than $5 AudioBook Builder on Mac)
--use-filenames-as-chapters (put the mp3s and appropriately name with the chapters.

So that worked great and works on IINA and BookPlayer (iOS) and shows chapters in the resulting m4b.

Wanted to get chapters for some a pre-existing m4b audiobook that had no chapters and do it automatically.

Next tried to use --silence-detection with m4b-tool split and had memory errors and even tried upping memory limit in php.default.ini or whatever but no luck.

So found out Audacity / Select All / Analyze / Silence Detection (set to 3000ms (3 seconds) finds chapters perfectly and in about a minute.  Edit labels you can name the chapters if you wish.  If not just use the numbering option when using File / Export Multiple files.  Choose mp3 with CBR at 32kbps.  Then the resulting mp3 files can be used to make an audiobook using m4b-tool merge as detailed above.

Note: even though audacity has export labels.txt and I couldn't figure out how to create chapter markings with m4b-chaps.  My brain was fried at that time.

Link to comment
Share on other sites

negativzeroe
9 hours ago, mrfragger said:

I spent many hours yesterday screwing around with m4b-tool (command line (win, linux, Mac -- free wrapper for ffmpeg to create m4b audiobooks).

Followed the instructions to install on macOS Catalina with brew m4b-tool version 0.4.2 (from August 11, 2019)

https://github.com/sandreas/m4b-tool

then I wish I read the instructions better but after that's finished upgrade to the latest pre-release (Feb 9, 2021) or if a newer one comes out.

https://github.com/sandreas/m4b-tool/releases/tag/latest

Here is the basic command I used.




m4b-tool merge -v --skip-cover --audio-channels 1 --audio-bitrate 32k --audio-samplerate 22050 --audio-codec aac --audio-profile aac_he_v2 --jobs 4 --use-filenames-as-chapters "data/my-audio-book/" -o "data/my-audio-book.m4b"

-v verbose
-- skip-cover (I hardly ever use covers otherwise put cover.jpg in same directory as all the mp3 files and don't specify this option)
--audio-channel 1 (used to save data.  Of course if plays to both left and right but for audio books no need for stereo)
--audio-codec (AAC I think this one is default so might not have to specify this...can't remember)
-- audio-bitrate (done tons of testing and 32kbps with 22050 Hz and AAC using aac_he_v2 (AAC High Efficiency version 2) seems to save about 7MB for a typically audiobook)
--jobs 4 (I have a quad core CPU so it uses all cores to process.  This speeds it up so much faster (4x faster) than $5 AudioBook Builder on Mac)
--use-filenames-as-chapters (put the mp3s and appropriately name with the chapters.

So that worked great and works on IINA and BookPlayer (iOS) and shows chapters in the resulting m4b.

Wanted to get chapters for some a pre-existing m4b audiobook that had no chapters and do it automatically.

Next tried to use --silence-detection with m4b-tool split and had memory errors and even tried upping memory limit in php.default.ini or whatever but no luck.

So found out Audacity / Select All / Analyze / Silence Detection (set to 3000ms (3 seconds) finds chapters perfectly and in about a minute.  Edit labels you can name the chapters if you wish.  If not just use the numbering option when using File / Export Multiple files.  Choose mp3 with CBR at 32kbps.  Then the resulting mp3 files can be used to make an audiobook using m4b-tool merge as detailed above.

Note: even though audacity has export labels.txt and I couldn't figure out how to create chapter markings with m4b-chaps.  My brain was fried at that time.

I have used it too, just was annoying with a CD rip that I tried it with that added each track as a chapter so it had hundreds of chapters lol.

Edit, didn't read the audacity part, could you make a little guide? What precisely did you load into Audacity? The m4b file from the first run?

Edited by negativzeroe
Link to comment
Share on other sites

mrfragger

Yea just load the m4b audiobook into audacity (drag it in)  not m4b file from first run.  An existing m4b file that was NOT chaptered cuz it was made with a single mp3 for instance.  If it already has chapters no need to do it again.

then select all

then analyze | silence detection 

then edit labels

if I did under 3 seconds it found too many break points  

then export | multiple files

choose mp3 CBR 32k

then take those exported mp3s and make a chaptered audio book  

 

Edited by mrfragger
Link to comment
Share on other sites

negativzeroe
40 minutes ago, mrfragger said:

Yea just load the m4b audiobook into audacity (drag it in)  not m4b file from first run.  An existing m4b file that was NOT chaptered cuz it was made with a single mp3 for instance.  If it already has chapters no need to do it again.

then select all

then analyze | silence detection 

then edit labels

if I did under 3 seconds it found too many break points  

then export | multiple files

choose mp3 CBR 32k

then take those exported mp3s and make a chaptered audio book  

 

Oh ok, the book in question has like 10 cd's and 10 tracks per cd so I need to combine first then do that, but I couldn't get that m4b-tool to work without creating chapters. As in, it would create chapters even when told not to.

Link to comment
Share on other sites

mrfragger

Yea coming all with 100 chapters and then drag that m4b into audacity and split based on silence. Voila ravioli. 

  • Like 1
Link to comment
Share on other sites

negativzeroe
8 hours ago, mrfragger said:

Yea coming all with 100 chapters and then drag that m4b into audacity and split based on silence. Voila ravioli. 

I will give it a shot.

Link to comment
Share on other sites

  • 4 months later...
Ninko

I'm asking because I'm trying to decide whether to keep my audio books as one single m4b file or split them into chapters, but if you say you'll planning to support chapters at some point, it's not worth my time and effect.

Thanks

Link to comment
Share on other sites

negativzeroe
15 hours ago, Ninko said:

I'm asking because I'm trying to decide whether to keep my audio books as one single m4b file or split them into chapters, but if you say you'll planning to support chapters at some point, it's not worth my time and effect.

Thanks

I would say follow the OCD. If you want to, do it. I put the effort in for some of my favorite books, but emby is mostly a library organizer outside of movies and TV, and even then I find various instances of a music album being split in two. For audiobooks I copy to my phone and use Listen: https://play.google.com/store/apps/details?id=com.acmeandroid.listen

Link to comment
Share on other sites

mrfragger

I agree it might be a long time till emby gets m4b chapter support.  I still keep them in there just to quickly browse available titles and stream if necessary.  But I really just put them on my eyephone and use BookPlayer which is free which supports m4b chapters.  For windows and linux use VLC. For Mac IINA.

Link to comment
Share on other sites

  • 2 weeks later...
Chyron
On 8/9/2021 at 4:57 PM, mrfragger said:

it might be a long time till emby gets m4b chapter support for album-level resume.

This makes me sad.

Link to comment
Share on other sites

  • 4 months later...

Happy New Year! 

I am in the process of adding audiobooks to Emby, so I can decide where to put my efforts (hopefully m4b) are we any closer?

Many thanks :-)

Link to comment
Share on other sites

On 1/2/2022 at 8:00 AM, mbc0 said:

Happy New Year! 

I am in the process of adding audiobooks to Emby, so I can decide where to put my efforts (hopefully m4b) are we any closer?

Many thanks 🙂

Hi, yes, given that the feature is already there for video, we should be able to easily add this. Can you provide a sample file for testing? Thanks.

  • Like 2
Link to comment
Share on other sites

2 hours ago, Luke said:

Hi, yes, given that the feature is already there for video, we should be able to easily add this. Can you provide a sample file for testing? Thanks.

File link emailed to you Luke,

Many thanks!

Link to comment
Share on other sites

  • 4 weeks later...
  • 4 weeks later...

Just adding my +1. M4B chapter support would be huge.

I listen to audio books more often than I watch movies or listen to music and the options out there for proper streaming in a decent player are slim to none.

Link to comment
Share on other sites

46 minutes ago, destari said:

Just adding my +1. M4B chapter support would be huge.

I listen to audio books more often than I watch movies or listen to music and the options out there for proper streaming in a decent player are slim to none.

Hi, yes this is coming in the 4.7 release. Thanks.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 2 months later...
dankles

I'm now running the 4.7 release that just came out. In the release notes it says "Enable chapters for audio books". However I don't see any chapters showing in the emby web interface for my m4b audiobook files. Do I need to do something extra to make them show up?

Link to comment
Share on other sites

7 minutes ago, dankles said:

I'm now running the 4.7 release that just came out. In the release notes it says "Enable chapters for audio books". However I don't see any chapters showing in the emby web interface for my m4b audiobook files. Do I need to do something extra to make them show up?

Hi, you'll need to refresh metadata on existing tracks.

Link to comment
Share on other sites

Happy2Play
20 minutes ago, Luke said:

Hi, you'll need to refresh metadata on existing tracks.

Can't remember how much testing was done here but chapters are only shown in OSD for single m4b files.

image.thumb.png.d048bc36c992cc83e15b09e4499ed734.png

Edited by Happy2Play
Link to comment
Share on other sites

  • 2 weeks later...
destari

In my case I don't see a chapter menu at all. Even after re-scanning files and refreshing metadata it seems to be treated as an ordinary audio file,

despite being an m4b file and playing properly with chapters in other players.

Edited by destari
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...