| IPTV software |

Documentation for consumer format playback, preshow automation ...

Example connection. All devices are connected to a local network.

Linux server (tcp-server.py)

Requirements

Example for Debian based Linux without GUI:
apt-get install mpv mpd mpc screen psmisc python-zeep python-psutil lua-socket
*
apt-get install info-beamer
*On some systems you may have to compile info-beamer by yourself. Free version of Rasbperry Pi info-beamer has a small logo on the bottom of the screen!
You can download the latest infobeamer for Rapberry Pi from here.
apt-get install openbox obmenu xinit
You can skip this step if you have already Window manager installed. Instead Openbox, you can use any other window manager. It has be configured with black background, with no menus and no mouse cursor, if you are using only primary screen of course.
You may also need ftp server (vsftpd) to upload files to the server.
X11 vnc server is also recommended! This example configuration is also using Pulse Audio, which I recommend to install.
apt-get install x11vnc pulseaudio

Window manager configuration

Auto login without display manager
Create a directory named getty@tty1.service.d and a file in it called override-autologin.conf in the following location:
/etc/systemd/system/getty@tty1.service.d/override-autologin.conf
[Service]
Type=simple
ExecStart=
ExecStart=-/sbin/agetty --autologin yourusername --noclear %I $TERM
Change yourusername with actual user name!
Window manager (openbox) auto start
Edit .profile in the home directory and add this at the end:
#start openbox
[ "$(tty)" = "/dev/tty1" ] && exec startx -- -nocursor
export DISPLAY=:0
Create autostart in ~/.config/openbox/autostart:
mkdir ~/.config/openbox/
xset -dpms s off

#Uncomment if you installed x11vnc
#x11vnc -loop -display :0 -forever &

#Uncomment if you installed mpc
#mpc play

#Uncomment if you want info-beamer script to auto start
#~/kino-player/_infobeamer/ib-start.sh &

xsetroot -solid "#000000"

Mpv configuration

Create or edit ~/.config/mpv/mpv.conf. Alternatively edit /etc/mpv/mpv.conf
#----video and osd---------------------------------------
hwdec=vaapi
ontop
fs
fs-screen=1
cursor-autohide=always
#no-input-default-bindings
osd-level=0
no-osc

#----audio----------------------------------------------
ao=pulse
audio-channels=5.1
#audio-channels=2
#audio-spdif=ac3

#----smooth motion 23.974fps,24fps,25fps on 60fps screen
video-sync=display-resample
interpolation=yes
tscale=oversample

#----images----------------------------------------------
image-display-duration=inf

This is example for Intel NUC. For Raspberry Pi try to set hwdec=drm-copy.
Most of the settings are self explanatory.
For smooth playback of videos with different FPS you can have only 2 options: If you are using pulse audio and you want that low frequencies of stereo sources to be routed over the LFE channel, edit /etc/pulse/daemon.conf like this:
remixing-use-all-sink-channels = no
enable-lfe-remixing = yes
lfe-crossover-freq = 120

Download dynaMIX mpv-gui and copy main.lua and complete webui-page folder into the ~/.config/mpv/scripts/ folder.
Edit main.lua and change osd_logging to false.
Test mpv playback manually:
[webui] v2.1.0
[webui] 192.168.100.140:8080
Playing: Video/Test1/01-Dolby 51 Test.mp4
 (+) Video --vid=1 (*) (h264)
 (+) Audio --aid=1 --alang=und (*) (ac3)
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/i386-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
AO: [pulse] 48000Hz 5.1(side) 6ch float
Using hardware decoding (vaapi).
VO: [opengl] 1920x804 => 1920x804 vaapi
AV: 00:00:00 / 00:00:19 (2%) A-V:  0.000
Test dynaMIX mpv-gui by navigating with browser to http://192.168.100.140:8080:

Infobeamer lua script

