Re: [Audacity-quality] Stereo AIF files import as silence when using FFmpeg importer
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Bill W. <bi...@go...> - 2012-06-27 15:31:24
|
On 27/06/2012, at 1:20 AM, Gale Andrews wrote: > > Summary: > > Bill's problem AIFF files seem to be an issue with the 0.6.2 version > of FFmpeg that is currently offered through FAQ's. So it's not > anything that has gone wrong with Audacity since 2.0.0. > > Re the P3: It seems if you don't OK Prefs, you will never be able to > import WAV/AIFF (or MP3 files) with FFmpeg, but native FFmpeg > formats are not affected by this. > > Details below. > > > | From Bill Wharrie <bi...@go...> > | Tue, 26 Jun 2012 21:56:37 -0400 > | Subject: [Audacity-quality] Stereo AIF files import as silence when using FFmpeg importer >> >> On 26/06/2012, at 6:54 PM, Gale Andrews wrote: >> >>> >>> | From Bill Wharrie <bi...@go...> >>> | Tue, 26 Jun 2012 17:28:08 -0400 >>> | Subject: [Audacity-quality] Stereo AIF files import as silence when using FFmpeg importer >>>> Restricting this thread to -quality, as we have decided it is not a release blocking bug. >>> >>> It still might be considered as blocking if you get frequent >>> silent imports in 2.0.1rc2, but not in 2.0.0 release. We would >>> have to try more machines if so, IMO. >>> >>> Does 2.0.0 release have the same silent import issue for you? >>> I an still not clear about that. >> >> Yes. 2.0.0. and 1.3.14. But it seems to be dependent on those weird AIF files I'm finding on the HD. >> >>> >>> Per your subsequent message, I would like to see a couple of >>> AIFF's that consistently import as silence for you in 2.0.1rc2. >> >> I'll send you the links off list. > > Thanks. On Win 7, 2.0.0 release and 2.0.1rc2 (FFmpeg 0.6.2), both > those files import as an empty track using FFmpeg (no On-Demand). > In 2.0.1rc2 they import as silence with a click near the end when > FFmpeg is set to use OD. > > If I switch to FFmpeg 0.5 in either version of Audacity, the files > import fine, including using FFmpeg OD in 2.0.1rc2. > > It seems to be an FFmpeg issue, as FFmpeg 0.6.2 run as standalone > at the command-line just produces a 44 bytes file as output from > those files, but 0.5 standalone produces a properly converted file. > > If you want 0.5 to see if it fixes it for you: > http://www.audacity.homerow.net/cgi-bin/dl?ffmpeg/FFmpeg_20090729_for_Audacity_on_OSX.dmg . > > If you figure out what the difference is between the four files that > fail and the others, let me know. Were the four files that failed after > export multiple at the end of the Audacity track, perhaps after some > suspect data in the track? Or is there a metadata difference? There were 10 tracks on that album. I no longer have the project, but I have the correct order of the songs in iTunes. The AIFs for tracks 1, 3, 4 and 5 are bad, the rest are good. I think I may be on to something regarding the metadata. Chunks must be an even number of bytes. If the actual data in the NAME or AUTH chunk is an odd number of characters a padding byte of "00" is added to the end, but the chunkSize field does not include the padding character. So for example "Dawg Jazz" is 9 characters, and the NAME chunk looks like this: NAME 4E 41 4D 45 (chunksize) 00 00 00 09 Dawg Jazz 44 61 77 67 20 4A 61 7A 7A 00 It seems that FFmpeg 0.6.2 is not taking the padding byte into account. It reads the NAME chunk (which it assumes is 9 bytes), encounters the "00" byte (which it seems to assume should be the start of the next chunk id), throws up its hands and gives up. It does not report an error - the log shows "Open(/path/to/dawg jazz.aiff) succeeded" If I import the Dawg Jazz AIFF into Audacity and look in the Metadata Editor, Audacity shows "Dawg Jazz" as the Track Title, but does not show the Artist Name (which is in the AUTH chunk). If I import a file where the NAME and AUTH chunks have even lengths, it imports fine and the Track Title and Artist Name are properly picked up and reported in the Metadata Editor. If I import a file where the NAME length is even but the AUTH length is odd (and they are always in that order), the track imports as silence but the Track Title and Artist Name are properly picked up and displayed in the Metadata Editor. I've checked this with several AIFFs and AFAICT this is consistent. So … if the AIFF contains a NAME or AUTH chunk or both, and either of them is an odd length, FFmpeg will fail to import the file. > > >> One more comment below. > > Noted. Do you agree with my finding on Windows that choosing > "FFmpeg compatible files" still lets you import native FFmpeg files > like WMA or AAC without the "OK" on Prefs - the issue is just with > WAV/AIFF, MP3 and probably all the native Audacity formats? Agreed. > > Do you agree that FFmpeg will never import WAV or AIFF (even > on quit and restart of Audacity) until you OK Prefs? Yes. After simply quitting and restarting Audacity (thus creating the cfg file), "FFmpeg compatible files" imports AIFFs using libsndfile. > If I launch > Audacity with no .cfg present and quit, the only FFmpeg entry > added is: > > [FFmpeg] > Enabled=1 > > If I OK Prefs, this is added to .cfg on exiting Audacity: > > [Library] > FFmpegOnDemand=0 > > However if I quit Audacity, remove: > > [FFmpeg] > Enabled=1 > [Library] > FFmpegOnDemand=0 > > from .cfg and restart, FFmpeg still imports WAV/AIFF OK. > > But for the result of OK'ing Prefs to survive restart, something > must be written that affects this, surely? Yes, that is odd. Actually, OK'ing prefs (from any pane) adds lots of stuff below "[GUI/ToolBars/Device]". It could be any one of those that "enable" FFmpeg loading of native files. For example "OverrideExtendedImportByOpenFileDialogChoice=1". It seems that, on quit, Audacity should check that the equivalent of OK'ing prefs has been done. For example it could check for "[Prefs] PrefsCategory=0", which does not exist until prefs have been OK'd. -- Bill > > > > > Gale > > > >>>> On 26/06/2012, at 5:02 PM, Gale Andrews wrote: >>>> >>>>> >>>>> Bill, >>>>> >>>>> 2.0.0 release does demonstrate the issue that >>>>> "FFmpeg-compatible files" uses libsndfile until there is a .cfg file. >>>> >>>> Actually probably more complicated than that. See below. >>>> >>>>> >>>>> I cannot yet reproduce the problem with libav importing stereo >>>>> AIFF as silence in 2.0.1rc2 or 2.0.0 release, using an AIFF exported >>>>> by Audacity. >>>> >>>> On your Mac as well as Windows? If so then we have a non-bug; >>>> something that is peculiar to my machine. >>> >>> Yes, I posted an addendum that those new tests were on my >>> OS X 10.7.4 machine, but SF blocked it thus: >>> >>> "Sorry, we were unable to deliver your message to the following address. >>> >>> <aud...@li...>: >>> Remote host said: 550 error. This block will automatically be lifted >>> shortly. [RCPT_TO] " >>> >>> >>>>> The Audacity-exported AIFF imports normally both after OK in >>>>> Audacity > Preferences and after then quitting and restarting >>>>> Audacity. This is using the same FFmpeg as you (the zip file of >>>>> FFmpeg 0.6.2). >>>>> >>>>> However as I am using the zip, I have to do more than just click >>>>> OK in Prefs after the libsndfile import. I have to open the Libraries >>>>> Prefs and locate FFmpeg where I put it (in Applications). I would >>>>> not think that would explain the difference we see, but you may >>>>> want to test that. >>>> >>>> Clicking OK in Prefs was just to create the .cfg file, or so I thought. >>>> >>>> Testing with 1.3.14 … >>>> Remove FFmpeg files from default system location >>>> Start 1.3.14 >>>> File > Import > Audio; "FFmpeg-compatible files"; choose an AIF; imports with libsndfile >>>> Preferences > Libraries; locate FFmpeg files in non-system location; OK >>>> - .cfg is NOT created (creation of the .cfg on OK in prefs started with 2.0.0) >>>> File > Import > Audio; "FFmpeg-compatible files"; choose an AIF; imports as silence >>>> >>>> So it appears that the existence of the .cfg is not the trigger to use FFmpeg instead of libsndfile. Somehow doing OK in preferences (any pref pane) is needed for Audacity to recognize that the FFmpeg libraries are available? >>> >>> In 2.0.1rc2 on Mac, if I locate FFmpeg then "OK" Preferences but >>> then trash .cfg, the AIFF imports with libav. And I can still export >>> using FFmpeg. And I can import/export thereafter with FFmpeg if I >>> quit and restart Audacity (.cfg is saved with the custom path >>> to my copy of FFmpeg in Applications). >> >> I'd speculate that something is getting set inside Audacity, independent of the cfg file, once you OK the prefs. From then on libav is used. The setting gets written to the new cfg on quit. >> >> -- Bill >> >>> >>> >>> >>> >>> Gale >>> >>> >>> >>> >>>>> What app produced your stereo AIFF? Were you using the same >>>>> AIFF to test in 1.3.14? >>>> >>>> The AIFF was produced by Audacity, and yes I used the same AIFF in all cases. >>>> It imports fine into iTunes. I also tried several other Audacity-produced AIFFs >>>> with the same results. >>> >>> >>> >>>> Bill >>> >>>>> | From Bill Wharrie <bi...@go...> >>>>> | Tue, 26 Jun 2012 15:40:26 -0400 >>>>> | Subject: [Audacity-quality] [Audacity-devel] Stereo AIF files import as silence when using FFmpeg importer >>>>>> >>>>>> On 26/06/2012, at 3:14 PM, Gale Andrews wrote: >>>>>> >>>>>>> >>>>>>> | From Bill Wharrie <bi...@go...> >>>>>>> | Tue, 26 Jun 2012 12:34:50 -0400 >>>>>>> | Subject: [Audacity-quality] Stereo AIF files import as silence when using FFmpeg importer >>>>>>>> I came across this while testing OD-import using FFmpeg (which seems to work fine). >>>>>>>> >>>>>>>> I don't think this is a release blocker for 2.0.1. Possibly P3 (if it is not already in Bugzilla - I couldn't find it) >>>>>>>> as there is a simple workaround - don't use FFmpeg to import stereo AIF files. >>>>>>> >>>>>>> Not in bugzilla - not known of before now. >>>>>>> >>>>>>> >>>>>>>> Cross-posting to -devel as it is up to RM to decide the severity of this bug. >>>>>>> >>>>>>> Does 2.0.0 release exhibit the behaviour you note with silenced import? >>>>>>> If not, it would tend to increase the severity towards release blocker: >>>>>>> >>>>>>> "Never less good overall than the standard set by 2.0.0 - only trivial >>>>>>> regressions are likely to be tolerated in a release." >>>>>> >>>>>> 1.3.14 (at least) is the same on Mac. So I'd say not a release blocker, maximum P3. >>>>>> >>>>>> >>>>>> >>>>>>>> Audacity 2.0.1. Mac OSX 10.7.2. Clean install (no audacity.cfg file, no 1.2.x prefs existing on the system). FFmpeg files in standard location and found on startup. >>>>>>>> >>>>>>>> Start Audacity. >>>>>>>> File > Import > Audio; choose "FFmpeg-compatible files" then choose a WAV or AIF file >>>>>>>> - the file imports with libsndfile complete with the "uncompressed file warning" dialog. >>>>>> >>>>>> Same on 1.3.14. >>>>>> >>>>>>> >>>>>>> Testing on Win 7 x64. >>>>>>> >>>>>>> 2.0.0 and 1.3.14 do that too with stereo WAV or AIFF, from no or >>>>>>> initialised .cfg with no 1.2 settings present, so at least that part is >>>>>>> not a regression on 2.0.0. Looks like a separate P3, on its own? >>>>>> >>>>>> Yes, not a regression and a separate P3 or P4 on its own. As soon as there is a .cfg file this problem goes away, so certainly an edge case. >>>>>> >>>>>>> >>>>>>> >>>>>>>> Delete track >>>>>>> >>>>>>> I assume you mean using [X] on Track Control Panel, which I >>>>>>> did. >>>>>> >>>>>> Yes, that's what I meant. >>>>>> >>>>>>> >>>>>>> >>>>>>>> Preferences > OK >>>>>>>> - note that audacity.cfg is created at this point. >>>>>>> >>>>>>> Agreed. >>>>>> >>>>>> In 1.3.14 on Mac, audacity.cfg is not created at this point. Need to quit Audacity for audacity.cfg to be created. >>>>>>> >>>>>>> >>>>>>>> File > Import > Audio; choose "FFmpeg-compatible files" then choose a stereo AIF file >>>>>>>> - the file imports as silence >>>>>>> >>>>>>> Stereo AIFF and WAV imports properly with libav here. >>>>>> >>>>>> In 1.3.14 on Mac, after quit and restart (thus creating audacity.cfg), importing a stereo AIF with "FFmpeg-compatible files" imports as silence. >>>>>> >>>>>> So this part would appear to be a Mac only problem (at least until we hear from Linux testers). >>>>>> >>>>>> My FFmpeg version numbers are F(52.64.2),C(52.72.2),U(50.15.1) >>>>>> >>>>>> -- Bill >>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Gale >>>>>>> >>>>>>> >>>>>>> >>>>>>>> Log says: >>>>>>>> 11:45:00: File name is /path/to/file.aiff >>>>>>>> 11:45:00: Mime type is * >>>>>>>> 11:45:00: Opening with libav >>>>>>>> 11:45:00: Open(/path/to/file.aiff) succeeded >>>>>>>> Delete track >>>>>>>> File > Import > Audio; choose "FFmpeg-compatible files" then choose a MONO AIF file >>>>>>>> - file imports successfully >>>>>>>> Delete Track >>>>>>>> File > Import > Audio; choose "FFmpeg-compatible files" then choose a stereo WAV file >>>>>>>> - file imports successfully >>>>>>>> Delete track >>>>>>>> Preferences > Libraries; check "Allow background on-demand loading"; OK >>>>>>>> File > Import > Audio; choose "FFmpeg-compatible files" then choose a stereo AIF file >>>>>>>> - the file imports as noise >>>>>>>> Delete track >>>>>>>> File > Import > Audio; choose "FFmpeg-compatible files" then choose a MONO AIF file >>>>>>>> - file imports successfully > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Audacity-quality mailing list > Aud...@li... > https://lists.sourceforge.net/lists/listinfo/audacity-quality |