Jump to content

Recommended Posts

Posted

I buy a V88 mini 3 (2G ram / 8G EMMC) for make the test of MPP api and use it in ffmpeg. ( because i must wait for the version with amlogic )


1 Install Armbian

2 Checkp MPP

3 Compile last ffmpeg

4 Test

 

So let's go ...

Posted

For install

 

with etcher write sd card with xenial-minimal-rock64-0.5.15-136-arm64.img.xz (not other )

with etcher write usb stick bionic-minimal-rock64-0.7.9-1067-arm64.img.xz (or better )

 

boot on sd witout usb stick

delete partition 6 and 7 , reboot with usb stick, activate eth1 ( all explain in the post off segv )

 

i continue ...

 

Posted

first step

 

cd ~/
mkdir -p ~/ffmpeg_sources ~/bin

sudo apt-get update -qq && sudo apt-get -y install \
  autoconf \
  automake \
  build-essential \
  cmake \
  git-core \
  libass-dev \
  libfreetype6-dev \
  libsdl2-dev \
  libtool \
  libva-dev \
  libvdpau-dev \
  libvorbis-dev \
  libxcb1-dev \
  libxcb-shm0-dev \
  libxcb-xfixes0-dev \
  pkg-config \
  texinfo \
  wget \
  zlib1g-dev \
  yasm \
  libx264-dev \
  libx265-dev \
  libnuma-dev \
  libvpx-dev \
  libfdk-aac-dev \
  libmp3lame-dev \
  libopus-dev \
  mc \
  locate

 

cd ~/ffmpeg_sources && \
wget https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.bz2 && \
tar xjvf nasm-2.13.03.tar.bz2 && \
cd nasm-2.13.03 && \
./autogen.sh && \
PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
make -j4 && \
make install

 

the famous HW video decoder
apt install librockchip-mpp-dev

 

aom
cd ~/ffmpeg_sources && \
git -C aom pull 2> /dev/null || git clone --depth 1 https://aomedia.googlesource.com/aom && \
mkdir aom_build && \
cd aom_build && \
PATH="$HOME/bin:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED=off -DENABLE_NASM=on ../aom && \
PATH="$HOME/bin:$PATH" make -j4 && \
make install

Posted

final :

cd ~/ffmpeg_sources && \
wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
tar xjvf ffmpeg-snapshot.tar.bz2 && \
cd ffmpeg && \
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
  --prefix="$HOME/ffmpeg_build" \
  --pkg-config-flags="--static" \
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
  --extra-libs="-lpthread -lm" \
  --bindir="$HOME/bin" \
  --enable-hardcoded-tables \
  --enable-gpl \
  --enable-libaom \
  --enable-libass \
  --enable-libfdk-aac \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libopus \
  --enable-libvorbis \
  --enable-libvpx \
  --enable-libx264 \
  --enable-rkmpp \
  --enable-version3 \
  --enable-libdrm \

  --enable-libx265 \
  --enable-nonfree && \
PATH="$HOME/bin:$PATH" make -j4 && \
make install && \
hash -r

 

now waiting ... it could be long ...

 

 

Posted

so test :

 

Software transcoding

/home/rock64/bin/ffmpeg -vcodec h264 -i http://192.168.1.50:8001/+1:0:19:401:4:20FA:EEEE0000:0:0:0 -s 320x240 /tmp/test.avi

resut =

frame=  507 fps= 16 q=8.6 Lsize=    1058kB time=00:00:22.40 bitrate= 386.8kbits/s dup=0 drop=6 speed=0.703x

 

Hardware Transcoding (only decode )

/home/rock64/bin/ffmpeg -vcodec h264_rkmpp -i http://192.168.1.50:8001/+1:0:19:401:4:20FA:EEEE0000:0:0:0 -s 320x240 /tmp/test.avi

error =

0
Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented

 

tested with some otehr file with ame result

OK, i must find ...

 

Posted

I think we loose something , a reference somewhere ( avlibxxx ) .

I see some guy with same trouble witout reply .

