ffmpeg-rockchip编译安装_RV1106
本文是紧接上文的嵌入式Linux平台ffmpeg-rockchip版本的编译步骤,前文ffmpeg-rockchip编译安装_Linux_x86平台 - cyqsd's blog中已经在x86的主机上编译通过了,编译环境自然也是正常的,本文就只需要修改交叉编译链即可。对应的硬件平台还是RV1126,具体的系统支持可以先查看官方Wiki。RV1126不在ffmpeg-rockchip的文档里面,但是因为ffmpeg-rockchip的底层是依靠的MPP运行的,所以也是支持的。
环境准备
系统支持
Issue中提到了:consider supporting RV1126? · Issue #38 · nyanmisaka/ffmpeg-rockchip
Is there's any difference between RV1126 and the RK35xx in term of MPP support? The MPP interface should be platform agnostic.
- https://github.com/rockchip-linux/mpp/blob/ee946af015c350c926a0fca2f02da8e429f8b079/doc/Rockchip_Developer_Guide_MPP_EN.md?plain=1#L79
- https://github.com/rockchip-linux/mpp/blob/ee946af015c350c926a0fca2f02da8e429f8b079/osal/mpp_soc.cpp#L814-L823
Also, I have no plans to purchase the RV1126 board at the moment. If you make modifications to make this project work on RV1126, please open a PR.
从代码中看到rv1126、rv1109的H.264和H2.65的4K编解码都是没有问题的。
CompilationGuide/RaspberryPi – FFmpeg
Compilation · nyanmisaka/ffmpeg-rockchip Wiki
buildroot配置
rv1126的开发板的系统环境是基于buildroot构建的;也有Ubuntu版本,但是似乎并不能使用上硬件加速,具体可以看网上的一些其他资料。本文自然也是从buildroot来写的。
还有一个事情要注意,buildroot肯定是自带得有ffmpeg的,但是不是ffmpeg-rockchip分支,是官方分支,并且构建configure
时,精简了很多内容,也没有硬件加速,所以到这里还得自己移植。不过有的第三方板卡厂商,可能有编译,需要自行注意一下。
视频处理h264是很普遍的需求,buildroot提供了libopenh264等编、解码器,但也没有支持mpp的硬件加速,运行时相当于在软解,但是支持的格式、滤镜会比较多,可以自行选择是否需要安装,具体区别也可以接后文参考。
直接运行buildroot中构建的的ffmpeg:
[root@MiWiFi-RA81-srv:/]# ffmpeg -decoders | grep rkmpp
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)
configuration: --enable-cross-compile --cross-prefix=/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/bin/arm-linux-gnueabihf- --sysroot=/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/arm-buildroot-linux-gnueabihf/sysroot --host-cc=/usr/bin/gcc --arch=arm --target-os=linux --disable-stripping --pkg-config=/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/bin/pkg-config --disable-static --enable-shared --prefix=/usr --enable-avfilter --enable-version3 --enable-logging --enable-optimizations --disable-extra-warnings --enable-avdevice --enable-avcodec --enable-avformat --enable-network --disable-gray --enable-swscale-alpha --enable-dct --enable-fft --enable-mdct --enable-rdft --disable-crystalhd --disable-dxva2 --enable-runtime-cpudetect --disable-hardcoded-tables --disable-mipsdsp --disable-mipsdspr2 --disable-msa --enable-hwaccels --disable-cuda --disable-cuvid --disable-nvenc --disable-avisynth --disable-frei0r --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libdc1394 --disable-libgsm --disable-libilbc --disable-libvo-amrwbenc --disable-symver --disable-doc --enable-gpl --enable-nonfree --disable-debug --disable-small --enable-ffmpeg --disable-ffplay --disable-avresample --enable-ffprobe --enable-postproc --enable-swscale --enable-librga --enable-indevs --enable-alsa --enable-outdevs --enable-pthreads --enable-zlib --disable-bzlib --disable-libfdk-aac --disable-libcdio --disable-gnutls --enable-openssl --enable-libdrm --enable-libopenh264 --disable-vaapi --disable-vdpau --enable-rkmpp --enable-libdrm --disable-decoder=h264_v4l2m2m --disable-decoder=vp8_v4l2m2m --disable-decoder=mpeg2_v4l2m2m --disable-decoder=mpeg4_v4l2m2m --disable-encoder=h264_v4l2m2m --disable-encoder=vp8_v4l2m2m --disable-encoder=mpeg2_v4l2m2m --disable-encoder=mpeg4_v4l2m2m --disable-mmal --disable-omx --disable-omx-rpi --disable-libopencv --disable-libopus --disable-libvpx --disable-libass --disable-libbluray --disable-libmfx --disable-librtmp --disable-libmp3lame --disable-libmodplug --disable-libspeex --disable-libtheora --disable-libwavpack --disable-iconv --enable-libfreetype --enable-fontconfig --disable-libopenjpeg --enable-libx264 --disable-libx265 --disable-x86asm --disable-mmx --disable-sse --disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-avx --disable-avx2 --enable-armv6 --enable-vfp --enable-neon --disable-altivec --extra-libs=-latomic --enable-pic --cpu=cortex-a7
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
V..... h264_rkmpp h264 (rkmpp) (codec h264)
V..... hevc_rkmpp hevc (rkmpp) (codec hevc)
V..... vp8_rkmpp vp8 (rkmpp) (codec vp8)
V..... vp9_rkmpp vp9 (rkmpp) (codec vp9)
自带的似乎缺失很多。h264_rkmpp
中直接没有AVOptions
的支持,这让很多功能的使用受限。ffmpeg本身版本号也比较旧。
[root@MiWiFi-RA81-srv:/]# ffmpeg -h encoder=h264
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)
configuration: --enable-cross-compile --cross-prefix=/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/bin/arm-linux-gnueabihf- --sysroot=/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/arm-buildroot-linux-gnueabihf/sysroot --host-cc=/usr/bin/gcc --arch=arm --target-os=linux --disable-stripping --pkg-config=/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/bin/pkg-config --disable-static --enable-shared --prefix=/usr --enable-avfilter --enable-version3 --enable-logging --enable-optimizations --disable-extra-warnings --enable-avdevice --enable-avcodec --enable-avformat --enable-network --disable-gray --enable-swscale-alpha --enable-dct --enable-fft --enable-mdct --enable-rdft --disable-crystalhd --disable-dxva2 --enable-runtime-cpudetect --disable-hardcoded-tables --disable-mipsdsp --disable-mipsdspr2 --disable-msa --enable-hwaccels --disable-cuda --disable-cuvid --disable-nvenc --disable-avisynth --disable-frei0r --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libdc1394 --disable-libgsm --disable-libilbc --disable-libvo-amrwbenc --disable-symver --disable-doc --enable-gpl --enable-nonfree --disable-debug --disable-small --enable-ffmpeg --disable-ffplay --disable-avresample --enable-ffprobe --enable-postproc --enable-swscale --enable-librga --enable-indevs --enable-alsa --enable-outdevs --enable-pthreads --enable-zlib --disable-bzlib --disable-libfdk-aac --disable-libcdio --disable-gnutls --enable-openssl --enable-libdrm --enable-libopenh264 --disable-vaapi --disable-vdpau --enable-rkmpp --enable-libdrm --disable-decoder=h264_v4l2m2m --disable-decoder=vp8_v4l2m2m --disable-decoder=mpeg2_v4l2m2m --disable-decoder=mpeg4_v4l2m2m --disable-encoder=h264_v4l2m2m --disable-encoder=vp8_v4l2m2m --disable-encoder=mpeg2_v4l2m2m --disable-encoder=mpeg4_v4l2m2m --disable-mmal --disable-omx --disable-omx-rpi --disable-libopencv --disable-libopus --disable-libvpx --disable-libass --disable-libbluray --disable-libmfx --disable-librtmp --disable-libmp3lame --disable-libmodplug --disable-libspeex --disable-libtheora --disable-libwavpack --disable-iconv --enable-libfreetype --enable-fontconfig --disable-libopenjpeg --enable-libx264 --disable-libx265 --disable-x86asm --disable-mmx --disable-sse --disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-avx --disable-avx2 --enable-armv6 --enable-vfp --enable-neon --disable-altivec --extra-libs=-latomic --enable-pic --cpu=cortex-a7
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Encoder h264_rkmpp [h264 (rkmpp)]:
General capabilities: delay hardware
Threading capabilities: none
Supported hardware devices: (null)
Supported pixel formats: drm_prime
Encoder libx264 [libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10]:
General capabilities: delay threads
Threading capabilities: auto
Supported pixel formats: yuv420p yuvj420p yuv422p yuvj422p yuv444p yuvj444p nv12 nv16 nv21
libx264 AVOptions:
-preset <string> E..V..... Set the encoding preset (cf. x264 --fullhelp) (default "medium")
-tune <string> E..V..... Tune the encoding params (cf. x264 --fullhelp)
-profile <string> E..V..... Set profile restrictions (cf. x264 --fullhelp)
-fastfirstpass <boolean> E..V..... Use fast settings when encoding first pass (default true)
-level <string> E..V..... Specify level (as defined by Annex A)
-passlogfile <string> E..V..... Filename for 2 pass stats
-wpredp <string> E..V..... Weighted prediction for P-frames
-a53cc <boolean> E..V..... Use A53 Closed Captions (if available) (default true)
#...后面省略一大堆...
菜单里面本来也是有RV_TARGET_FFMPEG_ENABLE_RKMPP
选项的,只是不符合我们要求:
编译
首次编译
指定交叉编译链进行操作,拉取方法和前文相同。当然,首次编译必然是缺少依赖的,根据提示补全依赖,在后文中有步骤。
export SYSROOT=/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/arm-buildroot-linux-gnueabihf/sysroot
export PKG_CONFIG_PATH=${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgconfig
export PKG_CONFIG_LIBDIR=${PKG_CONFIG_PATH}
# configure可以按照自己的需求进行修改
./configure --prefix=/instal_arm --enable-gpl --enable-version3 --enable-libdrm --enable-rkmpp --enable-rkrga --enable-cross-compile --arch=arm --disable-stripping --target-os=linux --cc=arm-linux-gnueabihf-gcc --sysroot=${SYSROOT} --extra-cflags="-I${SYSROOT}/usr/include" --extra-ldflags="-L${SYSROOT}/usr/lib"
rockchip_mpp
git clone -b jellyfin-mpp --depth=1 https://github.com/nyanmisaka/mpp.git rkmpp
pushd rkmpp
mkdir rkmpp_build
pushd rkmpp_build
因为源教程还是在原生环境上编译的,交叉编译还得指定编译器。那么先回到~/rkmpp/
,给cmake指定编译链,添加toolchain.cmake
文件。
# 指定目标系统
set(CMAKE_SYSTEM_NAME Linux)
# 指定目标平台
set(CMAKE_SYSTEM_PROCESSOR arm)
# 指定交叉编译工具链的根路径
set(CROSS_CHAIN_PATH /root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host)
# 指定C编译器
set(CMAKE_C_COMPILER "${CROSS_CHAIN_PATH}/bin/arm-linux-gnueabihf-gcc")
# 指定C++编译器
set(CMAKE_CXX_COMPILER "${CROSS_CHAIN_PATH}/bin/arm-linux-gnueabihf-g++")
对环境进行指定,再回到rkmpp_build
中:
cmake \
-DCMAKE_INSTALL_PREFIX=${SYSROOT}/usr \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TEST=OFF \
-DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake \
..
make -j6
make install
make install
后会安装到buildroot的临时编译环境中:
rkrga
librga是使用meson和ninja进行构建的,我们要按照前面原生编译平台的命令进行适当修改,来适配交叉编译。
1.创建cross.txt文件,并写入:
[binaries]
c = 'arm-linux-gnueabihf-gcc'
cpp = 'arm-linux-gnueabihf-g++'
ar = 'arm-linux-gnueabihf-ar'
strip = 'arm-linux-gnueabihf-strip'
[host_machine]
system = 'linux'
cpu_family = 'arm'
cpu = 'armv7'
endian = 'little'
[properties]
c_link_args = ['-Wl,-rpath-link,/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib']
cpp_link_args = ['-Wl,-rpath-link,/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib']
2.编译器的各个地址,要按照环境的实际情况进行修改。并运行:
root@7b108f530ecc:~# meson setup rkrga rkrga_build --prefix=${SYSROOT}/usr --libdir=lib --buildtype=release --default-library=shared --cross-file=cross.txt -Dcpp_args=-fpermissive -Dlibdrm=false -Dlibrga_demo=false
root@7b108f530ecc:~# ninja -C rkrga_build install
ninja: Entering directory `rkrga_build'
[15/16] Installing files.
Installing librga.so.2.1.0 to /root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib
#...省略...
Installing /root/rkrga_build/meson-private/librga.pc to /root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/pkgconfig
前面都配置成功,编译是没有问题的。要注意平台已经换成arm了,x86的话,是配置没生效。
再次进行编译
再次运行应该就可以直接过了。
./ffmpeg
就是本次编译的结果。可以看到编解码器已经完善很多了。
[root@MiWiFi-RA81-srv:~]# ./ffmpeg -decoders | grep rkmpp
ffmpeg version 57d5befee9 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)
configuration: --prefix=/instal_arm --enable-gpl --enable-version3 --enable-libdrm --enable-rkmpp --enable-rkrga --enable-cross-compile --arch=arm --disable-stripping --target-os=linux --cc=arm-linux-gnueabihf-gcc --sysroot=/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/arm-buildroot-linux-gnueabihf/sysroot --extra-cflags=-I/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include --extra-ldflags=-L/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100
V..... av1_rkmpp Rockchip MPP (Media Process Platform) AV1 decoder (codec av1)
V..... h263_rkmpp Rockchip MPP (Media Process Platform) H263 decoder (codec h263)
V..... h264_rkmpp Rockchip MPP (Media Process Platform) H264 decoder (codec h264)
V..... hevc_rkmpp Rockchip MPP (Media Process Platform) HEVC decoder (codec hevc)
V..... mpeg1_rkmpp Rockchip MPP (Media Process Platform) MPEG1VIDEO decoder (codec mpeg1video)
V..... mpeg2_rkmpp Rockchip MPP (Media Process Platform) MPEG2VIDEO decoder (codec mpeg2video)
V..... mpeg4_rkmpp Rockchip MPP (Media Process Platform) MPEG4 decoder (codec mpeg4)
V..... vp8_rkmpp Rockchip MPP (Media Process Platform) VP8 decoder (codec vp8)
V..... vp9_rkmpp Rockchip MPP (Media Process Platform) VP9 decoder (codec vp9)
比如在h264
中的AVOptions中,参数已经增加很多了。
[root@MiWiFi-RA81-srv:~]# ./ffmpeg -h encoder=h264
ffmpeg version 57d5befee9 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)
configuration: --prefix=/instal_arm --enable-gpl --enable-version3 --enable-libdrm --enable-rkmpp --enable-rkrga --enable-cross-compile --arch=arm --disable-stripping --target-os=linux --cc=arm-linux-gnueabihf-gcc --sysroot=/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/arm-buildroot-linux-gnueabihf/sysroot --extra-cflags=-I/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include --extra-ldflags=-L/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100
Encoder h264_v4l2m2m [V4L2 mem2mem H.264 encoder wrapper]:
General capabilities: delay hardware
Threading capabilities: none
h264_v4l2m2m_encoder AVOptions:
-num_output_buffers <int> E..V....... Number of buffers in the output context (from 2 to INT_MAX) (default 16)
-num_capture_buffers <int> E..V....... Number of buffers in the capture context (from 4 to INT_MAX) (default 4)
Encoder h264_rkmpp [Rockchip MPP (Media Process Platform) H264 encoder]:
General capabilities: delay hardware
Threading capabilities: none
Supported hardware devices: rkmpp rkmpp drm
Supported pixel formats: gray yuv420p yuvj420p yuv422p yuvj422p yuv444p yuvj444p nv12 nv21 nv16 nv24 yuyv422 yvyu422 uyvy422 rgb24 bgr24 rgba rgb0 bgra bgr0 argb 0rgb abgr 0bgr drm_prime
h264_rkmpp_encoder AVOptions:
-rc_mode <int> E..V....... Set the encoding rate control mode (from 0 to 5) (default 5)
VBR 0 E..V.......
CBR 1 E..V.......
CQP 2 E..V.......
AVBR 3 E..V.......
-qp_init <int> E..V....... Set the initial QP value (from -1 to 51) (default -1)
-qp_max <int> E..V....... Set the max QP value for P and B frame (from -1 to 51) (default -1)
-qp_min <int> E..V....... Set the min QP value for P and B frame (from -1 to 51) (default -1)
-qp_max_i <int> E..V....... Set the max QP value for I frame (from -1 to 51) (default -1)
-qp_min_i <int> E..V....... Set the min QP value for I frame (from -1 to 51) (default -1)
-profile <int> E..V....... Set the encoding profile restriction (from -1 to 100) (default high)
baseline 66 E..V.......
main 77 E..V.......
high 100 E..V.......
-level <int> E..V....... Set the encoding level restriction (from -99 to 62) (default 0)
1 10 E..V.......
1.1 11 E..V.......
1.2 12 E..V.......
1.3 13 E..V.......
2 20 E..V.......
2.1 21 E..V.......
2.2 22 E..V.......
3 30 E..V.......
3.1 31 E..V.......
3.2 32 E..V.......
4 40 E..V.......
4.1 41 E..V.......
4.2 42 E..V.......
5 50 E..V.......
5.1 51 E..V.......
5.2 52 E..V.......
6 60 E..V.......
6.1 61 E..V.......
6.2 62 E..V.......
-coder <int> E..V....... Set the entropy coder type (from 0 to 1) (default cabac) (from 0 to 1) (default cabac)
cavlc 0 E..V.......
cabac 1 E..V.......
-8x8dct <boolean> E..V....... Set the high profile 8x8 transform (default true)
-udu_sei <boolean> E..V....... Pass on user data unregistered SEI if available (default false)
-prefix_mode <boolean> E..V....... Add prefix NAL between SEI info and encoded bitstream data (default false)
[root@MiWiFi-RA81-srv:~]#
现在编译的这个版本几乎是全量版了,储存空间受限的话,可以根据需要去掉一些不必要的功能来精简体积。
RTSP推流测试
[root@MiWiFi-RA81-srv:~]# ./ffmpeg -f v4l2 -i /dev/video45 -c:v h264_rkmpp -f rtsp -rtsp_transport tcp "rtsp://192.168.2.61:8554/stream"
ffmpeg version 57d5befee9 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)
configuration: --prefix=/instal_arm --enable-gpl --enable-version3 --enable-libdrm --enable-rkmpp --enable-rkrga --enable-cross-compile --arch=arm --disable-stripping --target-os=linux --cc=arm-linux-gnueabihf-gcc --sysroot=/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/arm-buildroot-linux-gnueabihf/sysroot --extra-cflags=-I/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include --extra-ldflags=-L/root/rv1126-rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100
Input #0, video4linux2,v4l2, from '/dev/video45':
Duration: N/A, start: 22414.101927, bitrate: 147456 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720, 147456 kb/s, 10 fps, 10 tbr, 1000k tbn
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_rkmpp))
Press [q] to stop, [?] for help
Output #0, rtsp, to 'rtsp://192.168.2.61:8554/stream':
Metadata:
encoder : Lavf60.16.100
Stream #0:0: Video: h264 (High), yuyv422(progressive), 1280x720, q=2-31, 2000 kb/s, 10 fps, 90k tbn
Metadata:
encoder : Lavc60.31.102 h264_rkmpp
frame= 826 fps= 10 q=-0.0 size=N/A time=00:01:22.60 bitrate=N/A dup=8 drop=0 speed=1.01x
再次推流时看到encoder
已经是h264_rkmpp
了,speed也到了1.01x
。
4K推流 3840x2160 就不看了。
视情况还需要替换/usr/lib
中的librockchip_mpp.so.0
的相关文件。
本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。