Copy kino-player folder to the home directory.
Edit ib.sh and set correct path of python and correct path of infobeamer (/usr/bin/info-beamer) if you installed it manually (not via apt).
export INFOBEAMER_FULLSCREEN=1
export INFOBEAMER_WIDTH=1920
export INFOBEAMER_HEIGHT=1080
#export INFOBEAMER_BLANK_MODE=layer
if [ -d ~/kino-player/_infobeamer/ ]; then
  cd ~/kino-player/_infobeamer/
  /usr/bin/python zz----deleteoldimages.py
  pkill -9 -f zz----updates.py
  /usr/bin/python zz----updates.py&
  /usr/bin/info-beamer cinema-preshow-random-loop
fi
Script zz----deleteoldimages.py is used to delete expired images, script zz----updates.py is used to update clock on the screen.
Test the script by running it manually:
cd ~/kino-player/_infobeamer
./ib.sh
Info-beamer script is meant for automatic cinema pres-how playback loop with an option to override a current display with a preset image and small text notification at the bottom of the screen. Overridden image and text can be set via IMS3000 playlist or via client application.

If you installed infobeamer via apt, and you get an error "CRITICAL ERROR: unstoppable runaway code" when you start included lua script, download it from here.

If you rename image like this: ImageName__1210204___1520, it will be deleted on 12.10.2024, it will be shown on screen for 15 seconds and only after 20:00. Expired images are deleted only before infobeamer is started via ib.sh script.
Subfolders are not supported in this lua script, because open source infobeamer handles subfolders slightly different than the Rasbperry Pi version. Without subfolder support, this script should work on both versions. All files necessary for this script, except node.lua, start with zz----, so it is harder to accidentally delete them when uploading/deleting images.

If you using PI, make sure to read this. If you don't need mpv, you can get better performance from info-beamer without X (only framebuffer).

Mpd configuration

Mpd configuration is beyond the scope of this tutorial. Just make sure that the music playlist has infinite loop and test playback control with the mpc command.

tcp-server.py configuration

Server receives commands in a plain text with MD5 hash of a password. Make sure that local network is well secured! Use vpn if you need to access cinema network from outside.

Ip address of the devices in this example:

  • Dolby IMS3000: 192.168.100.50
  • Christie projector: 192.168.100.110
  • Christie sound processor/scaler: 192.168.100.120
  • Linux server (tcp-server.py): 192.168.100.140
  • Windows server: 192.168.100.240

Before installing tcp-server.py, make sure that you have kino-player folder into your home directory.
Edit ims300_macro_x in the _scripts folder and change ip address, username/password of IMS3000 according to your setup.

python /opt/dolby-soap/ims3000_macro.py "$1" "192.168.100.50:10000" "manager_username" "manager_password"
Make this shell script executable! Replace manager_username and manager_password with the actual username and password!
chmod +x ims300_macro_x
There are already some other scripts in this folder.
Optionally if you have Christie projector, you can edit projector_FLAT and projector_SCOPE scripts. You can add here some other projector scripts to control projector directly instead of the IMS3000 macros.
echo '(CHA 101)' | netcat -q5 -w5 192.168.100.110 5000&


You should optionally also correct other scripts (e.g. volume_x for sound processor) if ip addresses differ from this example.
The above scripts are used when you construct playlists with the client program!

Create dolby-soap in /opt directory.
 sudo mkdir /opt/dolby-soap
 
Now copy dolby-soap into the /opt directory!
/opt/dolby-soap directory is hard-coded in some other scripts and you therefore can't rename it differently.

Navigate to your IMS3000 web page (Setup & Maintenance->Tools / Add-ons) and download the following wsdl and xsd files:
  • Common
  • CPLManagement
  • MacroManagement
  • PowerManagement
  • Projectors
  • SessionManagement
  • ShowControl
  • SPLManagement
Copy theese files into /opt/dolby-soap/wsdl directory.


Copy contents of kino-server folder (tcp-server.py, imsxml.py) into the /opt/kino-server/ directory.

Test the server by running it manually.
First edit /etc/kino-server.ini and make sure that you change IMS3000_USERNAME and IMS3000_PASSWORD with the correct values!
cd /opt/kino-server/
python tcp-server.py
 
Script was tested only on python 2.7 and 3.7.
If you don't get any errors, stop it (Ctrl+C) and proceed with creation of systemd service.

Create kino-server.service in /etc/systemd/system directory.
[Unit]
Description=Tcp server for projector automation
After=network.target
StartLimitIntervalSec=0

[Service]
Environment="XDG_RUNTIME_DIR=/run/user/1000"
Type=simple
Restart=always
RestartSec=4
Environment=DISPLAY=:0
User=your_username
Group=your_group
ExecStart=/usr/bin/env python3 /opt/kino-server/tcp-server.py

[Install]
WantedBy=multi-user.target
 
Don't forget to change your_username, your_group and python version. Linux user name and group can not be root !
sudo systemctl enable kino-server
sudo systemctl start kino-server
 

Windows server (SMNetControlServer)

Server has no GUI, only system tray icon. It must be started with correct arguments, otherwise it won't start.
The order of arguments is important!

Mpv configuration

Download and install mpv from here.
In this example mpv is installed in D:\Windows Standalone Programs\mpv\.
Important: Add mpv to the windows path, otherwise the server won't be able to run it:

Download pre-built simple-mpv-webui windows libraries from here and copy the files and directories to the root folder of mpv instalation.
Download dynaMIX mpv-gui and copy main.lua and complete webui-page folder into the scripts subdirectory of mpv installation directory.
Create mpv.conf in the mpv instalation directory and edit it something like this:
#vo=direct3d 
#hwdec=dxva2-copy

fs
fs-screen=0
#cursor-autohide=always
#no-input-default-bindings
osd-level=0
no-osc

video-sync=display-resample
interpolation=yes
tscale=oversample

image-display-duration=inf

scripts-append="D:\Windows Standalone Programs\mpv\scripts\simple-mpv-control"

Manually load media with mpv (e.g. mpv media.mp4) or open media with mpv via windows explorer and test dynaMIX mpv-gui by navigating with browser to http://192.168.100.240:8080.
It is essential that mpv-gui works, otherwise automatic advance to the next playlist item in the client application won't work.

PowerPoint configuration

Install Office 2007 or Office 2013. There is nothing else to be configured, just make sure that the Presenter View mode works on the correct display.

Foxit pdf reader configuration

There are quite a few settings that needs to be changed. Check all the settings and make sure that:
  • Starts in a full screen mode without any alert.
  • Manually move window to the correct display. Foxit pdf reader remembers on which display it was closed.
  • Don't allow multiple instances.
  • It should not display any prompts when closing or opening documents.

SMNetControlServer configuration

Copy all files of the server to a folder of your choice.
Start command prompt and navigate to that folder.
In this example the server is located in D:\Windows Standalone Programs\SMNetControlServer\.
d:
cd D:\Windows Standalone Programs\SMNetControlServer\
SMNetControlServer 50889 0_10 server_password "E:\MyMedia\"
  • 1st argument: server port;
  • 2nd argument: trailer list notification auto-close timeout. If written together with the underscore, the right side defines the minimal timeout even if trailers duration is lower than the timeout.
  • 3rd argument: password of the server. This argument can be omitted if you don't want password protection. Passwords are transfered in a plain text. Make sure your network is well secured. Use the server only on internal network.
  • 4th argument: root folder of the media files (videos, pictures, pptx, pdf);
If you need the server to display number of trailers and duration (on a display in the cinema lobby), replace trailer_list_background.png with your own image and edit trailer_string.ini according to your needs.
You will also need to ensure that Windows DPI is set to 100%:


To start server ob boot, open startup folder with shell:startup and create shortcut to SMNetControlServer.exe with all the arguments.

Dolby IMS3000

