WMA files shown as unknwon

Help
chkk
2007-09-24
2013-05-30
  • chkk
    chkk
    2007-09-24

    I installed mediatomb on Debian 4.0 i386 using apt-get.

    Looks prominsing, however, the tags of WMA files are not recognized, theses files are shown as unknown in the container hierarchy. The config.xml has entries for WMA mapping, is there anything else I have to do for WMA support?

    Best regards
    Chris

     
    • Jin
      Jin
      2007-09-24

      The WMA mapping only ensures that those file get the correct mimetype (filemagic is not able to autodetect it properly). We use either taglib or id3lib for tag extraction, none of those libraries supports WMA metadata.

      It is possible that FFMPEG could handle it (current SVN version has an additional metadata handler using the ffmpeg library), however I can not tell for sure - I do not have a single WMA file on my system.

      Kind regards,
      Jin

       
      • chkk
        chkk
        2007-09-24

        I just built ffmpeg for my debian with mp3 encoding support, however id3 tags seem to be lost whenn transcoding a wma to mp3 manually, so this may probably not be the way to go.

        Best regards
        Chris

         
    • Jin
      Jin
      2007-09-24

      You did not get my idea.. we use ffmpeg to extract metadata (i.e. - the tags), not to transcode stuff.

      So, if you compiled with --enable-ffmpeg, simply try to import your WMA files and see if they are still "Unknown" or if tags are extracted. You may want to read up if ffmpeg supports WMA metadata, it was merely a guess on my side; I know it can do some formats that taglib/id3lib can not handle, but I do not know if WMA is one of them.

      Kind regards,
      Jin

       
    • chkk
      chkk
      2007-09-24

      OK.

      I built mediatomb with ffmpeg support (some trouble with libjs and libmagic, but got that resolved).

      WMA files are still tagged as unknown. However, scanning of WMA directories seemed to proceed very fast - is there any log which would allow me to verify that ffmpeg is really used for scanning these files?

      Kind regards
      Chris

       
    • Jin
      Jin
      2007-09-24

      try compiling with the --enable-tombdebug option, then add exactly one wma file and look in the console. You should see DEBUG messages like: "Added metadata title: ..." and so on, coming from ffmpeg_handler.cc

      if you do not see this (are you sure the WMA file is actually tagged?) - then sorry, in this case ffmpeg can probably not parse the WMA metadata; I think the ffmpeg devs would know the answer to that question.

      Kind regards,
      Jin

       
      • chkk
        chkk
        2007-09-25

        I do not see any message from ffmpeg when adding a WMA file, would I see some message about the call to the ffmpeg handler even if no tags were found? Here is the debug output shown when adding a WMA file:

        2007-09-25 09:13:40   DEBUG: [../src/web_callbacks.cc:72] create_request_handler(): Filename: /content/interface?req_type=update&sid=7943dad2c24f95c62ed4ba3c43a4d3ee&force_update=0, Path: (null)
        2007-09-25 09:13:40   DEBUG: [../src/web_request_handler.cc:173] open(): request: /content/interface?req_type=update&sid=7943dad2c24f95c62ed4ba3c43a4d3ee&force_update=0
        2007-09-25 09:13:40   DEBUG: [../src/web_callbacks.cc:72] create_request_handler(): Filename: /content/interface?req_type=add&sid=7943dad2c24f95c62ed4ba3c43a4d3ee&object_id=2f6d6e742f7573622f6d70332f42656e204861727065722f4469616d6f6e6473204f6e2054686520496e736964652f3037204272696e67205468652046756e6b2e776d61, Path: (null)
        2007-09-25 09:13:40   DEBUG: [../src/web_request_handler.cc:173] open(): request: /content/interface?req_type=add&sid=7943dad2c24f95c62ed4ba3c43a4d3ee&object_id=2f6d6e742f7573622f6d70332f42656e204861727065722f4469616d6f6e6473204f6e2054686520496e736964652f3037204272696e67205468652046756e6b2e776d61
        2007-09-25 09:13:40   DEBUG: [../src/web/add.cc:52] process(): add: start
        2007-09-25 09:13:40   DEBUG: [../src/web/add.cc:67] process(): add: returning
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1959] run(): running add file task with path /mnt/usb/mp3/Ben Harper/Diamonds On The Inside/07 Bring The Funk.wma recursive: 1
        2007-09-25 09:13:40   DEBUG: [../src/tools.cc:176] check_path_ex(): path: /mnt/usb/mp3/Ben Harper/Diamonds On The Inside/07 Bring The Funk.wma, ret: 0; errno: 0
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1107] addObject(): Adding: parent ID is -333
        2007-09-25 09:13:40   DEBUG: [../src/storage/sql_storage.cc:418] addObject(): insert_query: INSERT INTO "mt_cds_object" ("object_type","upnp_class","dc_title","resources","flags","location","location_hash","mime_type","parent_id") VALUES (2,'object.item.audioItem.musicTrack','07 Bring The Funk.wma','0~protocolInfo=http-get%3A%2A%3Aaudio%2Fx-ms-wma%3A%2A~~',1,'F/mnt/usb/mp3/Ben Harper/Diamonds On The Inside/07 Bring The Funk.wma',730647317,'audio/x-ms-wma',359)
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1113] addObject(): After adding: parent ID is 359
        2007-09-25 09:13:40   DEBUG: [../src/update_manager.cc:155] containerChanged(): containerChanged. id: 4, signal: 1
        2007-09-25 09:13:40   DEBUG: [../src/update_manager.cc:174] containerChanged(): signalling...
        2007-09-25 09:13:40   DEBUG: [../src/update_manager.cc:237] threadProc(): sending updates...
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1123] addObject(): Will update ID 358
        2007-09-25 09:13:40   DEBUG: [../src/upnp_cds_subscriptions.cc:82] subscription_update(): start
        2007-09-25 09:13:40   DEBUG: [../src/upnp_cds_subscriptions.cc:106] subscription_update(): end
        2007-09-25 09:13:40   DEBUG: [../src/update_manager.cc:264] threadProc(): updates sent.
        2007-09-25 09:13:40   DEBUG: [../src/update_manager.cc:155] containerChanged(): containerChanged. id: 358, signal: 1
        2007-09-25 09:13:40   DEBUG: [../src/update_manager.cc:174] containerChanged(): signalling...
        2007-09-25 09:13:40   DEBUG: [../src/update_manager.cc:155] containerChanged(): containerChanged. id: 359, signal: 0
        2007-09-25 09:13:40   DEBUG: [../src/layout/fallback_layout.cc:278] processCdsObject(): Process CDS Object: 07 Bring The Funk.wma
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1149] addContainerChain(): received chain: /Audio/All Audio
        2007-09-25 09:13:40   DEBUG: [../src/update_manager.cc:215] threadProc(): threadProc: sleeping for 2000 millis
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1107] addObject(): Adding: parent ID is 9
        2007-09-25 09:13:40   DEBUG: [../src/storage/sql_storage.cc:418] addObject(): insert_query: INSERT INTO "mt_cds_object" ("object_type","ref_id","dc_title","metadata","flags","mime_type","parent_id") VALUES (2,360,'07 Bring The Funk.wma','dc%3Adescription=07%20Bring%20The%20Funk%2Ewma',1,'audio/x-ms-wma',9)
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1113] addObject(): After adding: parent ID is 9
        2007-09-25 09:13:40   DEBUG: [../src/update_manager.cc:155] containerChanged(): containerChanged. id: 9, signal: 0
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1149] addContainerChain(): received chain: /Audio/Artists/Unknown/All songs
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1107] addObject(): Adding: parent ID is 13
        2007-09-25 09:13:40   DEBUG: [../src/storage/sql_storage.cc:418] addObject(): insert_query: INSERT INTO "mt_cds_object" ("object_type","ref_id","dc_title","metadata","flags","mime_type","parent_id") VALUES (2,360,'07 Bring The Funk.wma','dc%3Adescription=07%20Bring%20The%20Funk%2Ewma',1,'audio/x-ms-wma',13)
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1113] addObject(): After adding: parent ID is 13
        2007-09-25 09:13:40   DEBUG: [../src/update_manager.cc:155] containerChanged(): containerChanged. id: 13, signal: 0
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1149] addContainerChain(): received chain: /Audio/Artists/Unknown/Unknown
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1107] addObject(): Adding: parent ID is 15
        2007-09-25 09:13:40   DEBUG: [../src/storage/sql_storage.cc:418] addObject(): insert_query: INSERT INTO "mt_cds_object" ("object_type","ref_id","dc_title","metadata","flags","mime_type","parent_id") VALUES (2,360,'07 Bring The Funk.wma','dc%3Adescription=07%20Bring%20The%20Funk%2Ewma',1,'audio/x-ms-wma',15)
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1113] addObject(): After adding: parent ID is 15
        2007-09-25 09:13:40   DEBUG: [../src/update_manager.cc:155] containerChanged(): containerChanged. id: 15, signal: 0
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1149] addContainerChain(): received chain: /Audio/Albums/Unknown
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1107] addObject(): Adding: parent ID is 18
        2007-09-25 09:13:40   DEBUG: [../src/storage/sql_storage.cc:418] addObject(): insert_query: INSERT INTO "mt_cds_object" ("object_type","ref_id","dc_title","metadata","flags","mime_type","parent_id") VALUES (2,360,'07 Bring The Funk.wma','dc%3Adescription=07%20Bring%20The%20Funk%2Ewma',1,'audio/x-ms-wma',18)
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1113] addObject(): After adding: parent ID is 18
        2007-09-25 09:13:40   DEBUG: [../src/update_manager.cc:155] containerChanged(): containerChanged. id: 18, signal: 0
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1149] addContainerChain(): received chain: /Audio/Genres/Unknown
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1107] addObject(): Adding: parent ID is 21
        2007-09-25 09:13:40   DEBUG: [../src/storage/sql_storage.cc:418] addObject(): insert_query: INSERT INTO "mt_cds_object" ("object_type","ref_id","dc_title","metadata","flags","mime_type","parent_id") VALUES (2,360,'07 Bring The Funk.wma','dc%3Adescription=07%20Bring%20The%20Funk%2Ewma',1,'audio/x-ms-wma',21)
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1113] addObject(): After adding: parent ID is 21
        2007-09-25 09:13:40   DEBUG: [../src/update_manager.cc:155] containerChanged(): containerChanged. id: 21, signal: 0
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1149] addContainerChain(): received chain: /Audio/Year/Unknown
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1107] addObject(): Adding: parent ID is 24
        2007-09-25 09:13:40   DEBUG: [../src/storage/sql_storage.cc:418] addObject(): insert_query: INSERT INTO "mt_cds_object" ("object_type","ref_id","dc_title","metadata","flags","mime_type","parent_id") VALUES (2,360,'07 Bring The Funk.wma','dc%3Adescription=07%20Bring%20The%20Funk%2Ewma',1,'audio/x-ms-wma',24)
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1113] addObject(): After adding: parent ID is 24
        2007-09-25 09:13:40   DEBUG: [../src/update_manager.cc:155] containerChanged(): containerChanged. id: 24, signal: 0
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1149] addContainerChain(): received chain: /Audio/All - full name
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1107] addObject(): Adding: parent ID is 26
        2007-09-25 09:13:40   DEBUG: [../src/storage/sql_storage.cc:418] addObject(): insert_query: INSERT INTO "mt_cds_object" ("object_type","ref_id","dc_title","metadata","flags","mime_type","parent_id") VALUES (2,360,'07 Bring The Funk.wma','dc%3Adescription=07%20Bring%20The%20Funk%2Ewma',1,'audio/x-ms-wma',26)
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1113] addObject(): After adding: parent ID is 26
        2007-09-25 09:13:40   DEBUG: [../src/update_manager.cc:155] containerChanged(): containerChanged. id: 26, signal: 0
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1149] addContainerChain(): received chain: /Audio/Artists/Unknown/All - full name
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1107] addObject(): Adding: parent ID is 28
        2007-09-25 09:13:40   DEBUG: [../src/storage/sql_storage.cc:418] addObject(): insert_query: INSERT INTO "mt_cds_object" ("object_type","ref_id","dc_title","metadata","flags","mime_type","parent_id") VALUES (2,360,'07 Bring The Funk.wma','dc%3Adescription=07%20Bring%20The%20Funk%2Ewma',1,'audio/x-ms-wma',28)
        2007-09-25 09:13:40   DEBUG: [../src/content_manager.cc:1113] addObject(): After adding: parent ID is 28
        2007-09-25 09:13:40   DEBUG: [../src/update_manager.cc:155] containerChanged(): containerChanged. id: 28, signal: 0
        2007-09-25 09:13:40   DEBUG: [../src/tools.cc:1288] profiling_print(): PROFILING: took 0 sec 138985150 nsec
        2007-09-25 09:13:42   DEBUG: [../src/update_manager.cc:237] threadProc(): sending updates...
        2007-09-25 09:13:42   DEBUG: [../src/upnp_cds_subscriptions.cc:82] subscription_update(): start
        2007-09-25 09:13:42   DEBUG: [../src/upnp_cds_subscriptions.cc:106] subscription_update(): end
        2007-09-25 09:13:42   DEBUG: [../src/update_manager.cc:264] threadProc(): updates sent.
        2007-09-25 09:13:45   DEBUG: [../src/web_callbacks.cc:72] create_request_handler(): Filename: /content/interface?req_type=update&sid=7943dad2c24f95c62ed4ba3c43a4d3ee&force_update=1, Path: (null)
        2007-09-25 09:13:45   DEBUG: [../src/web_request_handler.cc:173] open(): request: /content/interface?req_type=update&sid=7943dad2c24f95c62ed4ba3c43a4d3ee&force_update=1

        The WMA file is tagged correctly and ffmpeg support is build in the mediatomb binary (at least I think so). Are these the right built steps:

          ./configure --enable-ffmpeg -enable-tombdebug

        Output at the end is:

          CONFIGURATION SUMMARY ----

          sqlite3       : yes
          mysql         : missing
          libjs         : yes
          libmagic      : yes
          inotify       : yes
          libexif       : yes
          id3lib        : yes
          taglib        : disabled
          ffmpeg        : yes
          transcoding   : yes
          YouTube       : disabled
          libextractor  : disabled
          debug log     : yes

        Followed by:

          make
          make install

        Kind regards
        Christian

         
    • Jin
      Jin
      2007-09-25

      revision 1493 is for you :>

      after looking at your log and further examining my code I found a bug that prevented audio files from being processed by ffmpeg; please update from SVN, recompile, and try to import a wma file again.

      Thanks,
      Jin

       
      • chkk
        chkk
        2007-09-25

        I rebuild the code from SVN, now ffmpeg is called for WMA files:

        2007-09-25 15:47:06   DEBUG: [../src/content_manager.cc:1959] run(): running add file task with path /mnt/usb/mp3/10cc/Live in Japan/10 Dreadlock Holiday.wma recursive: 1
        2007-09-25 15:47:06   DEBUG: [../src/singleton.cc:73] registerSingleton(): registering new singleton... - 9 -> 10
        2007-09-25 15:47:06   DEBUG: [../src/web/add.cc:67] process(): add: returning
        2007-09-25 15:47:07   DEBUG: [../src/tools.cc:176] check_path_ex(): path: /mnt/usb/mp3/10cc/Live in Japan/10 Dreadlock Holiday.wma, ret: 0; errno: 0
        2007-09-25 15:47:07   DEBUG: [../src/metadata/ffmpeg_handler.cc:228] fillMetadata(): Running ffmpeg handler
        2007-09-25 15:47:07   DEBUG: [../src/content_manager.cc:1107] addObject(): Adding: parent ID is -333
        2007-09-25 15:47:07   DEBUG: [../src/storage/sql_storage.cc:418] addObject(): insert_query: INSERT INTO "mt_cds_object" ("object_type","upnp_class","dc_title","resources","flags","location","location_hash","mime_type","parent_id") VALUES (2,'object.item.audioItem.musicTrack','10 Dreadlock Holiday.wma','0~protocolInfo=http-get%3A%2A%3Aaudio%2Fx-ms-wma%3A%2A~~',1,'F/mnt/usb/mp3/10cc/Live in Japan/10 Dreadlock Holiday.wma',3504789069,'audio/x-ms-wma',6)

        However, no metadata is recognized :-(

        I have no time to implement this myself at the moment (work and family ...) - maybe later on. But I'll ask the id3tag and ffmpeg teams about their plans (if any) for WMA support.

        Thanks for your support and kind regards
        Chris

         
    • Jin
      Jin
      2007-09-26

      Too bad :( Strange that it did not even add the bitrate (it does so for my test WMA), but I am really not an expert on this. And so far I have really been holding back to ask, why you decided to use the WMA format at all :)
      But well... if you find an opensource library that can handle WMA metadata I will add support for it.