Opened 8 years ago

Closed 4 years ago

#5457 closed defect (fixed)

Can't get Audio to process

Reported by: Espionage724 Owned by:
Priority: minor Milestone:
Component: programming Keywords: audio, processing, freesound, upstream
Cc: joar Parent Tickets:


I've tried on Ubuntu 16.04, openSUSE Tumbleweed, and currently Arch Linux, and cannot get audio to process.

I've installed everything (aside from bad and ugly gstreamer plugins) mentioned on the Wiki pages for both a base MG install and audio (Arch): sudo pacman -S --needed nodejs git python2-lxml automake make npm python2-pastedeploy python2-virtualenv gst-python2 python2 python2-pillow gst-libav gst-plugins-good python2-scipy python2-numpy libsndfile alsa-lib

I have added (with double brackets on both sides; ticket formatted it weird) to mediagoblin_local.ini.

I have also ran gmg dbupdate and restarted both celery and paster.

All audio I've tried (various .ogas, .mp3s, and .oggs) fails to process.

Videos (even audio on the video) and pictures work fine. I'm not sure what else could be wrong, unless the documentation is missing some critical step, or audio support is broken.

I've used various MG builds from the master branch I think as far back as 0.80. At the time of writing, I'm using the latest version available from master.

Attachments (3)

axis-0.patch (926 bytes ) - added by Espionage724 8 years ago.
git patch
sturm-pip-freeze.txt (3.5 KB ) - added by Ben Sturmfels 8 years ago.
pip freeze on system that doesn't exhibit this bug
0001-Use-audio-icon-when-spectrogram-fails.-Add-note-to-d.patch (4.6 KB ) - added by Jorge 7 years ago.
Use audio icon if the spectrum creation fails. Add TODOs to drop dependency from scikits.audiolab as suggested in ticket:5467#comment:4.

Download all attachments as: .zip

Change History (23)

comment:1 by Espionage724, 8 years ago

Error log:

In mediagoblin/media_types/audio/, changing the only occurrence of axis=1 to axis=0 seems to fix this.

I got the idea from

by Espionage724, 8 years ago

Attachment: axis-0.patch added

git patch

comment:2 by ayleph, 8 years ago

Status: newreview

comment:3 by ayleph, 8 years ago

This appears to be the same issue as #5379 which was closed without fixing. I think it's time to fix this.

comment:4 by ayleph, 8 years ago

Keywords: audio processing freesound upstream added

Oh, this is part of freesound in extlib. I can't just patch it. We need to see if there's an updated version of freesound available, and if not, then we need to file a bug upstream.

comment:5 by ayleph, 8 years ago

Status: reviewaccepted

Since the best solution to this issue is to get it fixed upstream, I'm going to remove the review status for now.

comment:6 by Ben Sturmfels, 8 years ago

Cc: joar added

Hi Espionage724,

Thanks very much for raising this issue. Would you mind attaching a small piece of a file that's not working, just so that we have something to test against? I upload a bit of audio myself and haven't seen this problem, so would be interested to test your file.

I note that Joar is one of the authors of freesound/ (as well as being a MediaGoblin hacker). Joar, are you able to determine if Espionage724's patch above would be appropriate for upstream? My instinct is that changing axis to 0 might fix this particular case but break others.

Noting also that this component currently fails on Python 3 due to dependency on scikits.audiolab. See #5467.


comment:7 by ayleph, 8 years ago

I don't think there's any need for Espionage724 to share a bit of audio for this. It's the spectograph thumbnail generation that fails, not the actual audio conversion. We've had numerous people raise this issue. I think it would be appropriate to file a bug with freesound about this and try to get it fixed upstream.

Alternatively or additionally, I think we should provide an option to disable spectrograph thumbnail generation. It doens't use the workbench properly, and it fails on sites which use Cloudfiles storage. On my site which uses Cloudfiles, I had to disable this feature entirely to get audio uploads to work.

