Raspberry Pi 3 model B ラズパイ3B(プラスじゃない元祖の方)
※ Raspberry Pi 4でも遅延は変わりません
Raspberry Pi OS (Legacy) with desktop
Release date: December 5th 2023
System: 32-bit
Kernel version: 6.1
Debian version: 11 (bullseye)
Image with desktop and recommended software based on Debian Buster
Version: August 2020
$ uname -a
Linux raspberrypi 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux
# Preparation
sudo apt update
sudo apt update
# On a fresh OS, install cmake:
sudo apt -y install cmake
# Clone the Raspberry Pi userland repo and run buildme:
cd
git clone https://github.com/raspberrypi/userland
cd userland
./buildme
# Replace vc4-kms-v3d with vc4-fkms-v3d in /boot/config.txt:
sudo sed -i 's/vc4-kms-v3d/vc4-fkms-v3d/g' /boot/config.txt
grep /boot/config.txt vc4
# Then reboot:
sudo reboot
# Build Binaries
# // Install packages (for compiling the players):
sudo apt -y install libx11-dev libasound2-dev libavformat-dev libavcodec-dev python3-evdev
# // Compile libraries on Pi:
cd /opt/vc/src/hello_pi/libs/ilclient/
sudo make
cd /opt/vc/src/hello_pi/hello_video
sudo make
# // Clone this repo (to a desired directory):
cd ~/
git clone https://github.com/homeworkc/lazycast
# // Go to the lazycast directory and then make:
cd lazycast
make
# キャスト接続用の PIN番号は all.shの中の下記の行の 31415926を書き換える
# sudo wpa_cli -i$p2pinterface wps_pin any 31415926
# Change PIN code
sed -i -e "s/31415926/00000000/" all.sh
grep wps_pin all.sh
# Auto Start lazycast
sudo sh -c "cat <<EOF>> /etc/xdg/lxsession/LXDE-pi/autostart
@lxterminal -l --working-directory=/home/pi/lazycast -e ./all.sh
EOF"
# Then reboot:
# 再起動後に自動的に lazycastが起動します
sudo reboot