Open artem-zinnatullin opened 1 year ago
I don't think video encoding works with rkmpp provided by Rockchip. However, I could be wrong about this. My primary knowledge base is with the kernel and on the os level.
The source for ffmpeg can be found at the below ppa. https://launchpad.net/~liujianfeng1994/+archive/ubuntu/rockchip-multimedia/+packages
I found some information that might be of some help. Also, some ffmpeg forks might have working HW encoding.
https://github.com/hbiyik/FFmpeg/tree/encoder https://github.com/jjm2473/ffmpeg-rk https://www.reddit.com/r/OrangePI/comments/14f725v/has_anybody_managed_to_build_ffmpeg_with_hw/
Hi!
I'm trying to get
ffmpeg -hwaccel drm
to work so both decoding and encoding of H.264 and H.265 (HEVC) videos can happen with hardware acceleration on OrangePi 5 with its Mali G610 GPU.HW H.265 and H.264 encoding now works with parameters: -c:v h264_rkmpp_encoder and -c:v hevc_rkmpp_encoder
HW H.265 and H.264 encoding now works with parameters: -c:v h264_rkmpp_encoder and -c:v hevc_rkmpp_encoder
@colornoise42 is that without adding further packages?
Can anyone advise on encode performance for a camera connected to OPi5+? System usage, 1080p60, 4k
Hi! I'm trying to get
ffmpeg -hwaccel drm
to work so both decoding and encoding of H.264 and H.265 (HEVC) videos can happen with hardware acceleration on OrangePi 5 with its Mali G610 GPU.HW H.265 and H.264 encoding now works with parameters: -c:v h264_rkmpp_encoder and -c:v hevc_rkmpp_encoder
i have bad experience with armbian and adding RK3588 - it didnt work so i have instaled Joshua Riek Ubuntu witk Rk3588 implementation
i get this root@confirm:/home/confirm# ffmpeg -codecs | grep h264 ffmpeg version 6.0-5+git230804.e243e8d001~j1 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04) configuration: --prefix=/usr --extra-version='5+git230804.e243e8d001~j1' --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-version3 --enable-rkmpp --enable-sdl2 --disable-sndio --enable-pocketsphinx --enable-librsvg --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-shared libavutil 58. 2.100 / 58. 2.100 libavcodec 60. 3.100 / 60. 3.100 libavformat 60. 3.100 / 60. 3.100 libavdevice 60. 1.100 / 60. 1.100 libavfilter 9. 3.100 / 9. 3.100 libswscale 7. 1.100 / 7. 1.100 libswresample 4. 10.100 / 4. 10.100 libpostproc 57. 1.100 / 57. 1.100 DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264_rkmpp_decoder h264 h264_v4l2m2m ) (encoders: h264_rkmpp_encoder libx264 libx264rgb h264_omx h264_v4l2m2m h264_vaapi )
but i can't configure properly frigate.yml
ffmpeg: hwaccel_args: -hwaccel drm -hwaccel_device -c:v h264_v4l2m2m h264_vaapi
please enlighten me!
Have a look at blakeblackshear/frigate#6914 (comment)
root@confirm:/dev/dri# ls by-path card0 card1 renderD128 renderD129 i tried with his encoders and mine with renderD128 and renderD129 i'm stuck
here is my encoder dump `root@confirm:~# ffmpeg -codecs | grep rkmpp ffmpeg version 6.0-5+git230804.e243e8d001~j1 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04) configuration: --prefix=/usr --extra-version='5+git230804.e243e8d001~j1' --toolchain=hardened --libdir=/us r/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-strippin g --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enab le-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig -- enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-li bpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --e nable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enab le-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --ena ble-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --e nable-openal --enable-opencl --enable-opengl --enable-version3 --enable-rkmpp --enable-sdl2 --disable-sndio --enable-pocketsphinx --enable-librsvg --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chro maprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-shared libavutil 58. 2.100 / 58. 2.100 libavcodec 60. 3.100 / 60. 3.100 libavformat 60. 3.100 / 60. 3.100 libavdevice 60. 1.100 / 60. 1.100 libavfilter 9. 3.100 / 9. 3.100 libswscale 7. 1.100 / 7. 1.100 libswresample 4. 10.100 / 4. 10.100 libpostproc 57. 1.100 / 57. 1.100 DEV.L. av1 Alliance for Open Media AV1 (decoders: av1_rkmpp_decoder libdav1d libaom-av1 av1 ) (encoders: libaom-av1 libsvtav1 ) DEV.L. h263 H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2 (decoders: h263_rkmpp _decoder h263 h263_v4l2m2m ) (encoders: h263 h263_v4l2m2m )
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264_rkmpp_decoder h264 h2 64_v4l2m2m ) (encoders: h264_rkmpp_encoder libx264 libx264rgb h264_omx h264_v4l2m2m h264_vaapi )
DEV.L. hevc H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc_rkmpp_decoder hevc hevc_v4l2m2m ) (encoders: hevc_rkmpp_encoder libx265 hevc_v4l2m2m hevc_vaapi )
DEV.L. mpeg1video MPEG-1 video (decoders: mpeg1_rkmpp_decoder mpeg1video mpeg1_v4l2m2m )
DEV.L. mpeg2video MPEG-2 video (decoders: mpeg2_rkmpp_decoder mpeg2video mpegvideo mpeg2_v4l2m2m ) (encoders: mpeg2video mpeg2_vaapi )
DEV.L. mpeg4 MPEG-4 part 2 (decoders: mpeg4_rkmpp_decoder mpeg4 mpeg4_v4l2m2m ) (encoders: m peg4 libxvid mpeg4_omx mpeg4_v4l2m2m )
DEV.L. vp8 On2 VP8 (decoders: vp8_rkmpp_decoder vp8 vp8_v4l2m2m libvpx ) (encoders: vp8_rk mpp_encoder libvpx vp8_v4l2m2m vp8_vaapi )
DEV.L. vp9 Google VP9 (decoders: vp9_rkmpp_decoder vp9 vp9_v4l2m2m libvpx-vp9 ) (encoders: libvpx-vp9 vp9_vaapi )`
so it look like @artem-zinnatullin
log from frigate "ERROR : Unknown decoder 'h264_rkmpp'" but its not working
So if you ffmpeg -decoders | grep rkmpp
you get nothing ?
If not then likely better asking on https://github.com/blakeblackshear/frigate/issues/6914#issuecomment-1607953573
Hi!
I'm trying to get
ffmpeg -hwaccel drm
to work so both decoding and encoding of H.264 and H.265 (HEVC) videos can happen with hardware acceleration on OrangePi 5 with its Mali G610 GPU.References:
My understanding is that Mali G610 supports hardware accelerated encoding/decoding for H.265 and H.264, however I can't seem to get it fully working.
Now let's list relevant available HW decoders:
Now let's list relevant available HW encoders:
So it appears we have HW H.265 (decoder only??) and HW H.264 decoder and encoder for Mali G610.
Let's try to convert a video from H.265 to H.264:
If I remove HW output encoder, it will successfully run on SW encoder (eating all CPU) and HW input decoder:
So the HW H.265 input decoder seems to work, but HW H.264 output encoder doesn't!
Now let's try to convert a video from H.264 to H.265
TL;TR: as of Joshua-Riek/ubuntu-rockchip:v1.19 HW input decoding of H.264 and H.265 (HEVC) works, but HW output encoding of H.264 and H.265 doesn't I think.
libOMX_Core.so
in the distro and it's unclear (to me) where can one get itffmpeg
built with that encoder support (another apt-get ppa for ffmpeg?)HW decoding/encoding is essential for popular use case of OrangePi 5 boards — Frigate NVR and other similar cases when the board needs to efficiently encode/decode video streams.