您尚未登录。

#1 Re: 全志 SOC » 全志V3s采用UDP视频传输H264效果很好 » 2022-03-03 23:22:17

hello,
what is the maximum resolution for video encoding you can get?
how much cpu is loaded when encoding and sending with udp?

#3 Re: 全志 SOC » v3s hardware h264 encoder » 2021-12-02 18:11:29

unturned3 说:

That is strange... Do you know which part of the driver program is invoking frequently copy_to_user? I suppose using memory mapping would be a more efficent way to transfer data from the kernel to userspace, but maybe special circumtances in the driver doesn't allow that.

I don't remember exactly, but it is related with V4L2. I found it by using perf tool. I launched ffmpeg with perf command. It can record events and show cpu usage by various functions/libraries/programs. I dont have enugh skills to deal this problem

#4 Re: 全志 SOC » v3s hardware h264 encoder » 2021-12-02 04:17:07

p3im4n 说:

HI Mr @niyazfattahov

HAve you solved  "data - cpu load 100%" problrm?


hi
no, I didn't find solution.
I think it is related with memory transaction, all I found out is that function like copy_from_user() consuming cpu ~ 40% at least

#6 Re: 全志 SOC » 荔枝派zero主线内核使用cedar硬编码和RTMP推流的网络摄像机 » 2021-10-19 20:21:10

Hello, why libomxil-bellagio.so is listed in cmakelist? I removed him and it works fine without him.
I'm streaming 1280x720 and get low fps ~15, could you please explain me whats the reason for that? I see cpu load ~ 86%, but cannot understand whats the reason.
I use buildroot-2021.08 & linux-5.13.9, the camera is ov5640

#7 Re: 全志 SOC » V3s使用gstreamer的插件openmax调用cedar硬解码,荔枝派zero测试通过 » 2021-09-14 14:48:52

can I encode video from  camera using gst-launch?

I add this

[omxh264enc]
type-name=GstOMXH264Enc
core-name=/usr/lib/libOmxCore.so
component-name=OMX.allwinner.video.encoder.avc
rank=0
in-port-index=0
out-port-index=1
When I run
gst-launch-1.0 -vvv v4l2src device=/dev/video0 num-buffers=1000 ! 'video/x-raw, width=640, height=480, format=(string)I420' ! omx264enc ! avimux ! filesink location=videotestsrc.avi

WARNING: erroneous pipeline: no element "omx264enc"


with ffmpeg I can encode max 640x480 at ~ 53fps with cedarx codec and libcedarc from aodzip and get 100% cpu load

#8 全志 SOC » V3S ISP support in mainline » 2021-09-12 21:28:08

niyazfattahov
回复: 1

I found ISP support recently added for v3s, but I cannot understand where to find patch and how to apply it.
Does anybody interested in ISP module for v3s?(Image Signal Processing)

https://www.spinics.net/lists/arm-kernel/msg919938.html

#9 Re: 全志 SOC » 编解码引擎 CedarX for Mainline Linux v5.4 » 2021-08-23 20:53:48

@w4dla
Can you encode 720p and higher resolution with cedarx?

#11 Re: 全志 SOC » 编解码引擎 CedarX for Mainline Linux v5.4 » 2021-07-26 13:47:05

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

#12 Re: 全志 SOC » 编解码引擎 CedarX for Mainline Linux v5.4 » 2021-07-25 16:26:48

@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)

#13 Re: 全志 SOC » v3s hardware h264 encoder » 2021-07-24 21:59:51

@sprintf
Thank you for help, I succesfully run cedarx in linux 5.4, but I can encode 640x480 at 50fps max from ov5640 camera data - cpu load 100%. How many fps do you get ?

#14 Re: 全志 SOC » 编解码引擎 CedarX for Mainline Linux v5.4 » 2021-07-24 21:56:26

@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%

#15 Re: 全志 SOC » licheepi zero BSP 内核(linux3.4) 编译教程 » 2021-07-21 02:31:35

Hello, which is the maximum resolution and fps can be achieved in BSP version video encoding?

#17 全志 SOC » V3S SPI-NOR flash booting problem » 2021-07-02 18:35:44

niyazfattahov
回复: 1

Hello I have a problem when booting from spi like this:


U-Boot SPL 2019.10 (Jul 02 2021 - 13:04:54 +0300)
DRAM: 64 MiB
SPL: Unsupported Boot Device!
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

How can this be solved?

I use this as reference and performed all steps:
http://nano.lichee.pro/build_sys/build_flash.html#id16
https://whycan.com/t_4566.html#p45289

Uboot, linux and sunxi-fel succesfully detecting spi-nor flash (w25q128).

#18 全志 SOC » v3s hardware h264 encoder » 2021-06-30 17:41:11

niyazfattahov
回复: 9

Hello, Does anybody have success with hardware encoder CedarX from aodzip? I've compiled it in buildroot 2020.02.1 & linux-5.4.31
I see in logs when linux is booting:

[    1.447975] sunxi-cedar 1c0e000.video-codec: sunxi cedar version 0.01alpha
[    1.455128] sunxi-cedar 1c0e000.video-codec: cedar-ve the get irq is 23

when I try use it with ffmpeg with this command: 
ffmpeg  -f lavfi -i testsrc=duration=2:size=1280x720:rate=30 testsrc.h264 -y
I get:

# ffmpeg  -f lavfi -i testsrc=duration=2:size=1280x720:rate=30 testsrc.h264 -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 @ 0x6d440] libOMX_Core.so not found
[h264_omx @ 0x6d440] 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
Conversion failed!

#19 Re: 全志 SOC » 摄像头驱动 主线DVP与MIPI-CSI2 » 2021-06-27 01:38:53

dts.rar
Hello, do I have right dt for ov5640 camera dvp-csi? How can I grab image/video from this camera? What kernel config should I select?
I have media-ctl v4l2. fswebcam and e.t.c.
I tried
fswebcam -r 1920x1080 img.jpg

--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Error starting stream.
VIDIOC_STREAMON: Invalid argument
Unable to use mmap. Using read instead.
Unable to use read.

I tried:
ffmpeg -f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0 output.jpg

What I need to do in order to get some image/video?
How camera is configured from linux to select custom resolution?
I'm using Buildroot 2020.02.01 & linux 5.4.31

#20 Re: 全志 SOC » 编解码引擎 CedarX for Mainline Linux v5.4 » 2021-06-23 04:15:01

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

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn