Changes

Jump to: navigation, search

XUELK-AN-006: Video playing on i.MX6UL-based platforms

4,991 bytes added, 08:40, 24 May 2017
no edit summary
This application note describes some tests that were performed on an AXELULite-based platform to evaluate the capabilities and the performances of the i.MXUL when it comes to playing such videos. The test bed was based on Debian Jessie distribution, as described [[XUELK-AN-002:_Running_Debian_distribution|here]].
 
==gstreamer==
Starting from original Debian root file system provided [https://mirror.dave.eu/lynx/debian/20170403/20170403-sbclynx-debian-8-usd.zip here], more packages need to be added for using the well known multimedia framework [https://gstreamer.freedesktop.org gstreamer]
 
More info about gstreamer can be found on [https://gstreamer.freedesktop.org here] and on Github [https://github.com/GStreamer gstreamer] server
 
 
We assume that network interface has been already configured as described on [[XUELK-AN-002:_Running_Debian_distribution|XUELK-AN-002: Running Debian distribution]].
==Adding gstreamer packages==
Starting from original Debian root file system provided [https://mirror.dave.eu/lynx/debian/20170403/20170403-sbclynx-debian-8-usd.zip here], more packages need to be added for using the well known tool for video and audio manipulation i.e. [https://gstreamer.freedesktop.org gstreamer]
More info about It is possibile to install the complete '''gstreamer can be found on [https://gstreamer.freedesktop.org/ here] and on Github [https://github1.com/GStreamer 0''' suite (easy way to have the richest rfs configuration for gstreamer server]usage)
<pre class="board-terminal">
root@arm:~# apt-get install gstreamer1.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
...
The following NEW packages will be installed:
...
gstreamer1.0-clutter gstreamer1.0-doc gstreamer1.0-fluendo-mp3
gstreamer1.0-gnonlin gstreamer1.0-gnonlin-dbg gstreamer1.0-gnonlin-doc
gstreamer1.0-libav gstreamer1.0-libav-dbg gstreamer1.0-nice
gstreamer1.0-packagekit gstreamer1.0-plugins-bad
gstreamer1.0-plugins-bad-dbg gstreamer1.0-plugins-bad-doc
gstreamer1.0-plugins-base gstreamer1.0-plugins-base-apps
gstreamer1.0-plugins-base-dbg gstreamer1.0-plugins-base-doc
gstreamer1.0-plugins-good gstreamer1.0-plugins-good-dbg
gstreamer1.0-plugins-good-doc gstreamer1.0-plugins-ugly
gstreamer1.0-plugins-ugly-dbg gstreamer1.0-plugins-ugly-doc
...
usb-modeswitch usb-modeswitch-data usbmuxd va-driver-all x11-common
x11-utils xkb-data
0 upgraded, 517 newly installed, 0 to remove and 32 not upgraded.
Need to get 252 MB of archives.
After this operation, 713 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
</pre>
We may assume that network interface has been already configured as described it's shown on [XUELKinstallation log, apt-get asks for installing 713MB of additional packages. In case you are looking for a reduced space installation, you may need to select the minimum required packages required for video decoding. Tipically, it is enough to install: <pre>gstreamer1.0-toolsgstreamer1.0-plugins-basegstreamer1.0-plugins-goodgstreamer1.0-ANplugins-002:_Running_Debian_distribution#Adding_packages here] badgstreamer1.0-plugins-uglygstreamer1.0-videosink</pre> but required packages are strictly related to the gstreamer pipeline invoked and what kind of video/audio stream want to be decoded. ==gstreamer pipeline== The pipeline used is the easiest one for decoding a local file on '''XUELKrfs  gst-launch-AN1.0 -002vvv playbin uri=file:_Running_Debian_distribution///root/''<local_filename>'.' video-sink=fbdevsink
==Test bed==
TBD indicare caratteristiche del test bed (frequenza, RAM, risoluzione pannello ecc.).* iMX6UL cpu has 3 scaling frequencies availables requested by cpu load<pre class="board-terminal">root@arm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governorinteractiveroot@arm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies 198000 396000 528000</pre>* iMX6UL cpu is running at 528MHz when decoding<pre class="board-terminal">root@arm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq528000</pre>* system DRAM is 256MB* lcd panel is 800x480
==Results==
===Use case #1: MPEG4 400x200640x360@25fps24fps===TBD* file: BigBuckBunny_640x360.mp4===Use case #* video: MPEG-4 video 4:2: MPEG2 500x2500 @30fps640x360 resolution* pipeline: <pre class="board-terminal">gst-launch-1.0 -vvv playbin uri=file:///root/video/BigBuckBunny_640x320.mp4 video-sink=fbdevsink</pre>* top process shows that cpu is running at 99% <pre class="board-terminal">top - 08:24:14 up 1:28, 2 users, load average: 0.19, 0.18, 0.38Tasks: 60 total, 1 running, 59 sleeping, 0 stopped, 0 zombie%Cpu(s): 98.4 us, 1.3 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.3 si, 0.0 stKiB Mem: 247172 total, 244012 used, 3160 free, 30660 buffersKiB Swap: 0 total, 0 used, 0 free. 123020 cached Mem  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND11998 root 20 0 121480 18880 6180 S 99.4 7.6 0:09.77 gst-launch-1.011997 root 20 0 2980 1068 756 R 0.7 0.4 0:00.20 top 1 root 20 0 25840 2972 1880 S 0.0 1.2 0:14.17 systemd 2 root 20 0 0 0 0 S 0.0 0.0 0:00.01 kthreadd...</pre> TBDThis is the reasonable ''maximum video resolution'' that can be decoded fully in software (due to iMX6UL absence of 3D accelerator)
===Use case #2: MPEG2 320x180@24fps===
This use case is similar to the previous one, but the same video file has been scaled to 1/4 the original dimension (0.5 horizontal and 0.5 vertical)
 
* file: BigBuckBunny_320x180.mp4
* video: MPEG-4 video 4:2:0 @ 320x180 resolution
<pre class="board-terminal">
gst-launch-1.0 -vvv playbin uri=file:///root/video/BigBuckBunny_320x180.mp4 video-sink=fbdevsink
</pre>
* top process shows that cpu is running at 42%
 
<pre class="board-terminal">
top - 08:26:59 up 1:31, 2 users, load average: 1.21, 0.68, 0.54
Tasks: 60 total, 1 running, 59 sleeping, 0 stopped, 0 zombie
%Cpu(s): 41.1 us, 1.7 sy, 0.0 ni, 57.2 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 247172 total, 243736 used, 3436 free, 30796 buffers
KiB Swap: 0 total, 0 used, 0 free. 125184 cached Mem
 
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12004 root 20 0 121068 17116 6372 S 42.4 6.9 0:10.00 gst-launch-1.0
11997 root 20 0 2980 1068 756 R 0.7 0.4 0:01.29 top
30 root rt 0 0 0 0 S 0.3 0.0 0:03.86 cfinteractive
11610 root 20 0 0 0 0 S 0.3 0.0 0:02.05 kworker/0:0
...
</pre>
 
This can be a more ''real use case'' where the cpu used for video decoding is partially devoted to video and can be perform usual tasks (graphics, user interaction, peripherals controls, etc.) without major impacts.
8,178
edits

Navigation menu