[Howto] Odroid XU3/4 using the hardware encoder

Test and fix the Kernel 4.14 features

Moderators: mdrjr, odroid

Re: [Howto] Odroid XU3/4 using the hardware encoder

Unread postby rooted » Sat Jun 30, 2018 2:29 pm

memeka wrote:
odroid wrote:@memeka,
Great! Can you please share the patches?
We want to update the ffmpeg package in our PPA server.


https://github.com/mihailescu2m/FFmpeg branch v4l2m2m-3.4.2
just clone and dpkg-buildpackage
I get this.

Code: Select all
 
rooted@cloudshell:~/gits/FFmpeg$ dpkg-buildpackage                                                dpkg-buildpackage: info: source package ffmpeg                                                    dpkg-buildpackage: info: source version 7:3.4.2-9                                                 dpkg-buildpackage: info: source distribution unstable                                             dpkg-buildpackage: info: source changed by memeka <mihailescu2m@gmail.com>                        dpkg-buildpackage: info: host architecture armhf                                                   dpkg-source --before-build FFmpeg                                                                dpkg-source: warning: unknown information field 'Rules-Requires-Root' in input data in general section of control info file                                                                          fakeroot debian/rules clean                                                                      dh clean
   dh_testdir
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/home/rooted/gits/FFmpeg'
[ ! -d debian/standard ] || rm -r debian/standard; [ ! -d debian/extra ] || rm -r debian/extra; [ ! -d debian/static ] || rm -r debian/static;
make[1]: Leaving directory '/home/rooted/gits/FFmpeg'
   dh_autoreconf_clean
   dh_clean
 dpkg-source -b FFmpeg
dpkg-source: warning: unknown information field 'Rules-Requires-Root' in input data in general section of control info file
dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../ffmpeg_3.4.2.orig.tar.{bz2,gz,lzma,xz}
dpkg-buildpackage: error: dpkg-source -b FFmpeg gave error exit status 255
 
User avatar
rooted
 
Posts: 5474
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: [Howto] Odroid XU3/4 using the hardware encoder

Unread postby memeka » Sat Jun 30, 2018 2:33 pm

try:
DEB_BUILD_OPTIONS="nocheck" dpkg-buildpackage -us -uc -b -j4
be sure to grab a coffee before.
after it's done, do not install the -extra packages, they conflict with the "standard" ones
User avatar
memeka
 
Posts: 4025
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: [Howto] Odroid XU3/4 using the hardware encoder

Unread postby rooted » Sat Jun 30, 2018 2:42 pm

It's building now, thanks for the help.
User avatar
rooted
 
Posts: 5474
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: [Howto] Odroid XU3/4 using the hardware encoder

Unread postby odroid » Tue Jul 03, 2018 10:34 am

memeka wrote:
odroid wrote:@memeka,
Great! Can you please share the patches?
We want to update the ffmpeg package in our PPA server.


https://github.com/mihailescu2m/FFmpeg branch v4l2m2m-3.4.2
just clone and dpkg-buildpackage


