Skip to content

0 ‐ Installation

Alexander Refsum Jensenius edited this page Jan 10, 2024 · 7 revisions

The MG Toolbox is being developed on the latest Linux, OSX, and Windows versions and should work well on all platforms.

Installation

  1. Python: the toolbox relies on Python 3, so you must install that on your system. If you don't know where to start, we suggest installing Anaconda. Then you get Python and many other useful libraries to run MGT.
  2. FFmpeg: the toolbox uses many functions from the multimedia library FFmpeg. See below for OS-specific install advice.
  3. MGT: install the latest release of MGT using pip: pip install musicalgestures. This will also pull in some other relevant Python libraries (e.g., pandas, numpy, librosa).
  4. iPython: to check whether the toolbox is installed properly, you can run import musicalgestures as mg in an iPython window.
  5. Jupyter: to properly test the toolbox, run the example Jupyter Notebook.

Download

If you want to download the latest version of the toolbox (which may not yet have been released on PyPi), you can download the latest version from the repository as a zip file or using git:

git clone https://github.com/fourMs/MGT-python.git

Then, you need to install it by typing pip install . from the location of the files.

For standard use, however, we suggest to use the PyPi install option (above).

OS-specific installation instructions

Linux

You can install FFmpeg with:

sudo apt install ffmpeg

You must also have some GStreamer plugins for working with h264-compressed video files:

sudo apt install gstreamer1.0-plugins-base gstreamer1.0-plugins-ugly

Mac OS

On Mac OS, you can install FFmpeg via Homebrew:

brew install ffmpeg

If there is an error with creating symbolic links during the installation, try fixing it via brew unlink vde. Additionally, you need to install wget to be able to download the OpenPose models:

brew install wget

Windows

On Windows, you first need to download the FFmpeg compressed folder. Unzip it, rename it to ffmpeg, and move it to the root of your C: drive. Additionally, you need to run cmd as an administrator (press The Windows key+R, type cmd, and press Control+Shift+Enter) and set the environment path variable for FFmpeg by running the following command:

setx /m PATH "C:\ffmpeg\bin;%PATH%"

Restart your computer and verify the installation by running ffmpeg -version.

Problems

Please help us improve the documentation of the toolbox by adding a comment in the issues section.