FS#20397 - [audacity] ffmpeg import fails

Attached to Project: Arch Linux
Opened by Joseph Thursby (quitr) - Saturday, 07 August 2010, 01:51 GMT
Last edited by Eric Belanger (Snowman) - Tuesday, 12 April 2011, 20:54 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Eric Belanger (Snowman)
Ionut Biru (wonder)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:

Audacity's ffmpeg import no longer works correctly. It gives the error:
Audacity recognized the type of file '<file_name_here>'.


Additional info:
* package version(s)
* config and/or log files etc.


Steps to reproduce:
This task depends upon

Closed by  Eric Belanger (Snowman)
Tuesday, 12 April 2011, 20:54 GMT
Reason for closing:  Fixed
Additional comments about closing:  fixed in audacity-1.3.13-1
Comment by Joseph Thursby (quitr) - Saturday, 07 August 2010, 01:59 GMT
FFS... apparently I hit something that submitted the bug report before I had finished writing it. Perhaps there should be a button to edit a report? Anyway, to continue,

It gives the error:
"Audacity recognized the type of file '<file_name_here>'.
Importers supposedly supporting such files are:
FFmpeg-compatible files,
but none understood this file format."

Now, this is happening with files that have been known to work with audacity's ffmpeg import in the past. In fact, the trouble seems to have started with the somewhat recent upgrade of ffmpeg at the end of July.

Using audacity version 1.3.12-3 and ffmpeg version 24460-1. I was not having this problem with the previous version of ffmpeg. Perhaps audacity needs to be rebuilt with this version?

Steps to reproduce:

open audacity
attempt to open a file that requires ffmpeg import (ac3, video files such as avi, mkv, mp4)
Comment by Eric Belanger (Snowman) - Saturday, 07 August 2010, 04:36 GMT
You could try rebuilding it to see if it fix the problem.

You'll need to add a portaudio makedepends.
Comment by Joseph Thursby (quitr) - Saturday, 07 August 2010, 16:19 GMT
Thanks for the suggestion Eric. Not sure why I didn't try that in the first place. Unfortunately, however, it didn't work.

Even with portaudio (and portaudio_cpp) as makedepends, the build fails with error:

configure: WARNING: "Missing support in pa_mac_core.h"
configure: WARNING: "Missing support in pa_unix_oss.h"
configure: WARNING: "Missing support in portaudio.h"
configure: error: "Your version of portaudio does not include required functions"
configure: error: ./configure failed for lib-src/portmixer

I'm curious though, why isn't portaudio already listed as a makedepend in the audacity PKGBUILD?
Comment by Joseph Thursby (quitr) - Saturday, 07 August 2010, 18:09 GMT
I should note that the problem persists with the new ffmpeg 24460-2.
Comment by Ionut Biru (wonder) - Saturday, 07 August 2010, 18:41 GMT Comment by Joseph Thursby (quitr) - Saturday, 07 August 2010, 20:09 GMT
@Ionut

I don't believe it's an ffmpeg bug either, just a bug in how they are interacting/built together.

Those new builds you provided didn't help either :(

*Update:
I've found Audacity's debug log (Help->Show Log...) and it seems to support my idea that audacity needs to be rebuilt against these new ffmpeg libraries:

03:03:55 PM: Trying to load FFmpeg libraries
03:03:55 PM: mLibAVFormatPath is not empty, = /usr/lib/libavformat.so. Loading from it.
03:03:55 PM: Loading avformat from /usr/lib/libavformat.so
03:03:55 PM: Importing symbols...
03:03:55 PM: All symbols loaded successfully. Initializing the library.
03:03:55 PM: Retrieving library version.
03:03:55 PM: AVCodec version 0x345400 - 52.84.0 (built against 0x342000 - 52.32.0)
03:03:55 PM: AVFormat version 0x344c00 - 52.76.0 (built against 0x342400 - 52.36.0)
03:03:55 PM: AVUtil version 0x321700 - 50.23.0 (built against 0x320300 - 50.3.0)
03:03:55 PM: AVCodec version mismatch is 0
03:03:55 PM: AVFormat version mismatch is 0
03:03:55 PM: AVUtil version mismatch is 0
03:03:55 PM: Libraries loaded successfully!
03:04:03 PM: FFmpeg : av_open_input_file() failed for file

