白嫖: https://github.com/aodzip/cedar/
配套的ion驱动: https://github.com/aodzip/cedar-ion/
想尝鲜的可以冲了
Allwinner S3 YUV to H264编码测试已经通过
最近编辑记录 aodzip (2020-04-26 15:47:29)
离线
帮顶。
离线
太牛了,解码要是OK了那么就更实用了
离线
牛逼,安排!解码搞起。。。
离线
这个要顶一下
离线
很牛逼,期待MIPI!就可以开好好开撸S3了
离线
厉害厉害,找时间可以试试,大佬幸苦了
离线
good job! 再回到主线貌似又有希望了!支持大佬!!
离线
大神,解码上日程了吗?
离线
离线
大佬,有教程吗?
离线
大神,解码上日程了吗?
今天解码测试了1920x1080 30FPS MJPEG流到YUV流,完美的。
离线
太牛了,解码要是OK了那么就更实用了
解码今天测试可用的
离线
今天解码测试了1920x1080 30FPS MJPEG流到YUV流,完美的。
大佬,厉害了,感谢分享!感谢分享!
离线
非常感谢!
离线
大佬就是不一样,感谢分享
离线
膜拜大佬!!!!!!!
离线
也就每天看看大佬代码 才能维持生活这样子
离线
厉害了,先mark。有空再搞
离线
很牛逼,期待MIPI!就可以开好好开撸S3了
mipi没有问题,一直都可以
离线
mipi没有问题,一直都可以
mipi dsi还是csi?
离线
很羡慕大佬们,真的很厉害,不知自己什么时候能到这水平。
离线
今天解码测试了1920x1080 30FPS MJPEG流到YUV流,完美的。
您嘗試過哪種媒體播放器? 我已經安裝了linux 5.4的驅動程序。 我執行了自述文件中的說明。 但是,如何將cedar引入ffmpeg或mplayer? 我可以使用哪個命令行運行視頻?謝謝。
离线
您嘗試過哪種媒體播放器? 我已經安裝了linux 5.4的驅動程序。 我執行了自述文件中的說明。 但是,如何將cedar引入ffmpeg或mplayer? 我可以使用哪個命令行運行視頻?謝謝。
CedarX并不是一个通用型的媒体框架,它不像v4l2那样可以无缝集成到很多现有的媒体工具里。libcedar(libcdc)是该驱动的用户层动态连接库,它可能是全志专有的二进制代码,你可以从你的经销商处询问是否可以得到这个动态连接库的副本和开发手册。所有的编解码程序需要自己开发。
最近编辑记录 aodzip (2020-04-29 08:32:52)
离线
CedarX并不是一个通用型的媒体框架,它不像v4l2那样可以无缝集成到很多现有的媒体工具里。libcedar(libcdc)是该驱动的用户层动态连接库,它可能是全志专有的二进制代码,你可以从你的经销商处询问是否可以得到这个动态连接库的副本和开发手册。所有的编解码程序需要自己开发。
快速的测试方式是直接用gstreamer1.0版本。
离线
楼主老厉害了,编码都搞定了,还乐于分享,就更厉害了,等有空了翻出板子来试一把
离线
mipi dsi还是csi?
csi,v3s的
离线
奇怪,为啥我加进去编译出错
drivers/staging/media/sunxi/cedar/ion/ion_page_pool.c:181:1: error: type defaults to ‘int’ in declaration of ‘device_initcall’ [-Werror=implicit-int]
离线
奇怪,为啥我加进去编译出错
drivers/staging/media/sunxi/cedar/ion/ion_page_pool.c:181:1: error: type defaults to ‘int’ in declaration of ‘device_initcall’ [-Werror=implicit-int]
Linux 5.4.35是通过测试的版本,试一下
离线
Linux 5.4.35是通过测试的版本,试一下
吐了 用5.3 5.6都不行 又得下个5.4
离线
吐了 用5.3 5.6都不行 又得下个5.4
用 git pull 很快的吧,几秒钟搞定。
离线
大佬,这个能用在v3s上吗
离线
大佬,这个能用在v3s上吗
我看到别的帖子里有坑友说已经在V3S上验证过视频解码,可以用。
离线
感谢楼主,牛皮
离线
白嫖: https://github.com/aodzip/cedar/
配套的ion驱动: https://github.com/aodzip/cedar-ion/想尝鲜的可以冲了
Allwinner S3 YUV to H264编码测试已经通过
第二个链接失效了 能发下文件吗 谢谢
离线
不错,不错
离线
牛逼,安排!解码搞起。。。
离线
5.4的那一套都哪里下载?有些什么驱动了?
离线
aodzip 说:白嫖: https://github.com/aodzip/cedar/
配套的ion驱动: https://github.com/aodzip/cedar-ion/想尝鲜的可以冲了
Allwinner S3 YUV to H264编码测试已经通过第二个链接失效了 能发下文件吗 谢谢
第二个项目已经合并到第一个项目了, 看git log就知道了。
离线
离线
和最新的5.10 dma结构体不对应会报错
drivers/staging/media/sunxi/cedar/ion/ion.c:1026:2: error: unknown field ‘map’ specified in initializer
.map = ion_dma_buf_kmap,
^
drivers/staging/media/sunxi/cedar/ion/ion.c:1026:9: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.map = ion_dma_buf_kmap,
^
drivers/staging/media/sunxi/cedar/ion/ion.c:1026:9: note: (near initialization for ‘dma_buf_ops.mmap’)
drivers/staging/media/sunxi/cedar/ion/ion.c:1027:2: error: unknown field ‘unmap’ specified in initializer
.unmap = ion_dma_buf_kunmap,
^
drivers/staging/media/sunxi/cedar/ion/ion.c:1027:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.unmap = ion_dma_buf_kunmap,
离线
aodzip 说:Linux 5.4.35是通过测试的版本,试一下
吐了 用5.3 5.6都不行 又得下个5.4
请问在哪里可以下载Linux 5.4?我的荔枝派zero能下载的最高才5.2
离线
你好!
根据github上的指导移植驱动,并且在/dev目录下找到cedar_dev和ion节点。
并且完成了下面的操作:
Allwinner CedarX userspace library
Based on lindenis-v536 SDK
Add package to buildroot system
Copy dir "buildroot-package/libcedarc" to "buildroot/package"
Modify "buildroot/package/Config.in", add package source to any menu you want
source "package/libcedarc/Config.in"
Demo
menu "Hardware handling"
source "package/libcedarc/Config.in" # <--Add
source "package/acsccid/Config.in"
source "package/bcm2835/Config.in"
Build
make menuconfig
Select "libcedarc" package
make
Work with ffmpeg (tested with buildroot 2020.02.1)
make menuconfig
goto "> Target packages > Audio and video applications > ffmpeg"
set "(--enable-omx) Additional parameters for ./configure"
recompile ffmpeg
以上操作完之后,要如何使用h264硬编码的功能呢?请大佬指点!
最近编辑记录 无痕 (2021-02-28 00:53:12)
离线
楼主你好,感谢分享,我试了下v3s zero主线linux5.2,编译报错了,不知道是什么原因呢
make[8]: *** No rule to make target `drivers/staging/media/sunxi/cedar/ion/sunxi/cache.c', needed by `drivers/staging/media/sunxi/cedar/ion/sunxi/cache.o'. Stop.
make[8]: *** Waiting for unfinished jobs....
CC [M] drivers/staging/media/sunxi/cedar/ion/sunxi/sunxi_ion.o
CC [M] drivers/staging/rtl8723bs/core/rtw_io.o
drivers/staging/media/sunxi/cedar/ion/sunxi/sunxi_ion.c:189:1: warning: data definition has no type or storage class [enabled by default]
drivers/staging/media/sunxi/cedar/ion/sunxi/sunxi_ion.c:189:1: error: type defaults to ‘int’ in declaration of ‘subsys_initcall’ [-Werror=implicit-int]
drivers/staging/media/sunxi/cedar/ion/sunxi/sunxi_ion.c:189:1: warning: parameter names (without types) in function declaration [enabled by default]
drivers/staging/media/sunxi/cedar/ion/sunxi/sunxi_ion.c:185:19: warning: ‘sunxi_ion_init’ defined but not used [-Wunused-function]
cc1: some warnings being treated as errors
最近编辑记录 Denny (2021-05-25 09:08:51)
离线
心情复杂 说:aodzip 说:Linux 5.4.35是通过测试的版本,试一下
吐了 用5.3 5.6都不行 又得下个5.4
请问在哪里可以下载Linux 5.4?我的荔枝派zero能下载的最高才5.2
我下的是主线代码的,荔枝派已经适配了主线,最多改改设备树就能运行。
离线
when I try to use this cedarx with ffmpeg I get:
# ffmpeg -f lavfi -i testsrc=duration=2:size=1280x720:rate=30 -c:v h264_omx testsrc.mpg -y
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8.4.0 (Buildroot 2020.02.1)
configuration: --enable-cross-compile --cross-prefix=/home/niyaz/licheepizero_linux_build_latest/buildroot_rootfs/buildroot-2020.02.1/output/host/bin/arm-buildroot-linux-uclibcgnueabihf- --sysroot=/home/niyaz/licheepizero_linux_build_latest/buildroot_rootfs/buildroot-2020.02.1/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot --host-cc=/usr/bin/gcc --arch=arm --target-os=linux --disable-stripping --pkg-config=/home/niyaz/licheepizero_linux_build_latest/buildroot_rootfs/buildroot-2020.02.1/output/host/bin/pkg-config --disable-static --enable-shared --prefix=/usr --enable-avfilter --disable-version3 --enable-logging --enable-optimizations --disable-extra-warnings --enable-avdevice --enable-avcodec --enable-avformat --enable-network --disable-gray --enable-swscale-alpha --disable-small --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 --enable-ffmpeg --disable-ffplay --enable-avresample --disable-ffprobe --disable-postproc --enable-swscale --enable-indevs --disable-alsa --enable-outdevs --enable-pthreads --enable-zlib --disable-bzlib --disable-libfdk-aac --disable-libcdio --disable-gnutls --enable-openssl --disable-libdrm --disable-libopenh264 --disable-vaapi --disable-vdpau --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 --enable-iconv --disable-libfreetype --disable-fontconfig --disable-libopenjpeg --disable-libx264 --disable-libx265 --disable-libdav1d --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 --enable-omx --enable-swscale --enable-swscale-alpha --enable-filter=scale
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
Input #0, lavfi, from 'testsrc=duration=2:size=1280x720:rate=30':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1280x720 [SAR 1:1 DAR 16:9], 30 tbr, 30 tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_omx))
Press [q] to stop, [?] for help
[h264_omx @ 0x6d4d0] libOMX_Core.so not found
[h264_omx @ 0x6d4d0] libOmxCore.so not found
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
离线
和最新的5.10 dma结构体不对应会报错
drivers/staging/media/sunxi/cedar/ion/ion.c:1026:2: error: unknown field ‘map’ specified in initializer .map = ion_dma_buf_kmap, ^ drivers/staging/media/sunxi/cedar/ion/ion.c:1026:9: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .map = ion_dma_buf_kmap, ^ drivers/staging/media/sunxi/cedar/ion/ion.c:1026:9: note: (near initialization for ‘dma_buf_ops.mmap’) drivers/staging/media/sunxi/cedar/ion/ion.c:1027:2: error: unknown field ‘unmap’ specified in initializer .unmap = ion_dma_buf_kunmap, ^ drivers/staging/media/sunxi/cedar/ion/ion.c:1027:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .unmap = ion_dma_buf_kunmap,
好像5.6之后,map、unmap就被删了
https://github.com/torvalds/linux/commit/4337ebbbbda3fb82e4fd928188a86e0bff0e9042
这怎么办...
离线
@unturned3
Hello, how many fps and maximum resolution do you get with cedarx from aodzip? I can encode 640x480 at ~50fps data from ov5640 using ffmpeg - CPU load 100%
离线
@unturned3
Hello, how many fps and maximum resolution do you get with cedarx from aodzip? I can encode 640x480 at ~50fps data from ov5640 using ffmpeg - CPU load 100%
Hey,
I haven't actually tried cedarx yet; planning to do so in the next few days. Did you obtain the 50fps h264 encoding result using CPU only (no cedarx)? That sounds pretty impressive.
离线
@unturned3
No, I get such fps using hard codec using ffmpeg -c:v h264_omx , without cedarx I get ~ 25fps 640x480, I dont understand why so high cpu load when using cedarx
I also cannot encode 1280x720 and more due to ion memory allocation failure (I set CMA to 32MB as aodzip recommended)
最近编辑记录 niyazfattahov (2021-07-25 16:30:01)
离线
@unturned3
No, I get such fps using hard codec using ffmpeg -c:v h264_omx , without cedarx I get ~ 25fps 640x480, I dont understand why so high cpu load when using cedarxI also cannot encode 1280x720 and more due to ion memory allocation failure (I set CMA to 32MB as aodzip recommended)
How did you invoke ffmpeg? May I see the exact command? Because I'm not quite sure how to do it properly.
I just went through the trouble of changing my kernel from 5.10 to 5.4.35, and I'm about to downgrade buildroot from 2020.11 to 2020.08. Building ffmpeg with --enable-omx in buildroot 2020.11 gives me a missing header OMX_core.h error.
离线
this is my custom buildroot defconfig, may be it can help you.
Do you select glibc in toolchain(not ulibc)?
Did you compile libcedarc at first?
BR2_arm=y
BR2_cortex_a7=y
BR2_ARM_FPU_VFPV4=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_GENERIC_HOSTNAME="licheepi-zero"
BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the LicheePi Zero"
BR2_TARGET_GENERIC_ROOT_PASSWD="magnesium"
BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
BR2_ROOTFS_OVERLAY="../buildroot_additional/rootfs_overlay"
BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/licheepi/genimage.cfg"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-v3s-licheepi-zero sun8i-v3s-licheepi-zero-dock"
BR2_PACKAGE_LINUX_TOOLS_PERF=y
BR2_PACKAGE_LINUX_TOOLS_PERF_TUI=y
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_FFMPEG=y
BR2_PACKAGE_FFMPEG_GPL=y
BR2_PACKAGE_FFMPEG_NONFREE=y
BR2_PACKAGE_FFMPEG_AVRESAMPLE=y
BR2_PACKAGE_FFMPEG_SWSCALE=y
BR2_PACKAGE_FFMPEG_EXTRACONF="--enable-omx --enable-swscale --enable-swscale-alpha --enable-filter=scale --enable muxer=segment"
BR2_PACKAGE_SPIDEV_TEST=y
BR2_PACKAGE_DOSFSTOOLS=y
BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y
BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y
BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y
BR2_PACKAGE_EXFAT=y
BR2_PACKAGE_EXFAT_UTILS=y
BR2_PACKAGE_MTD=y
BR2_PACKAGE_MTD_DOCFDISK=y
BR2_PACKAGE_MTD_MKFSJFFS2=y
BR2_PACKAGE_MTD_TESTS=y
BR2_PACKAGE_FSWEBCAM=y
BR2_PACKAGE_SDL2=y
BR2_PACKAGE_LINUX_FIRMWARE=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y
BR2_PACKAGE_FLASHROM=y
BR2_PACKAGE_ALSA_LIB=y
BR2_PACKAGE_LIBCEDARC=y
BR2_PACKAGE_LIBCEDARC_DECODER=y
BR2_PACKAGE_LIBCEDARC_OPENMAX=y
BR2_PACKAGE_LIBV4L=y
BR2_PACKAGE_LIBV4L_UTILS=y
BR2_PACKAGE_LIBPCAP=y
BR2_PACKAGE_POPT=y
BR2_PACKAGE_DHCP=y
BR2_PACKAGE_DHCP_SERVER=y
BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK=y
BR2_PACKAGE_DHCP_RELAY=y
BR2_PACKAGE_DHCP_CLIENT=y
BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_IPERF=y
BR2_PACKAGE_IPERF3=y
BR2_PACKAGE_OPENSSH=y
BR2_PACKAGE_SSHGUARD=y
BR2_PACKAGE_SSHPASS=y
BR2_PACKAGE_TINYSSH=y
BR2_PACKAGE_WIRELESS_TOOLS=y
BR2_PACKAGE_WIRELESS_TOOLS_LIB=y
BR2_PACKAGE_WPA_SUPPLICANT=y
BR2_PACKAGE_WPA_SUPPLICANT_AUTOSCAN=y
BR2_PACKAGE_WPA_SUPPLICANT_CLI=y
BR2_PACKAGE_WPA_SUPPLICANT_WPA_CLIENT_SO=y
BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
BR2_PACKAGE_DAEMON=y
BR2_PACKAGE_HTOP=y
BR2_PACKAGE_UTIL_LINUX=y
BR2_PACKAGE_UTIL_LINUX_LIBFDISK=y
BR2_PACKAGE_UTIL_LINUX_PARTX=y
BR2_PACKAGE_ED=y
BR2_PACKAGE_MOST=y
BR2_PACKAGE_NANO=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="200M"
BR2_TARGET_ROOTFS_JFFS2=y
BR2_TARGET_ROOTFS_JFFS2_CUSTOM=y
BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE=0x10000
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="LicheePi_Zero"
BR2_TARGET_UBOOT_NEEDS_DTC=y
BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin"
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/licheepi/boot.cmd"
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
Im using buildroot-2020.02.1
ffmpeg:
ffmpeg -f v4l2 -r 30 -t 10 -s 640x480 -i /dev/video0 -pix_fmt yuv420p -c:v h264_omx output.avi -y
最近编辑记录 niyazfattahov (2021-07-26 13:59:13)
离线
我用buildroot 2020.02.1,Linux 5.4.35 编译好了 cedar 和 libcedarc,但是在编译 ffmpeg(带--enable-omx)的时候 buildroot 报错 "ERROR: OMX_Core.h not found"
有大佬遇到过这个问题吗?我是按照 aodzip github 上的指示来做的啊…… debug 了两天了都不知道哪里出了问题
离线
@unturned3
一样的问题 很头大
离线
buildroot没勾选openmax
离线
@unturned3
同样的问题,有人解决了吗? 也有人试过播放mp4文件吗? 命令是什么?
离线
buildroot没勾选openmax
大佬,buildroot里没有 OpenMax 这个包啊?请问在哪里勾选呢
离线
configuration: --enable-cross-compile --cross-prefix=/home/rsltueb/buildroot-2021.05.1/output/host/bin/arm-buildroot-linux-gnueabihf- --sysroot=/home/rsltueb/buildroot-2021.05.1/output/host/arm-buildroot-linux-gnueabihf/sysroot --host-cc=/usr/bin/gcc --arch=arm --target-os=linux --disable-stripping --pkg-config=/home/rsltueb/buildroot-2021.05.1/output/host/bin/pkg-config --disable-static --enable-shared --prefix=/usr --enable-avfilter --disable-version3 --enable-logging --enable-optimizations --disable-extra-warnings --enable-avdevice --enable-avcodec --enable-avformat --enable-network --disable-gray --enable-swscale-alpha --disable-small --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 --enable-ffmpeg --disable-ffplay --disable-libv4l2 --enable-avresample --disable-ffprobe --disable-libxcb --enable-postproc --enable-swscale --enable-indevs --disable-alsa --enable-outdevs --enable-pthreads --enable-zlib --disable-bzlib --disable-libfdk-aac --disable-libcdio --disable-gnutls --enable-openssl --disable-libdrm --disable-libopenh264 --disable-vaapi --disable-vdpau --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-iconv --disable-libfreetype --disable-fontconfig --disable-libopenjpeg --disable-libx264 --disable-libx265 --disable-libdav1d --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 --enable-omx
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 335.276266, bitrate: 147456 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
File '/tmp/av.avi' already exists. Overwrite? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_omx))
Press [q] to stop, [?] for help
[h264_omx @ 0x4c1b20] libOMX_Core.so not found
Leaving OMX_GetComponentsOfRole
[h264_omx @ 0x4c1b20] Using OMX.allwinner.video.encoder.avc
debug : omx_venc <__AwOmxVencComponentCreate:2501>: COMPONENT_CREATE
debug : cedarc <AwOmxComponentInit:26>:OMXCORE: aw_omx_component_init 4d24c8
debug : omx_venc <__AwOmxVencInit:392>: COMPONENT_INIT
debug : ionAlloc <__GetIonMemOpsS:985>:*** get __GetIonMemOpsS ***
debug : ionAlloc <ion_alloc_open:134>:begin ion_alloc_open
debug : cedarc <VeSetSpeed:1559>: *** set ve freq to 360 Mhz ***
debug : cedarc <VeInitialize:1198>: ve init ok
debug : ionAlloc <ion_alloc_open:175>:** phy offset = 40000000
debug : cedarc <VeRelease:1253>: ve release ok
debug : cedarc <CdcMessageQueueCreate:47>:nMessageSize = 20
debug : cedarc <CdcMessageQueueCreate:47>:nMessageSize = 20
debug : cedarc <updateOmxDebugFlag:238>:DEBUG_TYPE is (null).
debug : cedarc <AwOmxComponentSetCallbacks:309>:OMXCORE: aw_omx_component_set_callbacks 4d24c8, b64495ec , 4c1ec0
debug : omx_venc <__AwOmxVencSetCallbacks:2317>:===== vdec set callbacks***************
debug : omx_venc <__AwOmxVencGetParameter:953>:InPort definition: width = 0, height = 0
debug : omx_venc <__AwOmxVencGetParameter:965>:OutPort definition: width = 176, height = 144
debug : omx_venc <__AwOmxVencSetParameter:1335>:init_input_port: stride = 640, width = 640, height = 480
debug : omx_venc <__AwOmxVencSetParameter:1341>:set video port format 0x13
debug : omx_venc <__AwOmxVencGetParameter:953>:InPort definition: width = 640, height = 480
debug : omx_venc <__AwOmxVencGetParameter:965>:OutPort definition: width = 176, height = 144
debug : omx_venc <__AwOmxVencSetParameter:1405>:init_output_port: framerate: 1966080(>>16) 30, output width 640 height 480.
debug : omx_venc <__AwOmxVencGetParameter:965>:OutPort definition: width = 640, height = 480
debug : omx_venc <__AwOmxVencAllocateBuffer:1963>:allocate buffer, nPortIndex: InPort, nSizeBytes: 460800
debug : omx_venc <__AwOmxVencAllocateBuffer:1963>:allocate buffer, nPortIndex: InPort, nSizeBytes: 460800
debug : omx_venc <__AwOmxVencAllocateBuffer:1963>:allocate buffer, nPortIndex: OutPort, nSizeBytes: 460800
debug : omx_venc <__AwOmxVencAllocateBuffer:1963>:allocate buffer, nPortIndex: OutPort, nSizeBytes: 460800
debug : omx_venc <__AwOmxVencAllocateBuffer:1963>:allocate buffer, nPortIndex: OutPort, nSizeBytes: 460800
debug : omx_venc <__AwOmxVencAllocateBuffer:1963>:allocate buffer, nPortIndex: OutPort, nSizeBytes: 460800
debug : omx_venc <processThreadCommand:3317>:x set state command, cmd = main_thread_cmd_set_state, pCmdData = OMX_StateIdle.
debug : omx_venc <processThreadCommand:3317>:x set state command, cmd = main_thread_cmd_set_state, pCmdData = OMX_StateExecuting.
Output #0, avi, to '/tmp/av.avi':
Metadata:
ISFT : Lavf58.76.100
Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p(tv, progressive), 640x480, q=2-31, 200 kb/s, 30 fps, 30 tbn
Metadata:
encoder : Lavc58.134.100 h264_omx
debug : omx_venc <ComponentVencThread:4316>:(vdrvThread receive cmd[venc_cmd_open]
debug : cedarc <LogVersionInfo:40>:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Cedar Codec <<<<<<<<<<<<<<<<<<<<<<<<<<<<
tag : createBranch_customize_sylix
branch: CedarC-v1.1.9
commit: 4a182bd42c931bea2f77b0ff9a531d233df8541e
date : Thu May 25 15:34:03 2017 +0800
author: jenkins8080
patch :
----------------------------------------------------------------------
debug : cedarc <VeSetSpeed:1559>: *** set ve freq to 360 Mhz ***
debug : cedarc <VeInitialize:1198>: ve init ok
debug : ionAlloc <__GetIonMemOpsS:985>:*** get __GetIonMemOpsS ***
debug : ionAlloc <ion_alloc_open:134>:begin ion_alloc_open
debug : omx_venc <init_h264_param:2820>:profile-venc=66, profile-omx=1, frame_rate:1966080, bit_rate:200000, idr:12, eColorFormat:00000013
debug : omx_venc <init_h264_param:2946>:Enable VBR. QpMin: 20. QpMax: 45. Bitrate: 200000.
debug : cedarc <determineVencColorFormat:167>:color format: VENC_PIXEL_YUV420P/I420
debug : omx_venc <openVencDriver:3184>:omx_venc base_config info: src_wxh:640x480, dis_wxh:640x480, stride:640
debug : ionAlloc <__GetIonMemOpsS:985>:*** get __GetIonMemOpsS ***
debug : omx_venc <openVencDriver:3221>:AVC 4 byte interleave nalu Disable.
debug : cedarc <VideoEncInit:195>: (f:VideoEncInit, l:195)
debug : cedarc <VideoEncInit:210>: (f:VideoEncInit, l:210)
debug : cedarc <BitStreamCreate:102>: BitStreamCreate OK
[avi @ 0x4c05b0] Non-monotonous DTS in output stream 0:0; previous: 19, current: 0; changing to 20. This may result in incorrect timestamps in the output file.
[avi @ 0x4c05b0] Non-monotonous DTS in output stream 0:0; previous: 20, current: 20; changing to 21. This may result in incorrect timestamps in the output file.
[avi @ 0x4c05b0] Non-monotonous DTS in output stream 0:0; previous: 21, current: 21; changing to 22. This may result in incorrect timestamps in the output file.
[avi @ 0x4c05b0] Non-monotonous DTS in output stream 0:0; previous: 22, current: 22; changing to 23. This may result in incorrect timestamps in the output file.
[avi @ 0x4c05b0] Non-monotonous DTS in output stream 0:0; previous: 23, current: 23; changing to 24. This may result in incorrect timestamps in the output file.
[avi @ 0x4c05b0] Non-monotonous DTS in output stream 0:0; previous: 24, current: 24; changing to 25. This may result in incorrect timestamps in the output file.
[avi @ 0x4c05b0] Non-monotonous DTS in output stream 0:0; previous: 25, current: 0; changing to 26. This may result in incorrect timestamps in the output file.
[avi @ 0x4c05b0] Non-monotonous DTS in output stream 0:0; previous: 26, current: 25; changing to 27. This may result in incorrect timestamps in the output file.
[avi @ 0x4c05b0] Non-monotonous DTS in output stream 0:0; previous: 27, current: 26; changing to 28. This may result in incorrect timestamps in the output file.
[avi @ 0x4c05b0] Non-monotonous DTS in output stream 0:0; previous: 28, current: 27; changing to 29. This may result in incorrect timestamps in the output file.
[avi @ 0x4c05b0] Non-monotonous DTS in output stream 0:0; previous: 29, current: 28; changing to 30. This may result in incorrect timestamps in the output file.
[avi @ 0x4c05b0] Non-monotonous DTS in output stream 0:0; previous: 30, current: 29; changing to 31. This may result in incorrect timestamps in the output file.
[avi @ 0x4c05b0] Non-monotonous DTS in output stream 0:0; previous: 31, current: 30; changing to 32. This may result in incorrect timestamps in the output file.
[avi @ 0x4c05b0] Non-monotonous DTS in output stream 0:0; previous: 32, current: 31; changing to 33. This may result in incorrect timestamps in the output file.
debug : omx_venc <__AwOmxVencEmptyThisBuffer:2226>:vencInPort: empty_this_buffer 50 times
debug : omx_venc <__AwOmxVencFillThisBuffer:2278>:vencOutPort: fill_this_buffer 50 times
debug : omx_venc <__AwOmxVencEmptyThisBuffer:2226>:vencInPort: empty_this_buffer 50 times06x
debug : omx_venc <__AwOmxVencFillThisBuffer:2278>:vencOutPort: fill_this_buffer 50 times
debug : omx_venc <__AwOmxVencEmptyThisBuffer:2226>:vencInPort: empty_this_buffer 50 times04x
debug : omx_venc <__AwOmxVencFillThisBuffer:2278>:vencOutPort: fill_this_buffer 50 times
debug : omx_venc <__AwOmxVencEmptyThisBuffer:2226>:vencInPort: empty_this_buffer 50 times67x
debug : omx_venc <__AwOmxVencFillThisBuffer:2278>:vencOutPort: fill_this_buffer 50 times
debug : omx_venc <dealWithInputBuffer:3821>: set up impl->m_inBufEos flag.: 0x4c3760ed=3.88x
warning: omx_venc <dealWithInputBuffer:3872>:skip this input buffer, pInBufHd:0x4c3760,buffer_type=55565757,buf_size=0
debug : omx_venc <ComponentVencThread:4316>:(vdrvThread receive cmd[venc_cmd_enc_idle]
debug : omx_venc <ComponentVencThread:4316>:(vdrvThread receive cmd[venc_cmd_enc_idle]
debug : omx_venc <ComponentVencThread:4316>:(vdrvThread receive cmd[venc_cmd_enc_idle]
debug : omx_venc <ComponentVencThread:4316>:(vdrvThread receive cmd[venc_cmd_enc_idle]
[avi @ 0x4c05b0] Non-monotonous DTS in output stream 0:0; previous: 834, current: 831; changing to 835. This may result in incorrect timestamps in the output file.
frame= 238 fps= 33 q=-0.0 Lsize= 152kB time=00:00:27.86 bitrate= 44.6kbits/s speed=3.81x
video:127kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 19.980240%
debug : omx_venc <processThreadCommand:3317>:x set state command, cmd = main_thread_cmd_set_state, pCmdData = OMX_StateIdle.
debug : omx_venc <ComponentVencThread:4316>:(vdrvThread receive cmd[venc_cmd_enc_idle]
debug : omx_venc <ComponentVencThread:4316>:(vdrvThread receive cmd[venc_cmd_close]
debug : cedarc <VeRelease:1253>: ve release ok
debug : omx_venc <processThreadCommand:3317>:x set state command, cmd = main_thread_cmd_set_state, pCmdData = OMX_StateLoaded.
debug : cedarc <AwOmxComponentDeinit:47>:OMXCORE: aw_omx_component_deinit 4d24c8
debug : omx_venc <__AwOmxVencDeInit:2337>:COMPONENT_DEINIT
debug : omx_venc <processThreadCommand:3732>:x stop command.
debug : omx_venc <ComponentVencThread:4316>:(vdrvThread receive cmd[venc_cmd_stop]
debug : omx_venc <ComponentVencThread:4428>:vencThread detect nStopFlag[1], exit!
debug : cedarc <checkLibUnload:188>: Unloading the dynamic library for OMX.allwinner.video.encoder.avc
有大量的debug
Non-monotonous DTS in output stream 0:0; previous: 24, current: 24; changing to 25. This may result in incorrect timestamps in the output file.
这是怎么回事呢
最近编辑记录 w4dla (2021-08-23 17:25:52)
离线
@w4dla
Can you encode 720p and higher resolution with cedarx?
离线
离线
我发现V831/V833的SDK(来自 https://github.com/lindenis-org )中也有libcedarc/x库源码。并且可以选择添加openmax接口支持。但是当我勾选该选项时,编译失败。
SDK中的openmax/venc/omx_venc.h包含了SDK中libcedarc/include/vencoder.h文件。但后者似乎版本不对,前者要求的几个VencH265Param,VENC_CODEC_H265等对象,后者文件中没有。但在楼主发布在github上的libcedarc项目中,是有的。
恳请楼主分析一下是什么情况,谢谢!
离线
@jungle
楼主在 readme (https://github.com/aodzip/libcedarc) 里头写了一个 “Based on lindenis-v536 SDK”,我猜他发布的 libcedarc 可能是在 lindenis 的 libcedarc 上面添加、修改了代码,所以多出了某些功能?
离线
@jungle
楼主在 readme (https://github.com/aodzip/libcedarc) 里头写了一个 “Based on lindenis-v536 SDK”,我猜他发布的 libcedarc 可能是在 lindenis 的 libcedarc 上面添加、修改了代码,所以多出了某些功能?
楼主的工程有没有多出功能,我不清楚。
奇怪的是,我的那个SDK中引用的头文件缺少的东西,楼主这个工程的头文件却都有。
离线
有t113的编码资源吗
离线
请问有哪位大佬试过用这个 repo 的 h264 编码吗?效果如何呢?
我今天试了一下,发现 h264 硬编码的速度好像没问题,但是图像质量很差,640x480 的图像输入直接压缩成这样了
我用的指令是
ffmpeg -hide_banner -loglevel panic -f v4l2 -r 30 -t 15 -s 640x480 -i /dev/video0 -pix_fmt yuv420p -profile 100 -c:v
h264_omx output.avi
是有什么关于图像质量的参数没写对或者缺失了吗?
最近编辑记录 unturned3 (2022-08-01 15:37:56)
离线
@无痕
我丢了一个bmp序列去压缩。代码为:
ffmpeg -r 30 -f image2 -i charAni-%03d.bmp test.mp4
frame= 60 fps=4.2 q=31.0 Lsize= 738kB time=00:00:01.96 bitrate=3072.6kbits/s speed=0.137x
video:737kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.150880%
ffmpeg -r 30 -f image2 -i charAni-%03d.bmp -c:v h264_omx test_hard.avi
frame= 60 fps=8.9 q=-0.0 Lsize= 114kB time=00:00:02.10 bitrate= 446.1kbits/s speed=0.313x
video:107kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 6.588876%
第一个应该是软压缩(Lavf58.76.100 编码器),第二个是硬压缩(Lavc58.134.100 h264_omx) 编码器。
速度是快了很多。但是如楼上压摄像头那样,效果很差,码率很低。简单试了-b:v 1M 参数没效果,不影响输出文件。
离线
@unturned3
可以手动修改下库里qp的值
离线
这个是软编解码还是硬编解码?
离线
@unturned3
可以手动修改下库里qp的值
多谢多谢,我前几天也发现了…… openmax就是个渣渣
离线
想问一下,libcedarc的源代码上面是android.mk,那就是是用在安卓上的。那怎么修改移植到Linux
上?
离线
@w4dla
我也是遇到了这个so库找不到的问题,你解决了吗?
离线