jerryn Posted November 25, 2018 Posted November 25, 2018 VPU hardware encode/decode appears to not work on the NanoPC-T4. I know it's a WIP. If there is a Post Installation Procedure I could do that would work for me.
jerryn Posted November 27, 2018 Author Posted November 27, 2018 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.
NicoD Posted January 4, 2019 Posted January 4, 2019 @JMCC How about hijacking this thread? Spares us a new one. I need it for KDEnlive to have a better preview while editing. Not for rendering, that's great like it is on the RK3399's. For the others, JMCC will share some valuable information about VPU support for the RK3399. Thanks in advance.
JMCC Posted January 4, 2019 Posted January 4, 2019 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.
JMCC Posted January 4, 2019 Posted January 4, 2019 2 hours ago, NicoD said: I need it for KDEnlive to have a better preview while editing So you mean that kdenlive can use rkmpp acceleration for decoding?
NicoD Posted January 4, 2019 Posted January 4, 2019 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.
JMCC Posted January 4, 2019 Posted January 4, 2019 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 1
NicoD Posted January 4, 2019 Posted January 4, 2019 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.
JMCC Posted January 4, 2019 Posted January 4, 2019 @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 1
NicoD Posted January 5, 2019 Posted January 5, 2019 1 hour ago, JMCC said: --enable-version3 --enable-rkmpp 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"
JMCC Posted January 5, 2019 Posted January 5, 2019 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 2
Dante4 Posted January 6, 2019 Posted January 6, 2019 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 1
NicoD Posted January 6, 2019 Posted January 6, 2019 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
Dante4 Posted January 6, 2019 Posted January 6, 2019 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) 1
JMCC Posted January 10, 2019 Posted January 10, 2019 RK3399 media script released, with full VPU acceleration support: 2
AndreVallestero Posted December 8, 2019 Posted December 8, 2019 On 11/27/2018 at 12:13 PM, jerryn said: The ioctl segfault issue was the arhitecture flags for the compile we're set to unknown. I set it manually to armv7 Did you set it to armv7 in CMakeLists? I tried doing the same (since the rk3399 reports as aarch64 which doesn't match any of the compare strings) and it wasn't able to compile.
Recommended Posts