├── .pitile ├── images └── screen-example.jpg ├── .gitignore ├── .piwall ├── setup.sh └── README.md /.pitile: -------------------------------------------------------------------------------- 1 | [tile] 2 | id=pi? 3 | -------------------------------------------------------------------------------- /images/screen-example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Edinburgh-College-of-Art/piwall-setup/HEAD/images/screen-example.jpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | applet 3 | application.linux32 4 | application.linux64 5 | application.windows32 6 | application.windows64 7 | application.macosx 8 | -------------------------------------------------------------------------------- /.piwall: -------------------------------------------------------------------------------- 1 | # wall definition for 2x1 screens with bezel compensation 2 | # video 1280 × 720 3 | [2x1_wall] 4 | width=1280 5 | height=720 6 | x=0 7 | y=0 8 | 9 | # corresponding tile definitions 10 | [tile_0] # full screen tile 11 | wall=2x1_wall 12 | width=1280 13 | height=720 14 | x=0 15 | y=0 16 | 17 | [tile_1] 18 | wall=2x1_wall 19 | width=1280 20 | height=720 21 | x=0 22 | y=-315 23 | 24 | [tile_2] 25 | wall=2x1_wall 26 | width=560 27 | height=315 28 | x=0 29 | y=555 30 | 31 | [tile_3] 32 | wall=2x1_wall 33 | width=560 34 | height=315 35 | x=640 36 | y=6092 37 | 38 | # config 39 | [2x1] 40 | pi0=tile_0 41 | pi1=tile_1 42 | pi2=tile_2 43 | pi3=tile_3 44 | -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | # Pi Wall setup 2 | # Original Project: https://go.nasa.gov/1DYEa2v 3 | # 4 | # How to automatically turn off and on your monitor from your Raspberry Pi: 5 | # https://www.screenly.io/blog/2017/07/02/how-to-automatically-turn-off-and-on-your-monitor-from-your-raspberry-pi/ 6 | # Installs 7 | sudo apt-get update -y 8 | sudo apt-get upgrade -y 9 | 10 | sudo apt-get install -y libav-tools \ 11 | libjpeg8 \ 12 | libegl1-mesa-dev 13 | 14 | # If you are using a Linux PC as your master and don’t want to permanently alter your network configuration then execute the following commands after you have connected to the private PiWall network. 15 | # sudo ifconfig eth0 192.168.0.??? netmask 255.255.255.0 up 16 | # sudo route add -net 224.0.0.0 netmask 240.0.0.0 eth0 17 | 18 | # OR 19 | 20 | sudo nano /etc/network/interfaces 21 | 22 | wget http://dl.piwall.co.uk/pwlibs1_1.1_armhf.deb 23 | sudo dpkg -i /home/pi/pwlibs1_1.1_armhf.deb 24 | wget http://dl.piwall.co.uk/pwomxplayer_20130815_armhf.deb 25 | sudo dpkg -i /home/pi/pwomxplayer_20130815_armhf.deb 26 | 27 | sudo sh -c "printf ' 28 | auto eth0 29 | iface eth0 inet static 30 | address 192.168.0.??? 31 | netmask 255.255.255.0 32 | up route add -net 224.0.0.0 netmask 240.0.0.0 eth0 33 | ' >> /etc/network/interfaces" 34 | 35 | 36 | # /media/pi/Untitled/ble_uart.m4v 37 | 38 | # on each slave: $n=41 is the top left, 42 is the top right, 43 is the bottom left and 44 39 | # pwomxplayer --tile-code=41 udp://239.0.1.23:1234?buffer_size=1200000B 40 | 41 | # on master 42 | # avconv -re -i ble_uart.m4v -vcodec copy -f avi -an udp://239.0.1.23:1234 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # piwall-setup 2 | 3 | Setup Documentation and example config files for Raspberry Pi Video Wall 4 | 5 | ## Setup 6 | 7 | Setup documentation can be found here 8 | 9 | - [PiWall Setup](http://www.piwall.co.uk/information/installation) 10 | - [In-depth Setup](https://groups.google.com/forum/?hl=en-GB#!searchin/piwall-users/sync%7Csort:date/piwall-users/J942lhOWTIA/p6VjmzecAgAJ) 11 | 12 | The `setup.sh` script should cover everything required to setup each Raspberry Pi. 13 | 14 | ## Config 15 | 16 | The documentation for the config files can be found at the [piwall website](http://www.piwall.co.uk/information/configuration-file). 17 | Each Raspberry pi requires a `.piwall` and `.pitile` file in the home folder. These files dictate the layout of the screens, their dimensions and offsets. 18 | 19 | ### .pitile 20 | 21 | The `.pitile` is simply an identifier for that specific Raspberry Pi in the Pi Wall. 22 | 23 | It looks like 24 | 25 | ```bash 26 | [tile] 27 | id=pi? 28 | ``` 29 | 30 | where `?` is a number identifying that pi. 31 | 32 | ### .piwall 33 | 34 | The `.piwall` file is the same for each Raspberry Pi and it has the format 35 | 36 | ```bash 37 | [Wall_Name] 38 | width=Video-Width-Resolution 39 | height=Video-Height-Resolution 40 | x=X-coordinate-screen-offset 41 | y=Y-coordinate-screen-offset 42 | 43 | # corresponding tile definitions 44 | # Repeat for N screens 45 | [Tile_Config_Name_??] 46 | wall=Wall_Name 47 | width=width_in_pixels_of_tile 48 | height=height_in_pixels_of_tile 49 | x=X-offset-in-video 50 | y=Y-offset-in-video 51 | 52 | # config 53 | [Config-Name] 54 | pi?=screen_id_?? # Repeat for N screens 55 | ``` 56 | 57 | #### [Wall_Name] 58 | 59 | This section defines the total size of the screens and the offset when displaying. If all the screens are the same size, and the video resolution matches, an offset should not be required. 60 | 61 | #### [Tile_Config_Name_??] 62 | 63 | Tile Config section should be repeated for each screen. The width and height essentially dictate how many pixels to use from the video. 64 | 65 | > **Example:** 66 | > 67 | > If you have a video with resolution `1280 x 720` and a screen with native resolution `1280 x 720`, setting: 68 | > 69 | > - `width=1280` and `height=720` will display the video fullscreen 70 | > - `width=640` and `height=360` will under-scan the video and only the top left corner of the video will display 71 | > - `width=2560` and `height=1440` will overscan the video and the full video will be in the top left corner of the display 72 | 73 | The `x` and `y` value will shift the starting co-ordinate inside the video 74 | 75 | > **Example:** 76 | > 77 | > If you have a video with resolution `1280 x 720` and a screen with native resolution `1280 x 720`, setting: 78 | > 79 | > - `x=640` and `y=360` will display the bottom right corner of the video overscanned. 80 | > - `x=640` and `y=360`,`width=640` and `height=360` will display the bottom right corner of the video fullscreen. 81 | > - `x=-640` and `y=-360`,`width=2560` and `height=1440` will display the video in the top right corner over-scanned 82 | 83 | I would recommend starting using only a single tile in order to get to grips with how the videos are laid out. 84 | 85 | ##### Multiple Display Sizes 86 | 87 | **Example: 2 displays of different sizes** 88 | 89 | - Alignment: Centre 90 | - Orientation: 2 x 1 91 | 92 | ![](images/screen-example.jpg) 93 | 94 | | | Display 1 | Display 2 | Ratio | 95 | | :----- | :-------- | :-------- | ----- | 96 | | width | 6400 mm | 5150 mm | 1.24 | 97 | | height | 3450 mm | 2900 mm | 1.18 | 98 | | Aspect | 1.85 | 1.77 | | 99 | 100 | **Overscan:** 101 | 102 | ```bash 103 | # Calculate overscan 104 | video-reolution=1280x720 105 | width=1280*1.24 106 | width=1587 107 | height=720*1.24 108 | height=892 109 | ``` 110 | 111 | **Offset:** 112 | 113 | ```bash 114 | # calculate offset 115 | x=(1280-1280*1.24)/2 116 | x=-153 117 | y=720/2 118 | y=360 119 | ``` 120 | 121 | **.piwall** 122 | 123 | ```bash 124 | # wall definition for 2x1 screens with bezel compensation 125 | # video 1280 × 736 126 | [2x1_wall] 127 | width=1280 128 | height=720 129 | x=0 130 | y=0 131 | 132 | # corresponding tile definitions 133 | [tile_1] 134 | wall=2x1_wall 135 | width=1280 136 | height=720 137 | x=0 138 | y=-360 139 | 140 | [tile_2] 141 | wall=2x1_wall 142 | width=1587 143 | height=892 144 | x=-153 145 | y=360 146 | 147 | # config 148 | [2x1] 149 | pi1=tile_1 150 | pi2=tile_2 151 | ``` 152 | 153 | **Master function call** 154 | 155 | ```bash 156 | avconv -re -i $FILENAME -vcodec copy -f avi -an udp://239.0.1.23:1234 157 | ``` 158 | 159 | **infinite loop** 160 | 161 | ```bash 162 | while true; do avconv -re -i $FILENAME -vcodec copy -f avi -an udp://239.0.1.23:1234; sleep 2; done 163 | ``` 164 | 165 | **Tile function call** 166 | 167 | ```bash 168 | pwomxplayer -y --config=2x1 udp://239.0.1.23:1234?buffer_size=1200000B 169 | ``` 170 | 171 | ### Rotate screen 172 | 173 | in `sudo nano /boot/config.txt` add 174 | 175 | ```shell 176 | display_rotate=0 # no rotation 177 | # display_rotate=1 # 90º 178 | # display_rotate=2 # 180º 179 | # display_rotate=3 # 270º 180 | ``` 181 | 182 | ## Use Cases 183 | 184 | - Sync a video with max resolution 1920 x 1080 over multiple displays 185 | - Create a video wall from a source with max resolution 1920 x 1080 186 | 187 | ## Alternatives 188 | 189 | 1. [omxplayer-sync](https://github.com/turingmachine/omxplayer-sync) 190 | 2. [omxplayer-sync-2](https://github.com/pukster/omxplayer-sync-2) 191 | 3. [RTSP + omxplayer](https://raspberry-projects.com/pi/software_utilities/media-players/omxplayer) 192 | --------------------------------------------------------------------------------