Macros (everyone's favourite :))

You probably already have some macros defined. You will need the names of the macros for the client application later.

To communicate with Linux server, a new raw device must be added. In this example it is called an infotainment. Enter the ip address of the linux server and port (44445):



In this example only Linux device is added. Even for the trailer list on the Windows server, the Linux device is enough, because it relays this particular message to the Windows server.

Commands that Linux server accepts
In this example the Linux server has no password!

If you need a password, you will have to insert pwd={md5 hash of a password}? before each command!
Use one of the online tools to generate MD5 hash of the password.

List of the commands for the Linux server:
 nuc.playmusic - Starts mpd playback by executing mpc play.
 nuc.stopmusic - Stops mpd playback by executing: mpc stop.
 nuc.startinfbm - Starts the info-beamer lua script.
 nuc.stopinfbm - Stops the info-beamer.
 kino-player/script/{SCRIPT NAME} - Executes shell script in the ~/kino-player/_scripts directory. Scripts must have execution permissions.
 kino-player/play_playlist/{PLAYLIST NAME} - Starts the playlist (shell script actually) created with Client application. Playlists are stored in ~/kino-player/playlists directory.
 kino-player/kill_playlist/ - Kills the currently playing playlist (shell script actually).
 ims3000/macro/{MACRO NAME} - Executes the macro on the Dolby IMS3000. This command is meant for Client application.
 nuc.trailerinfo.tv - Displays the number and the total length of the trailers on the Windows client.
 nuc.trailerinfo.screen - Displays the number and total length of the trailers on the info-beamer screen(bottom of the screen). The number of trailers is the number of cpls minus one (movie).
 screen/ - Command for the info-beamer. Message is relayed to info-beamer. Text message must be json encoded. Examples:  screen/picture/override:{number}, screen/picture/clear, see node.lua for more.
 
 There are also some other commands that are useful only for the Client application.
 
Each command should stop with a new line (with \r\n on Dolby IMS3000 macros).
Examples

Start the info-beamer lua script from the playlist:


Override the current info-beamer screen with the preset image 1 (zz----PRESET1.png):


Start music (mpd/mpc) from the playlist:


Start playlist with the name PRESHOW on the Linux server (made with Client application):


Some other screenshots that you might find useful (HDMI issues, full playlist example):



Example of notification on the screen in the lobby, triggered from a playlist.
Xibo Digital Signage on Windows OS is normally running on that screen. As soon as the trailers begin to play, SMNetControlServer.exe recieves the message from the playlist macro and displays this notification over the Xibo window:


Client application

Client application talks to both servers and IMS3000. It may help you to do things a little easier in a multi-purpose theatre.

Requirements

On Windows WebView2 runtime is need for embedded web browser to work.
Download Evergreen Bootstrapper and run it!

On Linux install gstreamer1.0-plugins-bad for embedded web browser to work.
apt-get install gstreamer1.0-plugins-bad

Python dependencies:
python3 -m pip install requests wxpython

Window dimensions

Default dimension will look alright only on 1920x1080 display.
For other screen resolutions and for different size of the script or macro panel change
size_x, size_y
and script_panel_height
in settings.txt.

Macro configuration

Unfortunately macros must be set up in the application manually.

Let's start with projector macros first. You can skip this step if you don't know network commands for your projector, because everything can be done via IMS3000 macros. There are already two projector macros included in the ~/kino-player/_scripts directory: projector_FLAT and projector_SCOPE. As already mentioned in the Linux server section, these are one line scripts for channel change on Christie projectors.

Open macro-import.txt and add these two projector macros:
# [group]:[name]:[script name]:[argument]:[custom network command][button color hex code]{-}
# If no script name is set, name is used as a script name.
# Max 3 different types are supported for scripts (3 types - 3 combo boxes in order of first appearance). 
# Default network command is the same as script name (kino-player/script/[script_name])
# Custom network commands are defined in server.
# If line ends with minus sign, macro is not added to execution list but only in to the combo boxes for playlist creation.

[PROJ]:[FLAT]:[projector_FLAT]:[]:[]:[#4d4dff]
[PROJ]:[SCOPE]:[projector_SCOPE]:[]:[]:[#4d4dff]
There are no custom network commands available for projector macros. Linux tcp server just executes the appropriate shell script in the ~/kino-player/_scripts directory. There are no arguments for these 2 scripts. If you run the application now, it will look like this:

Projector macros just execute the script without giving you any feedback about the actual success!

Let's add the same functionality, but this time via Dolby IMS 3000 macros. I assume you already have FLAT and SCOPE macros on your IMS3000. If they are named differently, use that names.

....
[PROJ]:[FLAT]:[projector_FLAT]:[]:[]:[#4d4dff]
[PROJ]:[SCOPE]:[projector_SCOPE]:[]:[]:[#4d4dff]

[IMB]:[FLAT]:[ims3000_macro_x]:[FLAT]:[ims3000/macro/]:[#009999]
[IMB]:[SCOPE]:[ims3000_macro_x]:[SCOPE]:[ims3000/macro/]:[#009999]
These two commands now also have a custom network command. This works better, because the button gives you feedback when command is executed on the IMS3000.
The argument of this command must be the same as macro name defined on Dolby IMS3000! Command name can be renamed.
The Client app will now look like this:

Add the rest of your IMS3000 macros as shown above.

If you have an external audio processor, add it to the application:
You can find an example for Christie SKA3D processor in the script named volume_x:
echo -ne 's mstervol' $1'\r\n' | netcat -q5 -w5 192.168.100.120 23&

Macro for audio processor would then look like this:
[AUDIO]:[volume 3.5]:[volume_x]:[3.5]:[]:[#037E26]
[AUDIO]:[volume 5.0]:[volume_x]:[5.0]:[]:[#037E26]
Check the manual for your audio processor.

Add some info-beamer script commands:
[INF]:[Infobeamer START]:[startinfbm]:[]:[nuc.startinfbm]
[INF]:[Infobeamer STOP]:[stopinfbm]:[]:[nuc.stopinfbm]
[INF]:[Infobeamer PRESET 1]:[infbm_preset_x]:[1]:[screen/picture/override:]
[INF]:[Infobeamer PRESET CLEAR]:[infbm_preset_clear]:[]:[screen/picture/clear:]

Video playback with mpv on the Linux server

First create a macro on the IMS3000 that will:
- Switch projector to appropriate channel (e.g. FLAT).
- Delay of 3 seconds. This is needed at least for Christie Solaria One.
- Switch IMS3000 to HDMI input (see screenshots above).
- Name this macro FLAT-HDMI or something similar.

Add this macro to Client application (macro-import.txt) as shown above.

Insert this macro in the playlist like shown in the screenshot below and play this playlist:


If you put the macro in the playlist and the macro has a long execution time (e.g. macro with a projector channel change with a delay of couple of seconds), the next line will be executed only after complete macro is executed on IMS3000.
You can also play root media without creating a playlist by clicking on Direct play.
You can define a macro in settings.txt that will be executed before the Direct play command.

Media playback on the Windows server

Windows server was written as a simple replacement for the ScreenMonkey application.
Like the Linux server, Windows server only executes the external applications which therefore makes the whole system more stable.

Windows server can not be used as an auto-advance playlist. For random infinite loop use Linux server with included info-beamer lua script! For auto-advance video playlist use Linux server scripts. This feature may be added later.


Last 2 tabs are used for Windows server control. If you start video playback from the PPT/PDF/IMG tab, you can then control it from the Mpv control tab. Mpv playback can't be controlled at the same time for both servers, however you can use 2 instances of this application with different settings.

Downloads

Download kino-server-linux-20240131-b.zip (Linux server)
Download SMNetControlServer-windows_20240122.zip (Windows server)
Download client-app-python-20240131.zip (Client application - python)
Download client-app-pywin39_20240201.zip (Client application - windows executable)