Setting up a VideoCoin Worker on RaspberryPi
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

Setup

Download Ubuntu 18.04 armhf from the following site and flash the microsd card:
https://wiki.ubuntu.com/ARM/RaspberryPi Install the following repos as specified in "Optional PPAs" section sudo add-apt-repository ppa:ubuntu-raspi2/ppa
1
sudo apt-get update
Copied!
Install the following repos as specified in "VideoCore" section
1
sudo apt-get install libraspberrypi-bin libraspberrypi-dev
2
sudo ln -s /usr /opt/vc
Copied!

Download and setup Ffmpeg for Raspberry Pi

Compile ffmpeg with H264 Hardware encoder
1
sudo apt-get update
2
sudo apt-get install build-essential
3
sudo apt-get install libomxil-bellagio-dev -y
4
git clone https://github.com/FFmpeg/FFmpeg.git
5
cd FFmpeg
6
sudo ./configure --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree
7
sudo make -j4
8
sudo make install
Copied!
Test h264 HW Encoder is active
1
ffmpeg -f lavfi -i testsrc=duration=10:size=1280x720:rate=30 -c:v h264_omx test.mp4
Copied!

Download the VideoCoin Worker Docker Image or Binaries for Raspberry Pi

You can learn more about how to do this here

Setup VideoCoin Worker in VideoCoin Network Console

Use the "Worker" tab in VideoCoin Network Console and create the worker. The "Client Id" assigned to the worker needs to be used while running the worker as described in the following section.

Start the worker

Set the environment variables and start the transcode worker as shown below.
SECRET=xxxxx CLIENT_ID=XXXXXX-9984-465f-9b6a-683639ed0fa6
./transcoder_arm mine -k <keyfile>
Environment variables and command-line options
-k keyfile
Ethereum key file. Ethereum key file can be created using the ethkey tool as detailed in the following link..
https://github.com/ethereum/guide/blob/master/ethkey.md
CLIENT_ID
Worker ID obtained from the worker menu of VideoCoin Network Console
SECRET
Password for the ethereum key file
DISPATCHER_ADDR
Obtain the dispatch address from VideCoin support Example: d.dev.videocoin.network:5008

Performance:

Raspberry Pi supports encoding up to 1080p @30fps. Transcoding live streams at 1080p resolution and 30fps may introduce some discontinuities as there is not much head room to support jitter in the live stream. It is recommended to use only for VOD applications when transcoding at 1080p,30fps.
Last modified 1yr ago