Use GPU to encode video on Odroid C2

Post Reply
arcf
Posts: 2
Joined: Wed Nov 06, 2019 9:50 pm
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Use GPU to encode video on Odroid C2

Post by arcf »

Hi,

I'm trying to encode video using FFmpeg on a Odroid C2 board running Ubuntu 18.04.3. The objective is to make a video streaming, so I want to encode with low latency.
I used the following command in command line:
ffmpeg.exe -i GOPR0381.MP4 -c:v libx265 -vf scale=480:-1 -crf 35 -r 20 -preset ultrafast GOPR0381x.MP4
I've encoded the video sucessfully, but it takes a bit of time.

I've noticed that during the encoding process only the CPU is used. So I would like to know if is possible, and how it is possible, to force Odroid C2 or FFmpeg using GPU for encoding, so that I can increase the performance and decrease the encoding time.
I've noticed too, that some aplication like Chromium browser use GPU automatically.

Nuems
Posts: 162
Joined: Thu Sep 19, 2013 3:50 am
languages_spoken: english, german
ODROIDs: xu, c1, n2
Has thanked: 1 time
Been thanked: 10 times
Contact:

Re: Use GPU to encode video on Odroid C2

Post by Nuems »

Well, there is hardware encoding but on ARM boards, that isn't GPU encoding.

User avatar
rooted
Posts: 7867
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 724 times
Been thanked: 221 times
Contact:

Re: Use GPU to encode video on Odroid C2

Post by rooted »

I believe they were talking about VPU encoding.

arcf
Posts: 2
Joined: Wed Nov 06, 2019 9:50 pm
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Use GPU to encode video on Odroid C2

Post by arcf »

What I pretend is to encode and decode video using H.265/HEVC.

I would like to know if exist any way to accelerate the video processing, using hardware encoding or VPU encoding.

And how can I check the usage of GPU or VPU on the Odroid C2 during the process of encoding.

I tried:

Code: Select all

cat /sys/class/mpgpu/utilization
It gave me a number (18, 19, 21, etc ) that vary if I use Chromium, or play Youtube videos, but still zero during the encode process (using ffmpeg) or playing video on Gnome player.

mad_ady
Posts: 8311
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 573 times
Been thanked: 431 times
Contact:

Re: Use GPU to encode video on Odroid C2

Post by mad_ady »

I don't think there is a h265 encoder on the C2, but the h264 encoder runs fine with c2enc as linked above.

You can check that it works by observing a high fps with the cpu not at 100%. Note that the encoder is optimized for encoding speed, not minimal output size.

User avatar
rooted
Posts: 7867
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 724 times
Been thanked: 221 times
Contact:

Re: Use GPU to encode video on Odroid C2

Post by rooted »

I believe the N2 has hardware HEVC encode but I'm not sure any software exists to take advantage of it.

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 2 guests