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

Unread post by arcf » Wed Nov 06, 2019 11:28 pm

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: 132
Joined: Thu Sep 19, 2013 3:50 am
languages_spoken: english, german
ODROIDs: xu, c1
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Use GPU to encode video on Odroid C2

Unread post by Nuems » Thu Nov 07, 2019 12:41 am

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

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

Re: Use GPU to encode video on Odroid C2

Unread post by rooted » Thu Nov 07, 2019 5:44 am

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

Unread post by arcf » Fri Nov 15, 2019 2:17 am

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.

User avatar
mad_ady
Posts: 6860
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 236 times
Been thanked: 177 times
Contact:

Re: Use GPU to encode video on Odroid C2

Unread post by mad_ady » Fri Nov 15, 2019 3:17 am

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: 6878
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 267 times
Been thanked: 58 times
Contact:

Re: Use GPU to encode video on Odroid C2

Unread post by rooted » Fri Nov 15, 2019 3:44 am

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