Menu

#4 code sample for metadata and split chapters

2.0
open
nobody
None
2018-04-14
2015-05-13
No

I'd like to provide a code sample for preserving metadata and splitting into chapter files. Just a c# commandline app, also includes interface to audible AAXSDKWin.dll in c#, so no need for extra c++ wrapper/helper.

1 Attachments

Related

Tickets: #4

Discussion

  • Alexander Maier

    Alexander Maier - 2015-05-14

    OK, fixed some bugs and added some more options, this might actually be usable now.
    * optionaly encode to m4a instead of mp3
    * optionaly specify encoding bandwidth (most usefull for m4a encoding)
    * allow extracting of cover art
    * require switch to overwrite destination files, defaut don't overwrite
    * set genre of destination files to "audiobook"

    known issues:
    * description and copyright fields do not seem to get set for .m4a files

     
  • Konrad Gräfe

    Konrad Gräfe - 2015-06-29

    Can you explain how you got the function definitions in ./AaxToMp3/NativeMethods.cs? Especially the AAXGetChapterText() does not work for me. :-(

     
    • Alexander Maier

      Alexander Maier - 2015-07-04

      most of the function definitions are from the source of the original project; you can get the names of all exported functions by examining the AAXSDKWin.dll using dumpbin /exports AAXSDKWin.dll.
      The order and type of paramters can only be determined by debugging/disassembling the dll (or by informed guesswork looking at similar known functions :-))
      The chaptertext function looked really interesting but none of the audiobooks I examined actually provide any chapter text information - the native players seem to confirm this, nothing beyond "chapter xxx" is ever shown.

       
  • Brian Hagerty

    Brian Hagerty - 2015-11-27

    Dividing by chapters is important to me, so I used this version of the program with the -c option. Unfortunately, I didn't get the last chapter of the AAX file. I think something went wrong with how the chapters and files were counted and numbered.

    Specifically, after running the command with the -c flag, the program returned the specs of the file, then said "Chapter 1 of 81," "Chapter 2 of 81," etc., up to "Chapter 81 of 81."

    But the output files had numbers different from the chapter numbers. Specifically, file number 0 was Chapter 1, and file number 80 was Chapter 81.

    Unfortunately, file number 80 was NOT the last chapter in the book. There was one more chapter that did not get converted.

    When I converted without the -c option, I got the entire book, including the last chapter, so there's nothing wrong with the file. I attach a copy of the command-line output for both conversions (with -c and without it).

    I sure hope you can fix this, because if I could get chapters automatically, AAXtoMP3 would be PERFECT.

     
    • Alexander Maier

      Alexander Maier - 2015-12-05

      thanks for the report, looking into it. the problem regarding file names is
      easy to fix, I'll have to check what happens to the missing chapter. will
      fix if I can reproduce with one of my files.

      2015-11-27 18:45 GMT+01:00 Brian Hagerty bhagerty@users.sf.net:

      Dividing by chapters is important to me, so I used this version of the
      program with the -c option. Unfortunately, I didn't get the last chapter of
      the AAX file. I think something went wrong with how the chapters and files
      were counted and numbered.

      Specifically, after running the command with the -c flag, the program
      returned the specs of the file, then said "Chapter 1 of 81," "Chapter 2 of
      81," etc., up to "Chapter 81 of 81."

      But the output files had numbers different from the chapter numbers.
      Specifically, file number 0 was Chapter 1, and file number 80 was Chapter
      81.

      Unfortunately, file number 80 was NOT the last chapter in the book. There
      was one more chapter that did not get converted.

      When I converted without the -c option, I got the entire book, including
      the last chapter, so there's nothing wrong with the file. I attach a copy
      of the command-line output for both conversions (with -c and without it).

      I sure hope you can fix this, because if I could get chapters
      automatically, AAXtoMP3 would be PERFECT.

      Attachments:


      Status: open
      Milestone: 2.0
      Created: Wed May 13, 2015 01:26 AM UTC by Alexander Maier
      Last Updated: Mon Jun 29, 2015 11:02 PM UTC
      Owner: nobody
      Attachments:

      I'd like to provide a code sample for preserving metadata and splitting
      into chapter files. Just a c# commandline app, also includes interface to
      audible AAXSDKWin.dll in c#, so no need for extra c++ wrapper/helper.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/aaxtomp3/tickets/4/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Tickets: #4

      • Brian Hagerty

        Brian Hagerty - 2015-12-05

        Thanks, if you PM me, I can give you a link to the AAX file that was the problem.

         
  • Brian Hagerty

    Brian Hagerty - 2015-12-05

    Thanks! If you PM me, I can give you a link to the AAX file that was the problem.

     
  • Tim

    Tim - 2015-12-06

    Throws me AAXAuthenticateWin -32. Any idea whats wrong? Tried two files and was able to convert the same file with GUI.

    EDIT: Never mind, the aax file was corrupted and the other file I tried was .aa, not sure what happened in between the first converson with the GUI version but redownloaded file worked fine.

    And thanks for the developers! Like previously mentioned, only lacks chapter text, though even audible's own player does not provide it so I guess its not included in the meta data.

     

    Last edit: Tim 2015-12-06
  • Telorast

    Telorast - 2016-02-22

    Could someone plz clarify which is the most recent functioning version of the command line code? Does it do both batch processing and chapter splits, or are there still some problems?

     
    • Telorast

      Telorast - 2016-02-22

      Wow! Thanks for the quick response. I wasn't sure if the version at the top is most recent.

       
  • Andriy

    Andriy - 2016-12-15

    Sorry, is there any link to documentation? I tried to use --help, -h and some other keys but nothing seems to be working... Always getting the same message 'Invalid arguments'. And - am I right that splitting into the chapters works only in CLI version?

     
  • w@

    w@ - 2018-04-14

    Alexander,
    I really appreciate your approach.
    Yet I am stuck with an exception of aax.AuthenticateWin();
    hope you are still taking care of this and can provide a hint.
    Walt

     
  • w@

    w@ - 2018-04-14

    adding to my post aftrer more research and try/fails: It seems on Windows 10 you do not use audible manager any more. The Micrsoft store provides a desktop app. Yet this dows not help for the conversion task. I found hints to start audible manager and audible download manager in Windows 7 compatibility mode. This neither helped. I got the message: PC activated but the conversion process will find out that PC is NOT authenticated.

     

Log in to post a comment.