From 3a1fb089e874caad8b63457bc9d3aecf5f0ad9b8 Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Wed, 29 Apr 2020 13:27:01 +1000 Subject: [PATCH] Test and update the media-types docs with Debian 10 and CentOS. Unfortunately wasn't able to get video going in CentOS. --- docs/source/siteadmin/deploying.rst | 4 +- docs/source/siteadmin/media-types.rst | 166 +++++++++++++------------- 2 files changed, 85 insertions(+), 85 deletions(-) diff --git a/docs/source/siteadmin/deploying.rst b/docs/source/siteadmin/deploying.rst index d20f0170..7b9d6e31 100644 --- a/docs/source/siteadmin/deploying.rst +++ b/docs/source/siteadmin/deploying.rst @@ -66,7 +66,9 @@ MediaGoblin has the following core dependencies: - `Node.js `_ On a DEB-based system (e.g Debian, Trisquel, Ubuntu and -derivatives) issue the following commands:: +derivatives) issue the following commands: + +.. code-block:: bash # Debian, Trisquel, Ubuntu and derivatives (Hereafter Debian and co.) sudo apt update diff --git a/docs/source/siteadmin/media-types.rst b/docs/source/siteadmin/media-types.rst index 10656cd6..225b453a 100644 --- a/docs/source/siteadmin/media-types.rst +++ b/docs/source/siteadmin/media-types.rst @@ -32,9 +32,9 @@ Enabling Media Types Media types are enabled in your MediaGoblin configuration file. -Most media types have additional dependencies that you will have to install. -You will find descriptions on how to satisfy the requirements of each media type -on this page. +Most media types require **additional dependencies** that you will have to install. You +will find descriptions on how to satisfy the requirements of each media type +below. To enable a media type, add the the media type under the ``[plugins]`` section in you ``mediagoblin.ini``. For example, if your system supported image @@ -44,9 +44,16 @@ and video media types, then it would look like this:: [[mediagoblin.media_types.image]] [[mediagoblin.media_types.video]] -Note that after enabling new media types, you must run dbupdate like so:: +Note that after enabling new media types, you must run dbupdate. If you have +deployed MediaGoblin as an unprivileged user as described in +":doc:`production-deployments`", you'll first need to switch to this account:: - ./bin/gmg dbupdate + sudo su mediagoblin --shell=/bin/bash + $ cd /srv/mediagoblin.example.org/mediagoblin + +Now run dbupdate:: + + $ ./bin/gmg dbupdate If you are running an active site, depending on your server configuration, you may need to stop it first (and it's certainly a @@ -75,93 +82,93 @@ instance the ``video`` media type configuration can be found in ``mediagoblin/media_types/video/config_spec.ini``. -Video +Audio ===== -To enable video, first install GStreamer and the python-gstreamer -bindings (as well as whatever GStreamer extensions you want, -good/bad/ugly). On Debianoid systems +To enable audio, install the GStreamer and python-gstreamer bindings (as well +as whatever GStreamer plugins you want, good/bad/ugly): .. code-block:: bash - sudo apt-get install python3-gi \ - gstreamer1.0-tools \ - gir1.2-gstreamer-1.0 \ - gir1.2-gst-plugins-base-1.0 \ - gstreamer1.0-plugins-good \ - gstreamer1.0-plugins-ugly \ - gstreamer1.0-plugins-bad \ - gstreamer1.0-libav \ - python3-gst-1.0 - - -Add ``[[mediagoblin.media_types.video]]`` under the ``[plugins]`` section in -your ``mediagoblin.ini`` and restart MediaGoblin. + # Debian and co. + sudo apt install python3-gst-1.0 gstreamer1.0-plugins-{base,bad,good,ugly} \ + gstreamer1.0-libav -Run + # Fedora and co. + sudo dnf install gstreamer1-plugins-{base,bad-free,good,ugly-free} -.. code-block:: bash +.. note:: - ./bin/gmg dbupdate + 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. -Now you should be able to submit videos, and MediaGoblin should -transcode them. +Add ``[[mediagoblin.media_types.audio]]`` under the ``[plugins]`` section in your +``mediagoblin.ini`` and update MediaGoblin:: -.. note:: + $ ./bin/gmg dbupdate - You almost certainly want to separate Celery from the normal - paste process or your users will probably find that their connections - time out as the video transcodes. To set that up, check out the - ":doc:`production-deployments`" section of this manual. +Restart MediaGoblin (and Celery if applicable). You should now be able to upload +and listen to audio files! -Audio +Video ===== -To enable audio, install the GStreamer and python-gstreamer bindings (as well -as whatever GStreamer plugins you want, good/bad/ugly). -To install these on Debianoid systems, run:: +To enable video, first install GStreamer and the python-gstreamer +bindings (as well as whatever GStreamer extensions you want, +good/bad/ugly): - sudo apt-get install python3-gst-1.0 gstreamer1.0-plugins-{base,bad,good,ugly} \ - gstreamer1.0-libav +.. code-block:: bash + + # Debian and co. + sudo apt install python3-gi gstreamer1.0-tools gir1.2-gstreamer-1.0 \ + gir1.2-gst-plugins-base-1.0 gstreamer1.0-plugins-{good,bad,ugly} \ + gstreamer1.0-libav python3-gst-1.0 .. note:: - 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. + We unfortunately do not have working installation instructions for Fedora and + co. Some incomplete information is available on the `Hacking Howto wiki page `_ + +Add ``[[mediagoblin.media_types.video]]`` under the ``[plugins]`` section in +your ``mediagoblin.ini`` and restart MediaGoblin. -Run +Run:: -.. code-block:: bash + $ ./bin/gmg dbupdate + +Restart MediaGoblin (and Celery if applicable). Now you should be able to submit +videos, and MediaGoblin should transcode them. - ./bin/gmg dbupdate +.. note:: -You should now be able to upload and listen to audio files! + You will likely need to increase the ``client_max_body_size`` setting in + Nginx to upload larger videos. + + You almost certainly want to separate Celery from the normal + paste process or your users will probably find that their connections + time out as the video transcodes. To set that up, check out the + ":doc:`production-deployments`" section of this manual. Raw image ========= -To enable raw image you need to install pyexiv2. On Debianoid systems +To enable raw image you need to install pyexiv2:: -.. code-block:: bash - - sudo apt-get install python3-pyexiv2 + # Debian and co. + sudo apt install python3-pyexiv2 Add ``[[mediagoblin.media_types.raw_image]]`` under the ``[plugins]`` section in your ``mediagoblin.ini`` and restart MediaGoblin. -Run - -.. code-block:: bash +Run:: - ./bin/gmg dbupdate + $ ./bin/gmg dbupdate -Now you should be able to submit raw images, and MediaGoblin should -extract the JPEG preview from them. +Restart MediaGoblin (and Celery if applicable). Now you should be able to submit +raw images, and MediaGoblin should extract the JPEG preview from them. ASCII art @@ -169,23 +176,20 @@ ASCII art To enable ASCII art support, first install the `chardet `_ -library, which is necessary for creating thumbnails of ASCII art +library, which is necessary for creating thumbnails of ASCII art:: -.. code-block:: bash - - ./bin/easy_install chardet + $ ./bin/easy_install chardet Next, modify your ``mediagoblin.ini``. In the ``[plugins]`` section, add ``[[mediagoblin.media_types.ascii]]``. -Run - -.. code-block:: bash +Run:: - ./bin/gmg dbupdate + $ ./bin/gmg dbupdate -Now any .txt file you uploaded will be processed as ASCII art! +Restart MediaGoblin (and Celery if applicable). Now any .txt file you uploaded +will be processed as ASCII art! STL / 3D model support @@ -200,14 +204,14 @@ is surely not to work prior to Blender 2.5X). Add ``[[mediagoblin.media_types.stl]]`` under the ``[plugins]`` section in your ``mediagoblin.ini`` and restart MediaGoblin. -Run +Run:: -.. code-block:: bash + $ ./bin/gmg dbupdate - ./bin/gmg dbupdate +Restart MediaGoblin (and Celery if applicable). You should now be able to upload +.obj and .stl files and MediaGoblin will be able to present them to your wide +audience of admirers! -You should now be able to upload .obj and .stl files and MediaGoblin -will be able to present them to your wide audience of admirers! PDF and Document ================ @@ -223,21 +227,17 @@ To enable the "PDF and Document" support plugin, you need: All executables must be on your execution path. -To install this on Fedora: - -.. code-block:: bash +To install this on Fedora:: - sudo yum install -y poppler-utils unoconv libreoffice-headless + sudo dnf install poppler-utils unoconv libreoffice-headless Note: You can leave out unoconv and libreoffice-headless if you want only PDF support. This will result in a much smaller list of dependencies. -pdf.js relies on git submodules, so be sure you have fetched them: +pdf.js relies on git submodules, so be sure you have fetched them:: -.. code-block:: bash - - git submodule init - git submodule update + $ git submodule init + $ git submodule update This feature has been tested on Fedora with: poppler-utils-0.20.2-9.fc18.x86_64 @@ -249,11 +249,9 @@ It may work on some earlier versions, but that is not guaranteed. Add ``[[mediagoblin.media_types.pdf]]`` under the ``[plugins]`` section in your ``mediagoblin.ini`` and restart MediaGoblin. -Run - -.. code-block:: bash +Run:: - ./bin/gmg dbupdate + $ ./bin/gmg dbupdate Blog (HIGHLY EXPERIMENTAL) -- 2.25.1