comment:8 by Ben Sturmfels, 8 years ago

The reason I asked for a sample of audio is that I'm not able to reproduce this error. Are you able to reproduce this Ayleph?

While the issue may not be related to the audio itself, I'd like to be sure before we push this issue upstream.

comment:9 by Espionage724, 8 years ago

Here's two files I believe I tested before:

comment:10 by Ben Sturmfels, 8 years ago

Thanks Espionage724, just confirming that both those files upload successfully for me. That's not at all to dismiss your problem; rather just to confirm that it's not caused by a property of the audio. Will attach my pip freeze output in case that helps compare versions.

I've also tested with your patch applied and upload still proceeds successfully (though I don't know enough to comment on whether the patch is the right thing to do).

by Ben Sturmfels, 8 years ago

Attachment: sturm-pip-freeze.txt added

pip freeze on system that doesn't exhibit this bug

comment:11 by Espionage724, 8 years ago

I did a MG install on Ubuntu 16.04 a little bit ago and still needed axis=0 for audio to process. Here's my notes on how I set-up MG:

If I recall correctly, the only distro I didn't need to do axis=0 on was Fedora Server 22 or 23.

comment:12 by LHammonds, 7 years ago

I had the same problem installing MediaGoblin 0.9.0 on Ubuntu Server 16.04.1 LTS.

The issue seems to be compatibility problems with AudioLab/Numpy.

You can get around this by installing the older versions of AudioLab and Numpy.

1st, remove the newer versions (Numpy 1.11.2 and AudioLab 0.11.0 at the time of this posting).

./bin/pip uninstall numpy
./bin/pip uninstall scikits.audiolab

Now install the versions that will work without the axis=0 workaround:

./bin/pip install numpy=1.9.1
./bin/pip install scikits.audiolab==0.10.2


by Jorge, 7 years ago

Use audio icon if the spectrum creation fails. Add TODOs to drop dependency from scikits.audiolab as suggested in ticket:5467#comment:4.

comment:13 by Olivier Mehani, 7 years ago

I had a follow-up issue after downgrading numpy and scikit.audiolab to the desired version.

File "numpy.pxd", line 30, in scikits.audiolab.pysndfile._sndfile (scikits/audiolab/pysndfile/_sndfile.c:9632)

This seems to be due to scikits.audilab in PyPi being statically linked against a different version of libsndfile. I fixed it by rebuilding scikit.audiolab from source, which linked it against my installed version.

pip install numpy==1.9.1 git+

comment:14 by ShawnRisk, 5 years ago

Status: acceptedreview

comment:15 by Ben Sturmfels, 4 years ago

Resolution: fixed
Status: reviewclosed

Thanks Jorge, I've merged these changes which complement the recent changes to provide separate audio Thumbnailer clases for Python2/3 in 1038aea8.

comment:16 by Ben Sturmfels, 4 years ago

Whoops, replied to wrong ticket ignore the previous.

comment:17 by Ben Sturmfels, 4 years ago

Resolution: fixed
Status: closedaccepted

comment:18 by Ben Sturmfels, 4 years ago

Resolution: fixed
Status: acceptedclosed

Oh, it seems this ticket is related to #5457 anyhow, which is why I got confused. Closing this one too.

comment:19 by Ben Sturmfels, 4 years ago

Resolution: fixed
Status: closedaccepted

Reopening as this doesn't entirely solve the problem. I'm not seeing no audio player due to the missing thumbnail. Could probably be fixed with CSS.

Or alternately we just burn anything related to audiolab and spectrograms. ;) I'm partly serious here, given that we can't easily carry the existing code forward into our Python 3-only future, and the current audio thumbnailing code seems to be a bit of a hot-spot for bugs.

comment:20 by Ben Sturmfels, 4 years ago

Resolution: fixed
Status: acceptedclosed

I've created a new ticket for the removal of audiolab and spectrograms, see #5594.

Note: See TracTickets for help on using tickets.