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:

Intel GPU load while transcoding

 

To monitor CPU load issue following command:

top

you should see CPU load:

cpu load on Joker

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):

power

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

GPU transcoding (QuickSync)

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) :

power domains Intel RAPL

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.

Print Friendly, PDF & Email

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *