Skip to content

Instantly share code, notes, and snippets.

@baydam
Last active November 4, 2024 00:13
Show Gist options
  • Save baydam/a905e4878f54150f7da421e2c1d17a21 to your computer and use it in GitHub Desktop.
Save baydam/a905e4878f54150f7da421e2c1d17a21 to your computer and use it in GitHub Desktop.
How to build PocketVJ on Raspberry Pi 3

Documentation for building PocketVJ on raspberry Pi 3

Install Raspbian Lite

Find the instruction in the link below https://www.raspberrypi.org/documentation/installation/installing-images/README.md

Install dependencies

$ sudo apt-get -y install lxde-core lxterminal lxappearance xinit lightdm ntfs-3g python-pexpect vim figlet git-core firmware-ralink hostapd isc-dhcp-server lighttpd samba samba-common-bin php5-common php5-cgi php5 php5-mysql screen fbi ttf-mscorefonts-installer mediainfo gparted php5-cli iptables xtightvncviewer imagemagick dosfstools exfat-utils exfat-fuse hfsplus hfsprogs hfsutils xdotool expect expect-dev avahi-daemon libavahi-compat-libdnssd-dev feh libjpeg8 libjpeg8-dev libao-dev avahi-utils libavahi-compat-libdnssd-dev libva-dev youtube-dl python-smbus mpg321 mpg123 libreoffice-impress rc-gui python-pip iceweasel python-dev python-dbus xpdf x11-xserver-utils libncurses5-dev shellinabox tk okular usbmount libgstreamer0.10-0 libgstreamer0.10-dev gstreamer0.10-tools gstreamer0.10-plugins-base libgstreamer-plugins-base0.10-dev gstreamer0.10-plugins-good gstreamer0.10-plugins-ugly gstreamer0.10-plugins-bad libgstreamer-plugins-base1.0-dev gstreamer1.0

$ sudo pip install --upgrade pip
$ sudo pip install pjlink python-osc svgtools svgpathtools svgwrite

Setup PocketVJ Control Panel server

