Raspberry Pi is equipped with H.264 HW Codec that supports up to Full HD either 30fps. We will show you how to run a VideoCoin Worker on Raspberry Pi that used HW Codec
VideoCoin workers can be run with different Raspberry PI supported OS options, where hardware accelerated H264 encoding is supported through ffmpeg. Running with a Ubuntu 18.04 armhf version is recommended where all the system resources can be allocated to transcoding. It can also run on Raspbian versions where memory can be split and allocate maximum memory for the system and minimum required for GPU.
Option-1: Ubuntu 18.04
Download Ubuntu 18.04 armhf from the following site and flash the microsd card:
Install the following repos as specified in “Optional PPAs” section
sudo add-apt-repository ppa:ubuntu-raspi2/ppa
sudo apt-get update
Install the following repos as specified in “VideoCore” section
sudo apt-get install libraspberrypi-bin libraspberrypi-dev
sudo ln -s /usr /opt/vc
Option-2: Raspberry Pi OS(Raspbian) Lite
Use the Raspberry Pi OS Lite.
It will come preinstalled with VideoCore libraries.
Download and setup Ffmpeg for Raspberry Pi
Compile ffmpeg with H264 Hardware encoder
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install libomxil-bellagio-dev -y
git clone https://github.com/FFmpeg/FFmpeg.git
sudo ./configure --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree
sudo make -j4
sudo make install
Test h264 HW Encoder is active
ffmpeg -f lavfi -i testsrc=duration=10:size=1280x720:rate=30 -c:v h264_omx test.mp4
Starting the worker
Download the binary “worker-linux-arm” from the link to Raspberry Pi
Use the following command to start the worker in a terminal window
/worker-linux-arm64 start -k \<worker key file> -s \<password> -c \<client-id>
<worker key file> : Worker wallet file in UTC/JSON format. This wallet should be self staked
before using it with the worker.
<password>: Password for the <worker key file>.
<client-id>: Client ID created for the worker using VideoCoin Console( worker page )
./worker-linux-arm start -k worker_key.json -s test123 -c 26cfe429-4479-4c5c-b988-d7c82991cd75
When the worker is running, you should see the messages something as follows:
Please note that you can use a utility such as systemd or start-stop-daemon to run the worker as a background process: