tiltaudio:media_server

For anyone interested : you can run the serial media server on the same Pi as the sound runs on. This saves you buying 2 Pis, cabling etc.

I have used this in CFTBL (see attached image)

The following assumes a basic knowledge of Linux and that you are able to SSH into the TiltAudio card, use SCP to transfer files to it and use nano to edit config files there. If you use Linux and put the SD card in a card reader you can copy the files directly since the “boot” partition is mounted automatically. Then you do not need to use SCP to transfer the media files, sound pack, serial.txt etc.

The mediafiles can be bought here : https://go-dmd.de/produkt/serial-media-server-image/ You can also buy a bundle here : https://go-dmd.de/produkt/tiltaudio-cftbl-bundle/

The sound files for CFTBL can be found here : http://altsound.vpin24.com/

This is the recipe :

1) Install TiltAudio card as normal with appropriate sound pack featuring the right serial.txt command files. You can download a zip file for CFTBL with the appropriate serial.txt files here (insert link here). The zip file does not contain any sound files, only the required serial.txt files

2) Set up TiltAudio with serial server address 127.0.0.1 and port 19999. You will find this setting under “Config” in the web ui.

3) Install serial media server into the directory /home/pi/serial-media-srv on the TiltAudio Pi as described here : https://github.com/sker65/serial-media-srv The easiest way is to download the master zip (https://github.com/sker65/serial-media-srv/archive/master.zip) and unzip in the /home/pi directory. Afterwards, rename /home/pi/serial-media-srv-master to /home/pi/serial-media-srv Copy /home/pi/serial-media-srv/serial-media.service to /etc/systemd/system

If Steve has not updated his img-mov-serial.py yet you can download a version here (insert link here) that has added functionality like a LOOP command to loop a video until stopped. This is good for attract movies for example. If you wish to loop the attract movie you must change the command “PLAY attract.mp4” to “LOOP attract.mp4”. The updated img-mov-serial.py also looks for files with names starting with “startup”. If it finds such a file, it will play it in loop until stopped. So if you copy “attract.mp4” to “startup.mp4” it will play the attract movie on boot/startup also.

4) Make a directory “smsdata” under /boot on TiltAudio SD card : mkdir /boot/smsdata Make a directory “data” under “smsdata” : mkdir /boot/smsdata/data Put your mediafiles there using SCP to copy from your local machine.

5) In /home/pi/serial-media-srv/start.sh, edit the BASEPATH :

BASEPATH=/boot/smsdata

6) Create /boot/smsdata/data/serial-media-srv.ini using the content as shown in the readme on the site above but enable the socketport :

socketport=19999

7) In /boot/config.txt on the SD-card for the Pi, comment out the line DISABLE_HDMI so it looks like this :

# for pi4 disable status at startup #DISABLE_HDMI=1

8) Enable the serial media server : systemctl enable serial-media

9) Reboot

Tested and working on a Pi3b.

  • Last modified: 3 years ago
  • by charlie