Pinebook NetBSD arm64 -current multimedia benchmark

This is strictly NetBSD evbarm (arm64) Pinebook performance test that I wanted to share if anybody is interested.

Since most of the NetBSD binary packages are built via pkgsrc framework (which can be a lengthy process definitely not for the impatient) I stumbled across the following problems on the pkgsrc -current and pkgsrc-Q3-2018

  • /usr/pkgsrc/multimedia/mplayer – fails to compile/build due to some ASM related errors
  • /usr/pkgsrc/multimedia/totem – builds but after building a couple of gstreamer codec packages that are essential, it does not play any videos at all
  • /usr/pkgsrc/multimedia/xine – fails to compile/build
  • /usr/pkgsrc/multimedia/ffmpeg*  (compiles – see notes below)

Now I will briefly describe what I have done with ffmpeg (I believe it is a part of hundred other multimedia software projects etc.) so it would be most probably the best suited candidate to try.

Now if you notice that in the standard pkgsrc Makefiles for any of the versions of ffmpeg2 >  the ffplay configure option is set to disable

CONFIGURE_ARGS+= --disable-ffplay

Since pkgsrc/multimedia/ffmpeg2  ffmpeg3 and ffmpeg4  misbehave slightly during standard builds I have rather built the ffmpeg2 and ffmpeg4 natively (not via pkgsrc framework) and performed some tests (video conversion and video playback)

During the ffmpeg2 pkgsrc configure stage, the scripts barfed out that there is no openssl installed and bailed out. I have used a little “cheat” since I did not want to get into debugging the pkgsrc patchfiles and Makefiles and decided to just ./configure inside the /usr/pkgsrc/multimedia/work/ffmpeg2-xxxx/   and copied all the pkgsrc SDL includes to local /usr/include

 32 -r--r--r--   1 root  wheel   12783 Nov 12 14:19 bozohttpd.h
 16 drwxr-xr-x   2 root  wheel     512 Nov 12 14:19 security
 16 drwxr-xr-x   2 root  wheel     512 Nov 12 14:19 rump
 16 drwxr-xr-x   2 root  wheel    2048 Nov 12 14:58 openssl
 16 drwxr-xr-x  16 root  wheel     512 Nov 28 09:57 ..
 16 -rw-r--r--   1 root  wheel    3233 Dec  8 11:33 SDL.h
 16 -rw-r--r--   1 root  wheel    1933 Dec  8 11:33 SDL_active.h
 32 -rw-r--r--   1 root  wheel   11215 Dec  8 11:33 SDL_audio.h
 16 -rw-r--r--   1 root  wheel     986 Dec  8 11:33 SDL_byteorder.h
 16 -rw-r--r--   1 root  wheel    6048 Dec  8 11:33 SDL_cdrom.h
 32 -rw-r--r--   1 root  wheel    9123 Dec  8 11:33 SDL_config.h
 16 -rw-r--r--   1 root  wheel    2221 Dec  8 11:33 SDL_cpuinfo.h
 16 -rw-r--r--   1 root  wheel    6055 Dec  8 11:33 SDL_endian.h
 16 -rw-r--r--   1 root  wheel    1874 Dec  8 11:33 SDL_error.h
 32 -rw-r--r--   1 root  wheel   13041 Dec  8 11:33 SDL_events.h
 16 -rw-r--r--   1 root  wheel    2607 Dec  8 11:33 SDL_framerate.h
 16 -rw-r--r--   1 root  wheel     979 Dec  8 11:33 SDL_getenv.h
 16 -rw-r--r--   1 root  wheel    4510 Dec  8 11:33 SDL_gfxBlitFunc.h
 32 -rw-r--r--   1 root  wheel   10961 Dec  8 11:33 SDL_gfxPrimitives.h
112 -rw-r--r--   1 root  wheel   55909 Dec  8 11:33 SDL_gfxPrimitives_font.h
 16 -rw-r--r--   1 root  wheel    5513 Dec  8 11:33 SDL_image.h
 32 -rw-r--r--   1 root  wheel   10318 Dec  8 11:33 SDL_imageFilter.h
 16 -rw-r--r--   1 root  wheel    5532 Dec  8 11:33 SDL_joystick.h
 16 -rw-r--r--   1 root  wheel    4098 Dec  8 11:33 SDL_keyboard.h
 16 -rw-r--r--   1 root  wheel    7492 Dec  8 11:33 SDL_keysym.h
 16 -rw-r--r--   1 root  wheel    2739 Dec  8 11:33 SDL_loadso.h
 16 -rw-r--r--   1 root  wheel    2866 Dec  8 11:33 SDL_main.h
 64 -rw-r--r--   1 root  wheel   27739 Dec  8 11:33 SDL_mixer.h
 16 -rw-r--r--   1 root  wheel    4754 Dec  8 11:33 SDL_mouse.h
 16 -rw-r--r--   1 root  wheel    5860 Dec  8 11:33 SDL_mutex.h
 16 -rw-r--r--   1 root  wheel     183 Dec  8 11:33 SDL_name.h
 48 -rw-r--r--   1 root  wheel   18319 Dec  8 11:33 SDL_net.h
672 -rw-r--r--   1 root  wheel  336544 Dec  8 11:33 SDL_opengl.h
 16 -rw-r--r--   1 root  wheel    2708 Dec  8 11:33 SDL_platform.h
 16 -rw-r--r--   1 root  wheel    2009 Dec  8 11:33 SDL_quit.h
 16 -rw-r--r--   1 root  wheel    2960 Dec  8 11:33 SDL_rotozoom.h
 16 -rw-r--r--   1 root  wheel    4958 Dec  8 11:33 SDL_rwops.h
 64 -rw-r--r--   1 root  wheel   25770 Dec  8 11:33 SDL_sound.h
 48 -rw-r--r--   1 root  wheel   16473 Dec  8 11:33 SDL_stdinc.h
 16 -rw-r--r--   1 root  wheel    6319 Dec  8 11:33 SDL_syswm.h
 16 -rw-r--r--   1 root  wheel    4242 Dec  8 11:33 SDL_thread.h
 16 -rw-r--r--   1 root  wheel    4527 Dec  8 11:33 SDL_timer.h
 32 -rw-r--r--   1 root  wheel   10711 Dec  8 11:33 SDL_ttf.h
 16 -rw-r--r--   1 root  wheel     979 Dec  8 11:33 SDL_types.h
 16 -rw-r--r--   1 root  wheel    2637 Dec  8 11:33 SDL_version.h
 80 -rw-r--r--   1 root  wheel   38018 Dec  8 11:33 SDL_video.h
 16 -rw-r--r--   1 root  wheel    5230 Dec  8 11:34 begin_code.h
 16 drwxr-xr-x  58 root  wheel    6144 Dec  8 11:34 .
 16 -rw-r--r--   1 root  wheel    1482 Dec  8 11:34 close_code.h

Next I have placed the .configure_done file inside the /usr/pkgsrc/multimedia/ffmpeg2/work  and after gmake finished I had to add .build_done to work as well as to  tweak the PLIST with the new set of files so it would properly build a pkgsrc binary package

So now I have a fully working ffmpeg2 with ffplay (although the files are quite heavy

 25088 -rwxr-xr-x   1 root  wheel   12721520 Dec  8 23:50 ffmpeg
 24832 -rwxr-xr-x   1 root  wheel   12634352 Dec  8 23:50 ffplay
 24960 -rwxr-xr-x   1 root  wheel   12658928 Dec  8 23:52 ffprobe
 23040 -rwxr-xr-x   1 root  wheel   11681168 Dec  8 23:52 ffserver

So lets do some bench-marking now. For this I have chosen the following youtube video from Samsung https://www.youtube.com/watch?v=8leorFMy0rg

Fetching the above on the Pinebook via youtube-dl produced an MKV file “Samsung Plasma TV Demo Full HD 1080p-8leorFMy0rg.mkv” Matroska data

Playing MKV via ffplay was exxtremely slow I decided to test and convert the file to MP4 via ffmpeg since we already have it built.  Please note that I have used an external USB stick to keep the data since it is much faster than the MicroSD card I run NetBSD off from :)