In my opinion i could retry but with compiling librockchip-mpp-dev

and, of course, no doc on this ...

So i ask to the dev ...

Posted

wotks with :

 

ffmpeg -hwaccel drm -hwaccel_device /dev/dri/card0 -c:v h264_rkmpp -i Sintel_Trailer.720p.DivX_Plus_HD.mkv  -f null - -benchmark

result =

frame=  431 fps=174 q=-0.0 Lsize=N/A time=00:00:18.21 bitrate=N/A speed=7.35x

!!! speed=7.35x !!!

Posted

Source file ::
https://download.blender.org/durian/movies/Sintel.2010.720p.mkv
works with ::
ffmpeg -hwaccel drm -hwaccel_device /dev/dri/card0 -c:v h264_rkmpp -i Sintel_Trailer.720p.DivX_Plus_HD.mkv -f null - -benchmark
don't work with ::
ffmpeg -hwaccel drm -hwaccel_device /dev/dri/card0 -c:v h264_rkmpp -i Sintel_Trailer.720p.DivX_Plus_HD.mkv /tmp/test.mkv
error:

[h264_rkmpp @ 0x55b3d47560] Decoder noticed an info change (1280x544), format=0
[h264_rkmpp @ 0x55b3d47560] Received a frame.
[graph 0 input from stream 0:0 @ 0x55b3dd7190] Setting 'video_size' to value '1280x544'
[graph 0 input from stream 0:0 @ 0x55b3dd7190] Setting 'pix_fmt' to value '181'
[graph 0 input from stream 0:0 @ 0x55b3dd7190] Setting 'time_base' to value '1/1000'
[graph 0 input from stream 0:0 @ 0x55b3dd7190] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0x55b3dd7190] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x55b3dd7190] Setting 'frame_rate' to value '24/1'
[graph 0 input from stream 0:0 @ 0x55b3dd7190] w:1280 h:544 pixfmt:drm_prime tb:1/1000 fr:24/1 sar:1/1 sws_param:flags=2
[format @ 0x55b3ea6c00] Setting 'pix_fmts' to value 'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21'
[auto_scaler_0 @ 0x55b3de8940] Setting 'flags' to value 'bicubic'
[auto_scaler_0 @ 0x55b3de8940] w:iw h:ih flags:'bicubic' interl:0
[format @ 0x55b3ea6c00] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format'
Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0
[AVIOContext @ 0x55b3d3ba40] Statistics: 0 seeks, 0 writeouts
[libvorbis @ 0x55b3ea7f00] 39 frames left in the queue on closing
[AVIOContext @ 0x55b3d08120] Statistics: 66889 bytes read, 4 seeks

Posted

works with copy :

ffmpeg -hwaccel drm -hwaccel_device /dev/dri/card0 -c:v h264_rkmpp -i http://192.168.1.50:8001/+1:0:19:401:4:20FA:EEEE0000:0:0:0 -vcodec copy /tmp/test.mp4

so for kodi it's works but can't transcode ...

 

If someone have an idea ...

Posted

I make a new install with new usb stick ( Transcend JetFlash 700 16GB ),

Make all again, it's take less time !

so you need good usb stick.

 

another news : ayufan have compiled a ffmpeg 3.4 with rkmpp ... so if you don't make compile you can just make

apt install ffmpeg

and you have a ffmpeg with Hardware Decode ...

 

and gstreamer

gstreamer1.0-rockchip1/bionic 1.10-5ayufan12 arm64
gstreamer1.0-rockchip1-extra/bionic 1.10-1 arm64

 

and  kodi

