Does anyone have VPU working with RK3399 ?


jerryn
 Share

3 3

Recommended Posts

Armbian is a community driven open source project. Do you like to contribute your code?

Thanks for the info @lex.  I have mmp working with gstreamer. The ioctl segfault issue was the arhitecture flags for the compile we're set to unknown. I set it manually to armv7.  I am not sure if that's optimal for the NanoPC-T4.

It works, but audio is slightly out of sync.

 

I broke Bluetooth support. It was working fine with the rfkill  , hciattach userspace hack.  I updated before the mmp build.  

Link to post
Share on other sites

Cool. FWIW, I'm working on a media script for RK3399, equivalent to the one I did for RK3288.

 

So far, I've gotten full OpenGLES, OpenCL, VPU accel including HEVC-10bit with Gstreamer and MPV, and Chromium acceleration. Kodi is giving trouble when run on 64-bit, for some reason I can only get the 32-bit version to work.

 

I'll publish the script when it's ready, God willing.

Link to post
Share on other sites

38 minutes ago, JMCC said:

So you mean that kdenlive can use rkmpp acceleration for decoding? 

Kdenlive uses ffplay to play the video in kdenlive. So I guess/hope this will work then? If it doesn`t, it would still be a great advantage being able to preview the video`s before using them.
Then you can select the files you need and make proxy clips of them. Better than needing to do this of all the files you`ve filmed. 

Link to post
Share on other sites

6 minutes ago, NicoD said:

Kdenlive uses ffplay to play the video in kdenlive. So I guess/hope this will work then? If it doesn`t, it would still be a great advantage being able to preview the video`s before using them.
Then you can select the files you need and make proxy clips of them. Better than needing to do this of all the files you`ve filmed. 

AFAIK, ffmpeg can only display rkmpp decoded video through drmprime/gbm. Meaning that it cannot show it windowed in kdenlive.

 

I see more chances of using mpp accelerated decoding in a gstreamer-based video editor, such as pitivi

Link to post
Share on other sites

5 minutes ago, JMCC said:

AFAIK, ffmpeg can only display rkmpp decoded video through drmprime/gbm. Meaning that it cannot show it windowed in kdenlive.

 

I see more chances of using mpp accelerated decoding in a gstreamer-based video editor, such as pitivi

I don`t know. It`s worth the try.
 

Link to post
Share on other sites

@NicoD Well, in order to compile ffmpeg with rkmpp support, you need to pass these three configure flags (or their cmake equivalent, if that's what you are using): 

--enable-libdrm --enable-version3 --enable-rkmpp

 

Then, make sure your user has access to DRM. It should be enabled out-of-the-box for the default user in Armbian, if you build a current NanoPC-T4 image with the script (not in the one for download). Or you can just try to launch ffplay with sudo.

 

For last, when you launch it try changing the "h264" decoder to the "h264_rkmpp" decoder. Here is a link to a thread in the ffmpeg lists from someone who tried to do something similar: http://ffmpeg.org/pipermail/libav-user/2018-April/011081.html

 

Good luck with that :thumbup:

Link to post
Share on other sites

6 hours ago, NicoD said:

I`ve compiled rockchip mpp, but still get this message while compiling ffmpeg. I`ll try again tomorrow with another image and a clear head. Thanks a lot.

"ERROR: rockchip_mpp not found using pkg-config"
 

Well, yes, I didn't mention that you need to configure the system with the script first. I'll PM you a link of the preliminary version, though it is almost finished

Link to post
Share on other sites

23 hours ago, NicoD said:

I`ve compiled rockchip mpp, but still get this message while compiling ffmpeg. I`ll try again tomorrow with another image and a clear head. Thanks a lot.

"ERROR: rockchip_mpp not found using pkg-config"
 

 

I did not had this message (but LongChair's mpv seems to not working with 10bits? on rk3399) so what i did:

cd /home/dante4 && mkdir video && cd video && git clone -b master https://github.com/rockchip-linux/libmali && git clone https://github.com/rockchip-linux/mpp && git clone -b master https://github.com/rockchip-linux/gstreamer-rockchip  && git clone https://github.com/rockchip-linux/gstreamer-rockchip-extra && git clone https://github.com/mpv-player/mpv-build

cd libmali && cmake CMakeLists.txt && make -j4 && make install && ldconfig
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/include
cd ../mpp && cmake -DRKPLATFORM=ON -DHAVE_DRM=ON && make -j6 && make install

apt-get update && apt-get upgrade -y && apt-get install -y libqt5opengl5 libqt5qml5 libqt5quick5 libqt5widgets5 libqt5gui5 libqt5core5a qml-module-qtquick2 libqt5multimedia5 libqt5multimedia5-plugins libqt5multimediaquick-p5 qtmultimedia5-examples qtmultimedia5-doc-html pkg-config gcc make git unzip wget xz-utils cmake devscripts equivs build-essential docutils-common mercurial cmake-curses-gui build-essential yasm mercurial cmake cmake-curses-gui build-essential gcc-arm-linux-gnueabi g++-arm-linux-gnueabi texinfo nasm automake pkg-config
apt-get install libass-dev
apt-get install libfdk-aac-dev fdkaac aac-enc libfdk-aac1
apt-get 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 libghc-bzlib-dev 

and then i configured FFmpeg with this options

PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" +http://forum.loverpi.com/discussion/comment/1426/#Comment_1426

 

with doing this first

where $home/ffmpeg_build is place where folder FFmpeg laying

On 8/11/2018 at 6:01 PM, martos said:

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" ../aom && \
PATH="$HOME/bin:$PATH" make -j4 && \
make install

Link to post
Share on other sites

17 minutes ago, Dante4 said:

I did not had this message (but LongChair's mpv seems to not working with 10bits? on rk3399) so what i did:

I've got 4k 30fps working thanks to the script of @JMCC
Only fullscreen overlay. But it plays fine. Great to see this working. Now I've got some more work to make it work in Kdenlive. I hope it'll be ok.
Amazing work done by @JMCC

Link to post
Share on other sites

On 1/6/2019 at 4:05 AM, NicoD said:

I've got 4k 30fps working thanks to the script of @JMCC
Only fullscreen overlay. But it plays fine. Great to see this working. Now I've got some more work to make it work in Kdenlive. I hope it'll be ok.
Amazing work done by @JMCC

RockPi is ok with vp9 4k60fps, thanks for telling me about it (about RockPi)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

3 3