Thank you.
We've released a new ffmpeg package today. :)
Code: Select all
odroid@odroid:~$ ffmpeg
ffmpeg version 3.4.2-2ubuntu4 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7 (Ubuntu/Linaro 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=2ubuntu4 --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl
--disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
--enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa
--enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2
--enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-v4l2_m2m --enable-libdc1394 --enable-libdrm --enable-libiec61883
--enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
User avatar
odroid
Site Admin
 
Posts: 28610
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: [Howto] Odroid XU3/4 using the hardware encoder

Unread postby martos » Fri Jul 06, 2018 5:58 pm

Could tou try again : ( it's on the begining of the post )
ffmpeg -i Sintel.2010.720p.mkv -acodec aac -vcodec h264 -b:v 2M -pix_fmt nv21 sintel-encoded.mp4 -loglevel trace

For me it's fail ...
[h264_v4l2m2m @ 0x571a00] probing device /dev/video21
[h264_v4l2m2m @ 0x571a00] driver 'exynos-gsc' on card 'exynos-gsc gscaler'
[h264_v4l2m2m @ 0x571a00] v4l2 output format not supported
[h264_v4l2m2m @ 0x571a00] probing device /dev/video20
[h264_v4l2m2m @ 0x571a00] driver 'exynos-gsc' on card 'exynos-gsc gscaler'
[h264_v4l2m2m @ 0x571a00] v4l2 output format not supported
[h264_v4l2m2m @ 0x571a00] probing device /dev/video11
[h264_v4l2m2m @ 0x571a00] probing device /dev/video10
[h264_v4l2m2m @ 0x571a00] probing device /dev/video33
[h264_v4l2m2m @ 0x571a00] driver 's5p-jpeg' on card 's5p-jpeg decoder'
[h264_v4l2m2m @ 0x571a00] v4l2 output format not supported
[h264_v4l2m2m @ 0x571a00] probing device /dev/video32
[h264_v4l2m2m @ 0x571a00] driver 's5p-jpeg' on card 's5p-jpeg encoder'
[h264_v4l2m2m @ 0x571a00] v4l2 output format not supported
[h264_v4l2m2m @ 0x571a00] probing device /dev/video31
[h264_v4l2m2m @ 0x571a00] driver 's5p-jpeg' on card 's5p-jpeg decoder'
[h264_v4l2m2m @ 0x571a00] v4l2 output format not supported
[h264_v4l2m2m @ 0x571a00] probing device /dev/video30
[h264_v4l2m2m @ 0x571a00] driver 's5p-jpeg' on card 's5p-jpeg encoder'
[h264_v4l2m2m @ 0x571a00] v4l2 output format not supported
[h264_v4l2m2m @ 0x571a00] Could not find a valid device
[h264_v4l2m2m @ 0x571a00] can't configure decoder
Stream mapping:
Stream #0:0 -> #0:0 (h264 (h264_v4l2m2m) -> h264 (libx264))
Stream #0:1 -> #0:1 (ac3 (native) -> aac (native))
Error while opening decoder for input stream #0:0 : Invalid argument
[AVIOContext @ 0x595370] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 0x549180] Statistics: 32768 bytes read, 0 seeks
martos
 
Posts: 83
Joined: Fri Jun 29, 2018 12:42 am
languages_spoken: english
ODROIDs: MC1

Re: [Howto] Odroid XU3/4 using the hardware encoder

Unread postby HeWhoWas » Sat Jul 14, 2018 2:36 pm

I'm seeing the same issue as Martos with ffmpeg installed from meveric repository.

On a side note - is there any way we could produce a static binary for ffmpeg? I've done a bit of digging around the debian/rules file and can see references to a static flavor, and static libraries are produced but no ffmpeg binary.

Cheers.
HeWhoWas
 
Posts: 5
Joined: Mon Mar 18, 2013 11:25 am
languages_spoken: english
ODROIDs: XU4

Re: [Howto] Odroid XU3/4 using the hardware encoder

Unread postby memeka » Sat Jul 14, 2018 3:06 pm

HeWhoWas wrote:I'm seeing the same issue as Martos with ffmpeg installed from meveric repository.

On a side note - is there any way we could produce a static binary for ffmpeg? I've done a bit of digging around the debian/rules file and can see references to a static flavor, and static libraries are produced but no ffmpeg binary.

Cheers.


viewtopic.php?f=146&t=24366&start=150#p227356
don't know what version @meveric has.
User avatar
memeka
 
Posts: 4025
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: [Howto] Odroid XU3/4 using the hardware encoder

Unread postby HeWhoWas » Sat Jul 14, 2018 3:41 pm

Memeka - I had originally tried that after installing the default ffmpeg from official repos, which led to the problems I experienced. Cleaning the installation of all libav* and ffmpeg* packages, then reinstalling the compiled debs worked fine, thanks!

I don't suppose you know if there is an relatively simple way to produce a static build?

Edit - Looks like I spoke too soon. It's still not using the HW acceleration - I'll grab a BBB video and see if i can get some useful log output.
HeWhoWas
 
Posts: 5
Joined: Mon Mar 18, 2013 11:25 am
languages_spoken: english
ODROIDs: XU4

Re: [Howto] Odroid XU3/4 using the hardware encoder

Unread postby memeka » Sat Jul 14, 2018 3:44 pm

download the sources from the repo above, compile it yourself with static flags...
User avatar
memeka
 
Posts: 4025
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: [Howto] Odroid XU3/4 using the hardware encoder

Unread postby HeWhoWas » Sat Jul 14, 2018 4:13 pm

I've uploaded the logs here: https://paste.ee/p/8KPab

Long story short, when I specify the -vcodec h264_v4l2m2m manually, it exhibits the same problem martos above reported. -vcodec h264 works, but uses the CPU for encoding.
HeWhoWas
 
Posts: 5
Joined: Mon Mar 18, 2013 11:25 am
languages_spoken: english
ODROIDs: XU4

Re: [Howto] Odroid XU3/4 using the hardware encoder

Unread postby HeWhoWas » Sat Jul 14, 2018 4:25 pm

Fixed the issue - the default debian installation doesn't include the
Code: Select all
firmware-samsung
package - identified by checking dmesg output.

Installing that has resolved the issues with HW encoding.
HeWhoWas
 
Posts: 5
Joined: Mon Mar 18, 2013 11:25 am
languages_spoken: english
ODROIDs: XU4

Previous

Return to Linux Kernel 4.14 Debugging Party

Who is online

Users browsing this forum: No registered users and 3 guests