Brainy Pi

Available to select audience (currently beta)

Rbian OS Advanced

Description

Here, you’ll find all the information you need to set up and use some of the advanced features of Brainy pi on Rbian. Our guides are designed to help you get the most out of Brainy Pi. From setting up your device to mastering advanced techniques, we’ve got you covered.

INFO
This documentation is for Rbian OS version: 0.7.2-beta
To check the version of Rbian run the command in terminal
				
					os-version
				
			
Note: If the command fails or gives error then Rbian version is < 0.7.2-beta.

Installing Docker

Docker can be installed by running command
				
					sudo apt install docker.io

				
			
CAUTION
Above command does not install the latest Docker version, if you want to install the latest docker version then please follow the steps in the Official Document from Docker

Installing packages from 3rd party sources

To install .deb file, run command
				
					sudo dpkg -i ./path/to/deb/file
sudo apt update && sudo apt install -f 
				
			
For example:
				
					sudo dpkg -i ./anydesk.deb 
sudo apt update && sudo apt install -f 
				
			
NEED SUPPORT?
First, Ensure version of OS installed and the version this document is intended for match. If they match and yet problem persists. Please use this Forum link for community help.
If you are an enterprise customer please use the ticketing system login provided to you for priority support.

Hardware Accelerated Encoding and Decoding

Brainy pi features a VPU in addition to on chip GPU. VPU can accelerate hardware encoding and decoding giving you faster perfomance. This section shows developers how to use those options and the various modes available for same.

Technical Information

Formats supported for encoding and decoding of video are as follows.
✔️ says support and ❌ says not supported.
Format
Decode
Encode
MPEG-1
✔️
MPEG-2
✔️
MPEG-4
✔️
H.263
✔️
H.264
✔️
✔️
H.265
✔️
VC-1
✔️
VP9
✔️
VP8
✔️
✔️
MVC
✔️
Following formats are not tested by us in decoding.
  • MPEG-1, MPEG-2, MPEG-4, H.263, VC-1, VP8, MVC.

Decoding Audio Video

In this example we will be converting MP4 file into decoded RAW video and audio files.
CAUTION
RAW video files consume a lot of disk space. A 20 sec RAW video of 1280×720 resolution will consume 1.9 GB disk space. There is a possiblity that BrainyPi may run out of Disk space. While using the programs below please ensure that BrainyPi has appropriate ammount of Disk space to decode the given input video file.
Decoding using shell script
1. Download the repository below
				
					git clone https://github.com/brainypi/hw-accelerated-encode-decode.git
cd hw-accelerated-encode-decode/decode
				
			
2. To use just run the command, where ./samplevideo.mp4 is your input file
				
					./decode.sh -i ./samplevideo.mp4 -o ./output
				
			
3. Decoded successfully if no errors !!
Decoding using cpp
1. Download the repository below
				
					git clone https://github.com/brainypi/hw-accelerated-encode-decode.git
cd hw-accelerated-encode-decode/decode
				
			
2. Copy the decode.sh script
				
					sudo cp -arv decode.sh /opt/
				
			
3. Build C++ program
				
					g++ decode.cpp -o decode
				
			
4. To use just run the command
				
					./decode
				
			
5. Decoded successfully if no errors !!
Decoding using python
1. Download the repository below
				
					git clone https://github.com/brainypi/hw-accelerated-encode-decode.git
cd hw-accelerated-encode-decode/decode
				
			
2. Copy the decode.sh script
				
					sudo cp -arv decode.sh /opt/
				
			
3. To run, run the command
				
					python3 decode.py
				
			
4. Decoded successfully if no errors !!

Encoding Audio Video

In this example we will be converting MP4 file into H264/VP8 encoded MKV file.
Encoding using shell script
1. Download the repository below
				
					git clone https://github.com/brainypi/hw-accelerated-encode-decode.git
cd hw-accelerated-encode-decode/encode
				
			
2. To use just run the command, 
				
					./encode.sh -i ./samplevideo.mp4 -o test.mkv -v h264
				
			
 where
  • ./samplevideo.mp4 is your input file
  • ./test.mkv is the output file
  • h264 is the encoding format (supports h264 and vp8)
Encoding using cpp
1. Download the repository below
				
					python3 decode.py
				
			
2. Copy the encode.sh script
				
					sudo cp -arv encode.sh /opt/
				
			
3. Build C++ program
				
					g++ encode.cpp -o encode
				
			
4. To use just run the command
				
					./encode
				
			
5. Encoded successfully if no errors !!
Encoding using python
1. Download the repository below
				
					git clone https://github.com/brainypi/hw-accelerated-encode-decode.git
cd hw-accelerated-encode-decode/encode
				
			
2. Copy the encode.sh script
				
					sudo cp -arv encode.sh /opt/
				
			
3. To run, run the command
				
					python3 encode.py
				
			
NEED SUPPORT?
First, Ensure version of OS installed and the version this document is intended for match. If they match and yet problem persists. Please use this Forum link for community help.
If you are an enterprise customer please use the ticketing system login provided to you for priority support.

Previous

<< AI on Rbian

Next

Companion PC >>

Index