For 0.10.0 we're removing specrograms entirely for reliability. This change only
disables spectrograms and updates install docs and Dockerfiles. We still need
to strip out all the spectrogram code and extlib/freesound/.
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-ugly \
-libsndfile1-dev \
-python-gst-1.0 \
-python-numpy \
-python-scipy
+python-gst-1.0
RUN apt-get install -y \
gir1.2-gst-plugins-base-1.0 \
RUN VIRTUALENV_FLAGS='--system-site-packages' ./configure --without-python3
RUN make
-RUN ./bin/pip install scikits.audiolab
-
RUN echo '[[mediagoblin.media_types.audio]]' >> mediagoblin.ini
RUN echo '[[mediagoblin.media_types.video]]' >> mediagoblin.ini
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-ugly \
-libsndfile1-dev \
-python3-gst-1.0 \
-python3-numpy \
-python3-scipy
+python3-gst-1.0
# Install video dependencies.
RUN apt-get install -y \
RUN VIRTUALENV_FLAGS='--system-site-packages' ./configure
RUN make
-# Only supported on Python 2.
-# RUN ./bin/pip install scikits.audiolab
-
# Only safe if being run on a clean git checkout. Otherwise you may have already
# customised mediagoblin.ini to already install these.
RUN echo '[[mediagoblin.media_types.audio]]' >> mediagoblin.ini
=====
To enable audio, install the GStreamer and python-gstreamer bindings (as well
-as whatever GStreamer plugins you want, good/bad/ugly), SciPy and NumPy are
-also needed for the audio spectrograms.
+as whatever GStreamer plugins you want, good/bad/ugly).
To install these on Debianoid systems, run::
sudo apt-get install python3-gst-1.0 gstreamer1.0-plugins-{base,bad,good,ugly} \
- gstreamer1.0-libav python3-numpy python3-scipy libsndfile1-dev libasound2-dev
+ gstreamer1.0-libav
.. note::
- scikits.audiolab will display a warning every time it's imported if you do
- not compile it with alsa support. Alsa support is not necessary for the GNU
- MediaGoblin application.
-
-If you're running Python 2, install ``scikits.audiolab`` for the spectrograms::
-
-.. code-block:: bash
-
- ./bin/pip install numpy==1.9.1
- ./bin/pip install scikits.audiolab==0.10.2
-
-For Python 3 ``scikits.audiolab`` has no package yet. Instead of the cool
-specrogram image a static icon is used until we found a replacement. (#5467)
+ MediaGoblin previously generated spectrograms for uploaded audio. This
+ feature has been removed due to incompatibility with Python 3. We may
+ consider re-adding this feature in the future.
Add ``[[mediagoblin.media_types.audio]]`` under the ``[plugins]`` section in your
``mediagoblin.ini`` and restart MediaGoblin.
from gi.repository import GObject, Gst
Gst.init(None)
-import numpy
-import six
-
+# TODO: Now unused - remove.
class Python2AudioThumbnailer(object):
def __init__(self):
_log.info('Initializing {0}'.format(self.__class__.__name__))
def spectrogram(self, src, dst, **kw):
+ import numpy
# This third-party bundled module is Python 2-only.
from mediagoblin.media_types.audio import audioprocessing
th.save(dst)
-class Python3AudioThumbnailer(Python2AudioThumbnailer):
- """Dummy thumbnailer for Python 3.
+class DummyAudioThumbnailer(Python2AudioThumbnailer):
+ """A thumbnailer that just outputs a stock image.
The Python package used for audio spectrograms, "scikits.audiolab", does not
support Python 3 and is a constant source of problems for people installing
img.save(dst)
-AudioThumbnailer = Python3AudioThumbnailer if six.PY3 else Python2AudioThumbnailer
+# Due to recurring problems with spectrograms under Python 2, and the fact we're
+# soon dropping Python 2 support, we're disabling spectrogram thumbnails. See #5594.
+AudioThumbnailer = DummyAudioThumbnailer
class AudioTranscoder(object):