Demo illustrating two independent displays for video playback as can be useful for Kiosk use cases.
Ubuntu 20.04 LTS Installation Steps
- sudo apt update && sudo apt install -y sway
- Open the config file and scroll down to the text "output DP-1". Currently this config file will support 2 displays side by side (horizontal from each other) using 1920x1080@60Hz on DP-1 and DP-2 interfaces/connectors. To find your connector names open a terminal and type: sudo cat /sys/kernel/debug/dri/0/i915_display_info and look "status: connected" which indicate available displays/connectors.
- Modify both names DP-1 and DP-2 to match your system
- Modify the resolution and refresh rates that you desire
- Save changes
- Execute: cp config ~/.config/sway/ (might not exist and is ok to skip if error occurs)
- Execute: cp config /etc/sway
- Optional: playback-video-2-indendent-displays.sh expects Gstreamer to be installed already. If another video player like VLC is desired open playback-video-2-indendent-displays.sh and modify to use your video player of choice.
- Reboot
- At the login prompt click your user name. In the bottom right hand corner click the icon which appears as gear and choose Sway from the drop down.
- Type your password in the login prompt to login
- At this point you should see Sway on the Desktop
VLC Installation Help
If using VLC for the playback
- sudo apt install vlc
GStreamer Installation Help
If using GStreamer for the video playback
- Install GStreamer
- Install GStreamer VAAPI plugins: apt install gstreamer1.0-vaapi
- export GST_VAAPI_ALL_DRIVERS=1 or add this permanently in the ~/.bashrc profile (append at end). Note this step is optional if using playback-video-2-independent-displays.sh script.
- Verify the command : gst-inspect-1.0 vaapi returns vaapih264dec and vaapih265dec
Verify Hardware Accelerated Decode during playback
- Install intel_gpu_top via sudo apt install intel-gpu-tools
- Run : sudo intel_gpu_top
Running the POC
- Open a terminal using Windows Key + Enter on the keyboard
- Execute: ./playback-video-2-indendent-displays.sh myvideo1.mp4 myvideo2.mp4
- Both videos will playback on their assigned workspaces e.g. displays.
- Note that the playback-video-2-independent-displays.sh is setup for H264 files only.