You can see the version mismatches, however it doesn't report an error, so I am confused whether or not this is a problem. I would rebuild audacity against this new ffmpeg and test, but as I mentioned above, the build fails even with portaudio installed.
Comment by Joseph Thursby (quitr) - Saturday, 07 August 2010, 20:42 GMT
My failed config.log for building audacity can be found here if it helps:
http://pastebin.org/454527
Comment by Ionut Biru (wonder) - Saturday, 07 August 2010, 21:50 GMT
ah definitely a bug in audacity. i remember that they deprecated that in favor or av_open_input_file2 or something like that
Comment by Joseph Thursby (quitr) - Saturday, 07 August 2010, 21:58 GMT
@wonder

I thought that's what the audacity patch was for. It was supposed to fix this error :/
Comment by Eric Belanger (Snowman) - Saturday, 07 August 2010, 22:35 GMT
Even if portaudio is disabled (replace --with-portaudio=v19 by --without-portmixer), it still doesn't build. The error is:

FFmpeg.cpp:257:1: error: invalid conversion from ‘int (*)(URLContext*, unsigned char*, int)’ to ‘int (*)(URLContext*, const unsigned char*, int)’

Audacity has had ffmpeg problems in the past. An audacity rebuild would fix these.
Comment by Thomas Dziedzic (tomd123) - Thursday, 19 August 2010, 05:01 GMT
Rebuilding audacity against ffmpeg-svn fails.
Same with audacity-cvs against ffmpeg-svn :(
Comment by Joseph Thursby (quitr) - Thursday, 19 August 2010, 21:28 GMT
Updates:

I managed to compile audacity with portaudio disabled (I used the workaround described here to overcome compilation errors: http://wiki.audacityteam.org/wiki/Known_Issues#Active_issues).

Even with this new compilation, audacity still fails to open ffmpeg compatible files, so rebuilding audacity isn't the proper fix for this bug.
Comment by ming chyi (delectate) - Wednesday, 08 September 2010, 03:05 GMT
same question happened to me too.I can not import ape files, strange ...

any idea to solve this problem?i tried to recompile audacity,but still doesn't work..
Comment by Joseph Thursby (quitr) - Wednesday, 08 September 2010, 21:31 GMT
@delectate

Unfortunately no, it isn't solved yet. Ghost1227, to whom this issue was assigned was actually on leave when they assigned it to him! Unfortunately he has a lot of real life work to do right now so he hasn't gotten around to the bug. Perhaps someone could offload some of Ghost1227's bugs to others?

I've tried getting audacity help in #audacity on freenode. Unfortunately I got no response at all to my problem. This issue is not documented on their "Known Issues" page on the wiki.
Comment by ming chyi (delectate) - Friday, 10 September 2010, 12:58 GMT
@quitr

i found these in my cache directory:
delectate@delectate:/var/cache/pacman/pkg$ ls | grep audacity
audacity-1.3.11-1-i686.pkg.tar.gz
audacity-1.3.12-1-i686.pkg.tar.xz
audacity-1.3.12-2-i686.pkg.tar.xz
audacity-1.3.12-3-i686.pkg.tar.xz

and i tried install audacity 1.3.12,it can not recognize ffmpeg library ,seems we have to wait for patch ,maybe.
Comment by (N/A) (wantilles) - Sunday, 10 April 2011, 23:52 GMT
Latest svn has fixed this.

Also, no longer are patches needed to build (link) against latest ffmpeg libraries.

Here is the relevant svn log:

------------------------------------------------------------------------
r11055 | lllucius | 2011-04-02 05:10:50 +0300 (Sat, 02 Apr 2011) | 5 lines

Bug #176 - Support newer versions of FFmpeg.

Also includes Benjamin's ffmpeg-configure-v2.patch.
------------------------------------------------------------------------

Just built here latest 11087 svn revision and it builds and works fine.

Solution:

Include such a version in extra.

Attached, I give proposed PKGBUILD.

Loading...