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

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

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

cd FFmpeg

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

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

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…


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.

I purchased a Raspberry Pi 4B with 8GB of Ram. Do i need to get an external hard drive for optimal performance? Also what size do you recommend? Thanks.

The Raspberry Pi itself is good to go. Work on the network does not use hard drive resources.

Thank you for the quick response! Im guessing the 8GB version is better than the other Raspberry Pi 4B’s variants?

I’d get the 8gb version, although both would work.

My board would not let me run Ubuntu 18.04 so I installed 20.04 and that worked. But now I can’t install the Optional PPAs, what should I do? Thanks.