Audiobooks / Podcasts /other audio related stuff you may have
#1
Been a while!, sorry !!!

Anyway, earlier this year, or sometime last year ( I forget when), someone asked me about improved handling of audiobooks.  Really, what they were after was Kodi being able to handle audiobooks based on mp3/flac/mp4/ape/some-audio-format rather than just m4b/mka (mka could actually be anything really - I have one floyd album that's mka......).

Anyway, I did some thinking and came up with some code that not only improves the handling of audiobooks as it is currently (doesn't just depend on file extension but improves the adding of m4b/mka files to the library) but also extends it to cover any other audio format that Kodi understands.  Resuming an mp3/flac/some-audio-codec audiobook works the same as resuming an m4b book now (resumes from the beginning of the chapter you were listening to when you stopped Kodi).  Filtering can be done via a smart playlist or a custom node (I have considered adding an auto-created 'audiobook' node in the same way that the boxset node is created, just haven't implemented it yet!).

No JSON support as of now but could be added easily I guess. (HATE the JSON API!!!!).

So, code is written, works fine as far as I can tell but hasn't yet been PR'd to Kodi.  Note, this won't be backported so it will only ever be a new feature for V21.

Extending albums/singles to include (possibly podcasts) and audiobooks just seems sensible to me.  The tags already exist (certainly for audiobooks) and if you use MB and Picard to tag with, then likely they are already set correctly.

Still, I'd like to get other opinions on whether extending the music library to be more of an audio library is something that would be worthwhile.

All your thoughts, criticisms, or other ideas are most welcome, as always.  Oh, and Happy New Year to you all.

Cheers,

BE.
Learning Linux the hard way !!
Reply
#2
I would welcome this, especially if audiobooks / podcasts / etc. could be shown in a separate category from the default 'albums' view within Kodi. I have a small selection of audiobooks in various formats. Some are chapter per track, some are one big audio file for the entire book. A couple in standard 'audiobook audio formats' but most aren't. Then I also have some radio shows from many years ago that I've made into 'albums' manually in terms of tagging, just to work with the various media player software (Kodi included) that I use, and finally some podcasts from the BBC Sounds website that I've downloaded and retagged / re-organized to make them more compatible with display and playback in Kodi.

Some of the non-music 'audio' content I have will be in the MusicBrainz database, some won't. Either way, as it stands, Kodi's audiobook support is very minimal at best, and I for one would be interested to see what you come up with.

Another issue I've seen with this type of content, especially with podcast plugins (Like BBC Sounds / Podcasts plugins) for Kodi is the way file lists in those types of plugin are presented. As it stands, most podcasts are listed with the most recent content (episode) first, so if there's not specific skin support for reversing the file lists, they just aren't viable for listening to within Kodi, as you want to be listening to the first episode of a new podcast first, which always appears at the bottom, and the sort context menu item, in my experience, has little beneficial impact on the display order, as it stands. Without viable track numbering, and in some cases, no dates in the filenames / tags, it's never going to show up in the right order.

Smile

Dan / Gib.
Image
Reply
#3
Current code displaying an audiobook - This is actually split over two files and you can see that there are two of each track number.

Image

After changes - Book is correctly split into two parts each containing the correct tracks. This is an m4b style audiobook.

Image
Image

Also, mp3/any other format audiobook will work as long as it's correctly tagged. There is a mixture of mp3 and m4b books here.
Image

Clicking on any chapter of an in-progress book automatically prompts you to either resume from where you left off, or start playing at the chapter you clicked on. This works for all audiobooks. Playback will resume at the beginning of the chapter you were last listening to if you choose the resume option.

Image
Learning Linux the hard way !!
Reply
#4
Looking good so far black_eagle.

Smile

Regarding tags, What do you use for tagging them? I know MusicBrainz does support audiobooks (after a fashion) but Picard isn't really optimized for it. I was also under the impression they (might) have a separate database (and tool / UI) in the works, specifically to cater to AudioBooks, but their site(s) are a bit light on details / roadmap as far as I can tell.

Dan / Gib.
Image
Reply
#5
The only tag that needs setting is MusicBrainz Album Type  : audiobook and picard should set that automatically for any audiobooks on mb.  Or at least, it has for the ones I've tested with.  The tag can contain other stuff too.  It could be other / audiobook for instance.  As long as it contains audiobook somewhere in that tag then it'll work.
Learning Linux the hard way !!
Reply
#6
Useful info black_eagle, thanks for that.

So using this rationale, I should be able to add that tag to audiobooks that aren't present on MusicBrainz, manually with Picard, and your add-on will still be able to work with them?

Obviously, manually adding entries to the MusicBrainz database myself, would be the preferred option, but assuming I don't have time / relevant level of information / whatever, to satisfy MusicBrainz requirements, this could be used as a fallback option to 'force' them to be recognized as 'audiobooks' as a pose to 'music' by your add-on, and by extension, Kodi itself?

Dan / Gib.
Image
Reply
#7
Would love to see some better Audiobook support come to Kodi!  My kids listen to them regularly.
 
For me, resuming from the point of stopped playback would be better than going back to the beginning of the chapter.  With kids etc, there can be a lot of start/stopping, and it would not always suit to go back.  So ideally, 'Play', 'Resume' (as per all video resumes!), 'Resume from Chpt 4'
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#8
(2023-02-12, 02:07)gibxxi Wrote: I should be able to add that tag to audiobooks that aren't present on MusicBrainz, manually with Picard,

Yes, exactly.
(2023-02-12, 02:07)gibxxi Wrote: your add-on

It's not an add-on.  This is a change to Kodi core.
(2023-02-12, 04:10)bossanova808 Wrote: For me, resuming from the point of stopped playback would be better than going back to the beginning of the chapter.

It would be better for me too, but I'm not sure that it can be (easily) implemented.  Resuming from chapter was already written so it just needed extending to fit the required use-case.  Regardless, it's nice to know that there are at least a couple of users that would benefit and not just me.
Learning Linux the hard way !!
Reply
#9
(2023-02-12, 04:10)bossanova808 Wrote: Would love to see some better Audiobook support come to Kodi!  My kids listen to them regularly.
 
For me, resuming from the point of stopped playback would be better than going back to the beginning of the chapter.  With kids etc, there can be a lot of start/stopping, and it would not always suit to go back.  So ideally, 'Play', 'Resume' (as per all video resumes!), 'Resume from Chpt 4'

100% agree on the resume feature for audiobooks at the point of stopping.  I ended up coding this feature into my addon to provide the interim capability.  It would be great to see this feature native to Kodi.


Thanks,

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#10
Is it "Audiobook" or "audiobook"? It says the latter on the website, https://musicbrainz.org/doc/Release_Group/Type , and I have been using that. In addition, could you allow Audio drama to be treated in a similar manner?
Reply
#11
(2023-02-14, 02:19)LongMan Wrote: Is it "Audiobook" or "audiobook"?

Doesn't matter, its not case sensitive at all.  AudioBook, audiobook, AUDIOBOOK will all work.
(2023-02-14, 02:19)LongMan Wrote: In addition, could you allow Audio drama to be treated in a similar manner?

I have no plans to add that at the current time.
Learning Linux the hard way !!
Reply
#12
(2023-02-12, 04:10)bossanova808 Wrote: For me, resuming from the point of stopped playback would be better than going back to the beginning of the chapter

Lol, nearly been a year.  Anyway, when looking at improving the tag reading for MKA files, I also decided to look at this again as they are currently very much intertwined.  I have some new code that can resume from exactly where you left off in an audiobook.  In fact, I have also played around with an AS.xml setting to make Kodi jump back XX seconds when resuming a chapter.  This would be a Kodi-wide setting, not per book but it will jump back 30 seconds for instance, as I don't always remember what happened previously.  Of course, that could just be my age........

If there are less than xx seconds to jump back, or jumping back xx seconds would put us within the first 5 seconds of the chapter, then it'll just resume from the start.  Or, you can click play on a chapter and it will start at the beginning of it.  Resuming can be done either from a chapter list, or from the context menu.  If the book is split over several discs then Kodi will resume from the correct chapter and disc.

This will also add an 'audiobooks' node, where the books will be displayed.  They no longer appear in the home screen under 'recently added albums', or indeed in any album list.  Authors, narrators etc do however appear in the artist lists.

There is also improved tagging support for MKA files and the way they are added to the library, rendering the use of cuesheets for them redundant - I'll do another post on that though as it's a different topic.

Just thought I would bump this again as I think v21 is getting close to RC and once we branch for v22, I think I'd like to PR this.  @DaveBlake - take note !! hahaha
Learning Linux the hard way !!
Reply
#13
(2024-02-05, 16:36)black_eagle Wrote: This will also add an 'audiobooks' node, where the books will be displayed.  They no longer appear in the home screen under 'recently added albums', or indeed in any album list.  Authors, narrators etc do however appear in the artist lists.

There is also improved tagging support for MKA files and the way they are added to the library, rendering the use of cuesheets for them redundant - I'll do another post on that though as it's a different topic.

Just thought I would bump this again as I think v21 is getting close to RC and once we branch for v22, I think I'd like to PR this.  @DaveBlake - take note !! hahaha
Sounds awesome! Is there a PR we can test?
Reply
#14
(2024-02-06, 17:38)zag Wrote: Sounds awesome! Is there a PR we can test?

Not currently.  Might do a quick n dirty test build next week for people to try out though....
Learning Linux the hard way !!
Reply
#15
Meh, who knew that mp3 files could be chaptered like m4b?  It is in the spec but little used.  Think I can get Kodi to support it though.

Image

That's just one mp3 file and originally, Kodi just displayed it as one long track.   After some messing around with Kodi's tag reader however, Kodi now shows it as multiple chapters.

Image

It plays properly, and resumes correctly too - although at the moment it doesn't ask about a resume point - Chapter names are from the file itself.

I guess I'm just documenting this right now so I have something to refer back to later when I inevitably break it again!!
Learning Linux the hard way !!
Reply

Logout Mark Read Team Forum Stats Members Help
Audiobooks / Podcasts /other audio related stuff you may have0