Skip to content

Latest commit

 

History

History
117 lines (88 loc) · 2.84 KB

OSX.md

File metadata and controls

117 lines (88 loc) · 2.84 KB

Building on OSX

HASNT BEEN TESTED, IF SOMETHING IS WRONG PLEASE SUBMIT A PR WITH FIXES

Prerequisites

Building

  1. Download (or clone, if git installed) the repository
git clone https://github.com/projectM-visualizer/gst-projectm.git
  1. Setup
./setup.sh
# OR
./setup.sh --auto # Skips prompts by using default options
  1. Set Environment Variables
  • PROJECTM_ROOT - Path to built projectM directory
echo "export PROJECTM_ROOT=YOUR_PATH_HERE" >> ~/.bashrc
echo "" >> ~/.bashrc
source ~/.bashrc
# OR
echo "export PROJECTM_ROOT=YOUR_PATH_HERE" >> ~/.zshrc
echo "" >> ~/.zshrc
source ~/.zshrc
# OR
echo "export PROJECTM_ROOT=YOUR_PATH_HERE" >> ~/.zprofile
echo "" >> ~/.zprofile
source ~/.zprofile
# OR
echo "export PROJECTM_ROOT=YOUR_PATH_HERE" >> ~/.bash_profile
echo "" >> ~/.bash_profile
source ~/.bash_profile
  1. Run build script
./build.sh

./build.sh --auto # Skips prompts by using default options

Installing

Automatic

The build script will ask if you want to install the plugin.

Manual

  1. Create GStreamer plugins directory.
mkdir -p $HOME/.local/share/gstreamer-1.0/plugins/
  1. Copy the built plugin to the plugins directory.
mv "dist/libgstprojectm.so" "$HOME/.local/share/gstreamer-1.0/plugins/libgstprojectm.so"
  1. Set GST_PLUGIN_PATH environment variable to the plugins directory.
echo "export GST_PLUGIN_PATH=$HOME/.local/share/gstreamer-1.0/plugins/" >> ~/.bashrc
echo "" >> ~/.bashrc
source ~/.bashrc
# OR
echo "export GST_PLUGIN_PATH=$HOME/.local/share/gstreamer-1.0/plugins/" >> ~/.zshrc
echo "" >> ~/.zshrc
source ~/.zshrc
# OR
echo "export GST_PLUGIN_PATH=$HOME/.local/share/gstreamer-1.0/plugins/" >> ~/.zprofile
echo "" >> ~/.zprofile
source ~/.zprofile
# OR
echo "export GST_PLUGIN_PATH=$HOME/.local/share/gstreamer-1.0/plugins/" >> ~/.bash_profile
echo "" >> ~/.bash_profile
source ~/.bash_profile

Using

To utilize the plugin with the example, please install GStreamer

gst-launch-1.0 audiotestsrc ! queue ! audioconvert ! projectm ! "video/x-raw,width=512,height=512,framerate=60/1" ! videoconvert ! xvimagesink sync=false

Testing

./test.sh --inspect # Inspect the plugin
./test.sh --audio # Test the plugin with audio
./test.sh --preset # Test the plugin with a preset
./test.sh --properties # Test the plugin with properties
./test.sh --output-video # Test the plugin with video output (video only)
./test.sh --encode-output-video # Test the plugin with encoded video output (audio/video)