Re: [Audacity-devel] Back to ID3v2 metadata in WAV files
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
|
From: Gale A. <ga...@au...> - 2013-08-08 20:31:01
|
| From Joel Bouchat <bo...@ho...> | Mon, 5 Aug 2013 14:49:10 +0200 | Subject: [Audacity-devel] Back to ID3v2 metadata in WAV files > here is the patch which fixes the file "wav.c" in "libsndfile" to manage > the album tag (= IPRD tag) in the "LIST" chunk of a WAV file. OK I tested that on all three platforms and the IPRD tag was written to the file OK. Rhythmbox and Nautilus see it on Linux. > Only the album can be added, there is nothing jn the standard for the "Composer"...! > Some people advice to use the "source" tag. I have tried but the "ISRC" token > is not recognized by the Windows Explorer and the Media Player. I also tried IWRI and IMUS (in a hex editor) but WMP doesn't seem to support them. So if we add support for IPRD I think we have covered all the tags that WMP supports. Are there any other info tags that we really ought to add, such as IENG (Engineer) or ILNG (Language, which has an ID3 equivalent): http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/RIFF.html#Info ? > REMARK: implementing the Album tag in libsndfile is straightforward, the > "IPRD_MARKER" and "SF_STR_ALBUM" tokens are already defined but "they" > forgot to check them in two switches. Only 6 lines of code are necessary to fix it. > > BUT, as stated in my previous mail, maybe that patching a library is not > acceptable!! The best solution would be to submit the patch to the "libsndfile" > git, if people responsible for Audacity development consider that this is useful. I think we do sometimes patch third-party libraries but this needs to be noted in lib-src/audacity-patches.txt and I think we would normally offer this patch upstream. Gale ---------------------------------------- > > From: bo...@ho... > > To: aud...@li... > > Date: Mon, 5 Aug 2013 11:30:52 +0200 > > Subject: Re: [Audacity-devel] Back to ID3v2 metadata in WAV files > > > > Hello Gale, > > > > the discrepencies that you have observed in the WAV file Metadata between files generated by foobar2000 and Audacity, in particular when displayed by Windows Explorer or Windows Media Player, are easy to explain: > > Windows Explorer and Windows Media Player do not read the ID3 tags. They still use the standard "LIST" chunk in the Wav file, and this chunk must be located after the main "data" chunk, as we have already noticed. > > To experience this, create (with Audacity), a Wav file with a Title with international characters inside, and observe that those international characters have been replaced by 7 bit ascii characters when displayed by Windows Explorer or Media Player: this is the content of the "LIST" chunk not the "ID3" chunk which holds the genuine international characters. > > But not every tag can be included inside the "LIST" chunk. There is a limitation in Audacity: the LIBSNDFILE library cannot write the "Album" tag inside the "LIST" chunck (I wonder why...), but foobar2000 can. It probably does'nt use LIBSNDFILE! > > > > I can investigate a little inside the internals of LIBSNDFILE, but, as a rule, i think that we forbid ourselfs to modify the source code of an external library... > > > > > > Best regards, > > > > Joel > > > > ---------------------------------------- > >> Date: Sat, 3 Aug 2013 18:04:30 +0100 > >> From: ga...@au... > >> To: aud...@li... > >> Subject: Re: [Audacity-devel] Several "Export" commands for batch chains patch > >> > >> > >> | From Joel Bouchat <bo...@ho...> > >> | Fri, 2 Aug 2013 16:45:07 +0200 > >> | Subject: [Audacity-devel] Several "Export" commands for batch chains patch > >>> > >>> in the meantime i have solved the problem and i have posted > >>> a patch in the developer group on the ID3v2 Metadata subject. > >>> > >>> Here is a copy of the mail. > >>> > >>>> Problem of the ID3 tags not managed by WMP in the WAV files produced by Audacity: solved! > >>> > >>>> Patch in attachement. > >>> > >>>> Hello, > >>> > >>>> i have analysed the WAV files produced by foobar2000, while > >>>> patching Audacity WAV file with a hex editor. > >>>> Everything went alright when i moved the "LIST" chunk from the > >>>> beginning of the file to the end, just before the ID3 chunk. > >>>> Normally, a well behaved WAV parser shouldn't care about the > >>>> order in which the chunks are arranged, but this seems not to be the > >>>> case for the Microsoft Windows Media Player. > >>> > >>>> Modifying the source code has been very easy, and the patch is > >>>> very short, but this patch has to be tested and discussed anyway, > >>>> because moving the LIST chunk after the DATA chunk might be a nuisance > >>>> for some other players. I don't know. > >> > >> Thanks for the patch, Joel. > >> > >> I tested it by exporting WAV with all seven predefined tags plus a > >> "Composer" tag, then opening the exported file in WMP on Win 7 x64 > >> (which has dBPoweramp) and Win 7 32-bit (which doesn't have > >> dBPoweramp). > >> > >> For me, WMP does not see the "Album" or "Composer" tag (nor > >> does Windows Explorer Properties see the "Track Number"). > >> > >> On x64, DBPoweramp only sees "Album" and "Track Number" if I > >> add "Composer" (in both HEAD and in your patch). I had not > >> noticed this before. > >> > >> Modifying the metadata of the exported file in Foobar2000 solves > >> these problems (Windows apps see "Album" and/or Track Number > >> and "Composer", and dBPoweramp sees all seven predefined tags > >> without adding any other tags). > >> > >> There is one exception to that - on Win 7 32-bit, the "Composer" tag > >> does not get seen in WMP as a result of modifying it in Foobar. WMP > >> versions are the same on both machines. > >> > >> VLC still sees the seven predefined tags exported by your patched > >> version, but before considering if we want to move the LIST chunk > >> to the end can we get Album, Track Number and possibly Composer > >> showing in Windows? Or do they show for you? I do get Copyright > >> showing in Windows on both machines. > >> > >> > >>> ==> Some more explanation about foobar behavior: > >>>> Foobar2000 also maintains both metadata chunks in a WAV file. > >>>> When a tag is modified by the user, foobar tries to update the chunks > >>>> "in place". > >>>> > >>>> This is what happened with my modification which had the same length as > >>>> the original string '"piano" -> "paino" ... and the tags were not yet > >>>> readable by WMP. > >>>> But when the new tag is too long, foobar2000 destroys the original > >>>> "LIST" chunk located at the beginning of the file by marking it as a > >>>> "JUNK" chunk, and it creates a new LIST chunk, located just before the > >>>> ID3 chunk ... and the metadata can be read by WMP ! This is this > >>>> observation which tipped me of! > >> > >> Thanks for that explanation. > >> > >> > >> > >> Gale > >> > >> > >>> ---------------------------------------- > >>>> Date: Fri, 2 Aug 2013 15:01:26 +0100 > >>>> From: ga...@au... > >>>> To: aud...@li... > >>>> Subject: Re: [Audacity-devel] Several "Export" commands for batch chains patch > >>>> > >>>> > >>>> | From Joel Bouchat <bo...@ho...> > >>>> | Fri, 2 Aug 2013 12:14:29 +0200 > >>>> | Subject: [Audacity-devel] Several "Export" commands for batch chains patchþ > >>>>> Gale wrote: > >>>>> > >>>>>> Hi Joel, > >>>>>> > >>>>>> I just noticed on Windows 7 x64 SP1 running English UK format that > >>>>>> although Windows Media Player doesn't see the tags in a WAV file > >>>>>> exported from Audacity, it does see them if I edit and save the tags > >>>>>> in Foobar2000 before opening the file in WMP. To check, look at the > >>>>>> File's properties in WMP. > >>>>>> > >>>>>> Can you replicate this and might it be worth looking into? I don't > >>>>>> want to necessarily assume it's repeatable because I have > >>>>>> dBPowerAmp on this machine which does sometimes cause more > >>>>>> metadata to be seen by Windows apps. > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> Gale > >>>>>> > >>>>> Yes you are right, WMP can extract the ID3 tags from a file created by > >>>>> foobar2000 but not from a file exported from Audacity. > >>>>> > >>>>> At least at the condition that foobar200 creates this WAV file directly > >>>>> from the original mp3 file. > >>>>> When i create a WAV file with AUdacity and modify its tags with > >>>>> foobar2000, WMP cannot read the ID3 tags anyway. > >>>> > >>>> What version of Windows and WMP is that, and is Windows running > >>>> in French? I have now tried it on my Windows 7 32-bit which does > >>>> not have dBPowerAmp (English UK locale). > >>>> > >>>> I find that if I fill the seven standard tags in Audacity's Metadata > >>>> Editor, export as WAV, edit the metadata and OK in Foobar, WMP > >>>> 12.0.7601.17514 then sees Title, Artist, Album and Genre in that > >>>> WAV (I did not export the other tags it lists). > >>>> > >>>> > >>>>> There is certainly a difference between the ID3v2 metadata formatted > >>>>> by Audacity and the metadata formatted by foobar2000. > >>>> > >>>> Yes, and Foobar can apparently cope with reading the UTF16 > >>>> metadata in this MP3 file: > >>>> http://forum.audacityteam.org/download/file.php?id=8008 > >>>> > >>>> whereas Audacity seems to produce corrupted characters. > >>>> > >>>> > >>>>> We rely on "LIBID3TAG" to create the ID3 tags, and there is little that > >>>>> can be done inside Audacity code itself. > >>>>> To avoid encoding mixture, i have try to force the format to UTF16 > >>>>> and next to ISO_8859_1 but this makes no difference: foobar200 reads > >>>>> both formats without problem and WMP reads none of them! > >>>> > >>>> What is your or others' view of switching to taglib? > >>>> http://taglib.github.com/ > >>>> > >>>> It has been proposed before and there is a bug open to do it: > >>>> it http://bugzilla.audacityteam.org/show_bug.cgi?id=364 . > >>>> > >>>> However the main reason to do it given there was to improve > >>>> WAV metadata which has largely been achieved now with your > >>>> patch for this (thanks!). > >>>> > >>>> > >>>> > >>>> > >>>> Gale |