$ cd /tmp
$ git clone https://github.com/magdesign/PocketVJ-CP-v3.git
$ sudo mv PocketVJ-CP-v3/* /var/www
$ sudo chown -R www-data:www-data /var/www

Add www-data to your sudoers list with: visudo add this line at the end: www-data ALL=(ALL) NOPASSWD: ALL
Allow php with: sudo lighty-enable-mod fastcgi-php
Edit /etc/lighttpd/lighttpd.conf and replace /var/www/html by /var/www
Then reload lighttpd server with: sudo /etc/init.d/lighttpd force-reload
Create diferrent folders for audios and videos

$ sudo mkdir -p /media/internal/{video,images,pdf,audios}

Clone RaspiDMX to Raspberry home directory

$ cd && git clone https://github.com/AndrewFromMelbourne/raspidmx

Install Openframeworks 0.9.8

Download openFrameworks
$ cd /tmp
$ wget http://openframeworks.cc/versions/v0.9.8/of_v0.9.8_linuxarmv6l_release.tar.gz
$ tar -zxvf of_v0.9.8_linuxarmv6l_release.tar.gz
$ mv of_v0.9.8_linuxarmv6l_release ~/openFrameworks
Install packages and compile openFrameworks
$ cd /home/pi/openFrameworks/scripts/linux/debian
$ sudo ./install_dependencies.sh
$ sudo ./install_codecs.sh
$ make Release -C /home/pi/openFrameworks/libs/openFrameworksCompiled/project

Install HPlayer

Prepare your RaspberryPi

$ sudo raspi-config
	# Expand filesystem
	# Split GPU memory to 256
	# Bootup in Console
	# Overclock if you want to
	# Reboot !

Build HPlayer from source

$ cd ~/openFrameworks/addons/
$ git clone https://github.com/jvcleave/ofxOMXPlayer.git
$ git clone https://github.com/satoruhiga/ofxArgParser.git
$ git clone https://github.com/jkosoy/ofxCrypto.git

$ cd ~/openFrameworks/apps/myApps/
$ git clone https://github.com/Hemisphere-Project/HPlayer.git
$ cd HPlayer
$ make
$ cp -R bin/ ~/HPlayer
$ cd ~

Install OMXPlayer-sync

$ sudo su
$ apt-get remove omxplayer
$ rm -rf /usr/bin/omxplayer /usr/bin/omxplayer.bin /usr/lib/omxplayer
$ apt-get install libpcre3 fonts-freefont-ttf fbset libssh-4 python3-dbus
$ wget http://omxplayer.sconde.net/builds/omxplayer_0.3.7~git20160713~66f9076_armhf.deb
$ dpkg -i omxplayer_0.3.7~git20160713~66f9076_armhf.deb
$ wget -O /usr/bin/omxplayer-sync https://github.com/turingmachine/omxplayer-sync/raw/master/omxplayer-sync
$ chmod 0755 /usr/bin/omxplayer-sync
$ wget https://github.com/turingmachine/omxplayer-sync/raw/master/synctest.mp4

Simulate a fake keyboard

$ cd /tmp
$ wget http://www.fsays.eu/downloads/fsaysPI.7z
$ sudo apt-get install p7zip
$ 7z x -t7z fsaysPI.7z
$ sudo cp fsaysPI/fsaysuinput /opt
$ sudo cp fsaysPI/fsayskeyboard /opt
$ sudo chmod +x /opt/fsays*

Install TCPSClient

$ cd /tmp
$ wget https://mypage.techlife.sg/products/TCPSClient.zip
$ unzip TCPSClient.zip

In case you use Raspberry Pi 3 copy TCPSClient3.bin to excutable directory

$ sudo cp TCPSClient/TCPSClient3.bin /usr/bin/
$ sudo chmod u+x /usr/bin/TCPSClient3.bin

Install info-beam for using the snapshot function

$ cd /tmp
$ git clone https://github.com/info-beamer/tools.git
$ cd tools/screenshot/ && make
$ cd ../ && sudo mv screenshot/ /opt/

Install Pi-Wall

$ cd /tmp
$ wget http://dl.piwall.co.uk/pwlibs1_1.1_armhf.deb
$ sudo dpkg -i pwlibs1_1.1_armhf.deb
$ wget http://dl.piwall.co.uk/pwomxplayer_20130815_armhf.deb
$ sudo dpkg -i pwomxplayer_20130815_armhf.deb

Install Extplorer

install eXtplorer in /var/www/eXtplorer and configure it: sudo nano /var/www/eXtplorer/include/init.php

change the root directory to '/media/';

$ cd /tmp
$ wget http://extplorer.net/attachments/download/68/eXtplorer_2.1.9.zip
$ unzip eXtplorer_2.1.9.zip -d eXtplorer
$ sudo mv eXtplorer /var/www/
$ sudo chown -R www-data /var/www/eXtplorer

Increase the upload size limit by editing these lines below in /etc/php5/cgi/php.ini

$ sudo sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 2000M/g' /etc/php5/cgi/php.ini
$ sudo sed -i 's/post_max_size = 8M/post_max_size = 8000M/g' /etc/php5/cgi/php.ini
@magdesign
Copy link

magdesign commented Jun 27, 2024

newer boards have some hardware changes (but still have the same name) which require new kernel modules... there might be your issue

@studiofrankensound
Copy link

that sounds about right. I expect it's a fair bit of effort and time to update and install everything with my limited knowledge but hopefully someone can get it working again in future, thanks

@miguemesa
Copy link

Hi dear Mag! I'm an artist from Mexico, trying to run your pocketVj in three raspis 3b+. In my old one your image works smooth but in my new ones it makes nothing. Any tips on installing and make them work? Thanks in advance!

@miguemesa
Copy link

Just found a solution for the issue with the new 3b+ boards: some files need to be overwritten directly at the SD card at /boot folder.
You can get the files here:
https://github.com/raspberrypi/firmware/archive/refs/heads/stable.zip
Determine which start??.elf and fixup??.dat files are present in the destination OS image and substitute with the same files from this ZIP.
Hope it help!

@studiofrankensound
Copy link

Success! Thanks, now for the first time I see PocketVJ booting on my 3b+ :) Look forward to exploring this and thanks again

@BAINTERTHEPAINTER
Copy link

Hello everyone, The fix above did work however, my wifi network isn't showing so I can't connect to the control panel. Has anyone else had the same issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment