Categories: Uncategorized

Video decode and encode on Joker using Intel GPU

Hello All,

Today I want to show you how Joker can be used for video decode and encode (transcoding) using Intel GPU (QuickSync technology). For better performance we will use Intel GPU (graphics processing units). In this case CPU is not loaded with video processing tasks. This tutorial should work on any Linux distribution (CoreOS, Debian, RedHat, etc).

Let’s do some console work. Issue following command to pull and run docker container with required software:

docker run --privileged --name gstreamer -v /dev:/dev -it aospan/docker-gstreamer-vaapi /bin/bash

grab some coffee and wait. After all you will see following prompt:

root@dbbc5ddfc092:/#

now you can issue command for transcode sample video file:

/opt/transode-file.sh

this command takes sample file from  /opt/moscow24.ts and change video codec from MPEG2 (resolution:720×576) to H264 (resolution:720×576) and change audio from MP2 to AAC. It should take about 25-30 seconds to transcode 100 seconds file.

Now you can change /opt/transode-file.sh script and do your own experiments with video transcoding on GPU.

CPU and GPU load monitoring

Open new terminal connection to Joker and issue following command:

docker exec -it gstreamer bash

if you see something like this root@70776fa24c04:/# then you successfully connected to docker container and can run command inside this container.

To monitor GPU load issue following command:

intel_gpu_top

you should see GPU load:

To monitor CPU load issue following command:

top

you should see CPU load:

Power usage

To check current power states of different parts of Intel CPU issue following command:

cat /sys/kernel/debug/punit_atom/dev_power_state

when transcoding started the unit ‘GFX RENDER’ change state from D0i3 (some kind of idle) to D0 (active):

and power usage (in Watts) will increase. Here is a measurements by joker-power utility while transcoding:

when transcoding started power usage increase from about 1Watt to about 5Watt. ‘SOC’ is all CPU usage, including GPU, but core is only CPU cores. Here is a picture (source) describing power domains in Intel RAPL (Running Average Power Limit) :

Note: DRAM power monitoring not available in Joker. Only server Intel CPU’s has this feature.

For more info about Intel RAPL please check original Intel’s article here.

Used software

Here is a list of projects inside docker container:

  • gstreamer gst-plugins-base
  • gst-plugins-good
  • gst-plugins-bad
  • gst-plugins-ugly
  • gst-libav
  • drm
  • libva
  • intel-driver
  • gstreamer-vaapi

Projects compiled from git repositories using ‘master’ branch (should be latest and full of new features/bugs). If you want to build stable release please change opt/build-gstreamer-vaapi.sh file and issue rebuild.

Abylay Ospan

Share
Published by
Abylay Ospan

Recent Posts

  • EV
  • Solar

Floridian Unlimited – rollable solar panel for Electric Vehicles (EV)

I use "Floridian Unlimited" prototype in this video. 400W and 1000W models are planned. For instance, 1000W model can gives…

5 years ago
  • EV
  • Solar

Open Electric Car project

Open eCar Open Source Software for Electric Vehicle (EV) Open eCar project is open source software for electric car. The…

6 years ago
  • Uncategorized

Joker TV hardware functional testing with OpenHTF

Joker TV hardware functional testing with OpenHTF Functional Testing of PCBs is always used as a final manufacturing step. Functional…

6 years ago
  • Uncategorized

DTMB TS dumps (China)

Following TS dumps created on January 2018 in Changsha, Hunan Province, China. DTMB dump (722MHz) sands-722mhz.ts (50MB) This stream plays without problems…

6 years ago
  • Uncategorized

DVB-S/S2 blind scan with Joker TV

Hello everybody! This post describes satellite transponders (DVB-S/S2) blind scan with Joker TV’s universal USB DTV receiver.  Firstly, I will…

6 years ago
  • homepage
  • Uncategorized

High bandwidth USB Isochronous transfers

Hello everybody, this post describes data transfer over USB from Joker TV to a host using high bandwidth USB isochronous transfers…

6 years ago