$ /usr/bin/time -l ffmpeg -i Samsung\ Plasma\ TV\ Demo\ Full\ HD\ 1080p-8leorFMy0rg.mkv -strict -2 -qscale 0 samsung.mp4
built with gcc 6.5.0 (nb4 20181109)
configuration: --prefix=/usr/pkg --mandir=/usr/pkg/man --docdir=/usr/pkg/doc --sysinclude=/usr/pkg/include
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
Input #0, matroska,webm, from 'Samsung Plasma TV Demo Full HD 1080p-8leorFMy0rg.mkv':
Metadata:
COMPATIBLE_BRANDS: iso6avc1mp41
MAJOR_BRAND : dash
MINOR_VERSION : 0
ENCODER : Lavf56.40.101
Duration: 00:01:47.18, start: 0.007000, bitrate: 1515 kb/s
Stream #0:0(und): Video: h264 (High), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)
Metadata:
CREATION_TIME : 2018-11-13 09:39:56
LANGUAGE : und
HANDLER_NAME : VideoHandler
DURATION : 00:01:47.140000000
Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
Metadata:
LANGUAGE : eng
DURATION : 00:01:47.181000000
Please use -q:a or -q:v, -qscale is ambiguous
Output #0, mp4, to 'samsung.mp4':
Metadata:
COMPATIBLE_BRANDS: iso6avc1mp41
MAJOR_BRAND : dash
MINOR_VERSION : 0
encoder : Lavf56.40.101
Stream #0:0(und): Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 29.97 fps, 30k tbn, 29.97 tbc (default)
Metadata:
CREATION_TIME : 2018-11-13 09:39:56
LANGUAGE : und
HANDLER_NAME : VideoHandler
DURATION : 00:01:47.140000000
encoder : Lavc56.60.100 mpeg4
Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
LANGUAGE : eng
DURATION : 00:01:47.181000000
encoder : Lavc56.60.100 aac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
Stream #0:1 -> #0:1 (opus (native) -> aac (native))

347.74 real 1024.24 user 6.37 sys
125384 maximum resident set size
0 average shared memory size
0 average unshared data size
0 average unshared stack size
30829 page reclaims
0 page faults
0 swaps
0 block input operations
212 block output operations
0 messages sent
0 messages received
0 signals received
41228 voluntary context switches
15818 involuntary context switches

ffmpeg version 2.8.14 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.5.0 (nb4 20181109)

So the above translates to 00:05:47 of clean conversion time using ffmpeg2.

When executed via ffmpeg4

ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.5.0 (nb4 20181109)

 329.67 real 1016.10 user 5.38 sys

Which is roughly the same (slightly faster than with ffmpeg2)

I have done exactly the same on my Panasonic Toughbook CF-53 which has
On the Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz (4 cores)

$ time ffmpeg -i Samsung\ Plasma\ TV\ Demo\ Full\ HD\ 1080p-8leorFMy0rg.mkv -strict -2 -qscale 0 samsung.mp4
built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: 
  libavutil      56. 18.102 / 56. 18.102
  libavcodec     58. 21.104 / 58. 21.104
  libavformat    58. 17.101 / 58. 17.101
  libavdevice    58.  4.101 / 58.  4.101
  libavfilter     7. 25.100 /  7. 25.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
Input #0, matroska,webm, from 'Samsung Plasma TV Demo Full HD 1080p-8leorFMy0rg.mkv':
  Metadata:
    COMPATIBLE_BRANDS: iso6avc1mp41
    MAJOR_BRAND     : dash
    MINOR_VERSION   : 0
    ENCODER         : Lavf56.40.101
  Duration: 00:01:47.18, start: -0.007000, bitrate: 1515 kb/s
    Stream #0:0(und): Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)
    Metadata:
      CREATION_TIME   : 2018-11-13 09:39:56
      LANGUAGE        : und
      HANDLER_NAME    : VideoHandler
      DURATION        : 00:01:47.140000000
    Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      LANGUAGE        : eng
      DURATION        : 00:01:47.181000000
Please use -q:a or -q:v, -qscale is ambiguous
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
  Stream #0:1 -> #0:1 (opus (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mp4, to 'samsung.mp4':
  Metadata:
    COMPATIBLE_BRANDS: iso6avc1mp41
    MAJOR_BRAND     : dash
    MINOR_VERSION   : 0
    encoder         : Lavf58.17.101
    Stream #0:0(und): Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 29.97 fps, 30k tbn, 29.97 tbc (default)
    Metadata:
      CREATION_TIME   : 2018-11-13 09:39:56
      LANGUAGE        : und
      HANDLER_NAME    : VideoHandler
      DURATION        : 00:01:47.140000000
      encoder         : Lavc58.21.104 mpeg4
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      LANGUAGE        : eng
      DURATION        : 00:01:47.181000000
      encoder         : Lavc58.21.104 aac

real	0m30,361s
user	1m29,559s
sys	0m0,825s

Which equals 30 seconds, using ffmpeg v. N-91455 on Intel x86_64

Finally I wanted to play the resulting video on the Pinebook via ffplay (ffmpeg2)  and here is the result

Not sharing the playback via ffplay (ffmpeg4) because its too choppy and slow.

Advertisements

About astr0baby

Please run Adblock or similar... we have been told to do so since Carl Sagan wrote the Contact .
Gallery | This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.