kodi/bionic 2:17.6+dfsg1-1ubuntu1 arm64
kodi-addons-dev/bionic 2:17.6+dfsg1-1ubuntu1 arm64
kodi-bin/bionic 2:17.6+dfsg1-1ubuntu1 arm64
kodi-data/bionic 2:17.6+dfsg1-1ubuntu1 all
kodi-eventclients-common/bionic 2:17.6+dfsg1-1ubuntu1 all
kodi-eventclients-dev/bionic 2:17.6+dfsg1-1ubuntu1 all
kodi-eventclients-kodi-send/bionic 2:17.6+dfsg1-1ubuntu1 all
kodi-eventclients-ps3/bionic 2:17.6+dfsg1-1ubuntu1 all
kodi-eventclients-wiiremote/bionic 2:17.6+dfsg1-1ubuntu1 arm64
kodi-pvr-argustv/bionic 2.5.0+git20160923-3 arm64
kodi-pvr-dvbviewer/bionic 2.4.6+dfsg1-1 arm64
kodi-pvr-hdhomerun/bionic 2.4.2+git20160820-2build1 arm64
kodi-pvr-hts/bionic 3.4.13-1 arm64
kodi-pvr-iptvsimple/bionic 2.4.4+git20161211-1 arm64
kodi-pvr-mediaportal-tvserver/bionic 2.4.14+dfsg1-1build2 arm64
kodi-pvr-mythtv/bionic 4.12.12+dfsg1-1 arm64
kodi-pvr-nextpvr/bionic 2.4.7+git20161017-2 arm64
kodi-pvr-njoy/bionic 2.4.0+git20160518-2 arm64
kodi-pvr-vdr-vnsi/bionic 2.6.12-1 arm64
kodi-pvr-vuplus/bionic 2.4.12+dfsg1-1 arm64
kodi-pvr-wmc/bionic 1.4.4+git20160820-2 arm64
kodi-repository-kodi/bionic 2:17.6+dfsg1-1ubuntu1 all
kodi-visualization-spectrum/bionic 1.1.1-1ubuntu2 arm64
libkodiplatform-dev/bionic 17.1.0-1 arm64
libkodiplatform16/bionic 17.1.0-1 arm64

 

 

Posted

If you just want to transcode anything, I recommend using Gstreamer instead, until the FFmpeg team adds encoding support for RKMPP (if that ever happens). Decoding works perfectly with Kodi and MPV, so far.

 

You can also give a try to their incomplete VAAPI driver; it worked partially in the past, not sure whether it will work with recent kernels: http://rockchip.wikidot.com/rockchip-va-driver

Posted
1 hour ago, Staars said:

 NVENC = NVidia Encoder -> So the answer is No.

But Nvidia says that it support linux.

I got it.

 

But next, will its performance be better than NVENC?

Posted

gstreamer is more powerfull to transcode BUT i can't use it in my project. ( gui for transcode flux mpeg from enigma2 receiver or tvheahend with low bandwith to external device : my cell phone)

And put an nvidia in a TV boxe is very hard. :D

I try it with pc with nvidia and it's works perfectly in h264 and h265 , but the cost is not the same ...

For the moement the best soc is Odroid MC1 solo and after s912 , this soc can make the transcode in software and it's works.

 

My opinion is , for the moment, no HW codec ( no allwinner , no amlogic, no rockchip,  no Exynos)   can't works with transcode with ffmpeg , so i wait for it .

 

Posted
On 8/30/2018 at 10:18 AM, martos said:

no Exynos

Exynos works. It's the only one I made work so far. This media script will install ffmpeg with HW encoding support on a Xenial image, and I'm working on a Stretch version.

Posted

It don't work well :

it use v4l2m m2m , it's not a complet use of vdu but and it's the same with the new hack of HW amlogic , less cpu but slow to transcode

For an only -vcodec copy it's works (kodi , ffplay ... ) BUT to transcode it's more quick in software

Posted
On 6/24/2019 at 12:55 PM, martos said:

Ah !

The rockchip mpp ( https://github.com/rockchip-linux/mpp )

and ffmpeg ( hardware data path for libswscale )

have make so change to encode in hardware , so i need to make some new test  ...

Come back wit result soon ...


Did you manage to figure out how to properly utilize hardware acceleration using ffmpeg + RockChip MPP? I'm working on a similar project that would benefit greatly from this and an update on your work would be very appreciated.

  • Werner locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines