• Posts

  • Joined

  • Last visited

Everything posted by ubobrov

  1. This is a bit incorrect. libvdpau-sunxi is using for decoding only. The Cedrus legacy driver has been supported to run on mainline kernel as KLM.
  2. None of these images work on H5. Unfortunetely, encoder doesn't work on H5
  3. Here are the Armbian bionic images with installed RTSP streamer using H264 HW encoding on Allwinner H3 boards Orange Pi One Orange Pi Zero Images are able to run on any board with Allwinner H3
  4. Your problem is in Pi Zero's memory. To make driver loaded without errors you should load it on startup. #! /bin/sh ### BEGIN INIT INFO # Provides: cedrus # Required-Start: $syslog # Required-Stop: $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start daemon at boot time # Description: Enable service provided by daemon. ### END INIT INFO /sbin/insmod /lib/modules/sunxi_cedar.ko exit 0
  5. Decoding H264 and X11 rendering using vdpau_sunxi, libcedrus, kernel 4.20.17, mpv, vncserver and Armbian Bionic on Orange PI Zero libvdpau: https://github.com/uboborov/libvdpau-sunxi-H3.git libcedrus: https://github.com/uboborov/libcedrus-H3.git cedar_dev: https://github.com/uboborov/sunxi-cedar-mainline.git mpv, ffmpeg, x11 installed using apt It works extremely slow but it's just a beginning ) video: https://www.youtube.com/watch?v=9O7L_kaEDdk UPD: video on Orange PI One 1280x720 HDMI (works pretty fine) https://www.youtube.com/watch?v=8qPyOG-yJIw
  6. i can't tell you anything about 5x kernel. i haven't tested it yet.
  7. that happens because of the kernel you're using. be careful with the node: reserved-memory { #address-cells = <1>; #size-cells = <1>; ranges; cma_pool: cma@43c00000 { compatible = "shared-dma-pool"; reusable; reg = <0x43c00000 0x6000000>; linux,cma-default; }; }; it should look like above. to check everything is alright with the CMA, you should check CMA on kernel boot: dmesg | grep CMA [ 0.000000] Reserved memory: created CMA memory pool at 0x43c00000, size 96 MiB it must look like above good luck
  8. check what u-boot prints on boot, check your boot.cmd content from which you've made boot.scr
  9. Here the step-by-step instruction how to build and test the encoder from scratch on Orange PI zero board it has been written and tested today.
  10. i don't know what you should use. i can only tell you what i use. everything except ffmpeg and libvdpau-sunxi i build on Linux 4.15.0-70-generic #79~16.04.1-Ubuntu SMP Tue Nov 12 14:01:10 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux arm-linux-gnueabihf-gcc (crosstool-NG linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04) 4.7.3 20130328 (prerelease) 4.3.3 ffmpeg and libvdpau-sunxi i build on the target device (orange pi zero or pc in my case) Linux gateway 4.20.17 #3 SMP Tue Nov 12 17:19:54 MSK 2019 armv7l GNU/Linux gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516 BOARD=orangepizero BOARD_NAME="Orange Pi Zero" BOARDFAMILY=sun8i BUILD_REPOSITORY_URL=https://github.com/armbian/rkbin BUILD_REPOSITORY_COMMIT=51d55a4 VERSION=5.90 LINUXFAMILY=sunxi BRANCH=next ARCH=arm IMAGE_TYPE=stable BOARD_TYPE=conf INITRD_ARCH=arm KERNEL_IMAGE_TYPE=zImage if you want to watch a movie on your target board you have to build more tools than just ffmpeg. i don't know what exactly tools you do need.
  11. i have never bump into building error of the ffmpeg on armbian+orange pi pc or pi zero. as far as i heard some errors could appear because of memory lack on the building host. i recommend you to try configure ffmpeg with --disable-static --enable-shared options to reduce memory usage during linkage.
  12. i can't figure out what your problem in. i do almost the same except the os and everything goes alright. take a look at this:
  13. perhaps you have lost some steps on building ffmpeg or done something wrong. on the target device: git clone https://github.com/stulluk/FFmpeg-Cedrus.git git clone https://github.com/uboborov/ffmpeg_h264_H3.git cp /root/ffmpeg_h264_H3/cedrus264.c /root/FFmpeg-Cedrus/libavcodec/cedrus264.c cp -R /root/ffmpeg_h264_H3/sunxi /root/FFmpeg-Cedrus/libavcodec/arm apt-get install libpulse-dev libv4l-dev libmp3lame-dev libx264-dev cd FFmpeg-Cedrus ./configure --prefix=/usr --enable-nonfree --enable-gpl --enable-version3 --enable-vdpau --enable-libx264 --enable-libmp3lame --enable-libpulse --enable-libv4l2 make -j 4 make install
  14. i build ffmpeg and libvdpau-sunxi on the target device. kernel and other tools i build on the host machine. i build kernel without modules. all drivers are builtin for my tests i use the armbian image on the SD card. i simply copy the kernel (zImage), device tree blob (dtb) and customized boot script (boot.scr) to the /boot folder on the SD and reboot the board boot script (script.cmd) looks like that: setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait panic=10 load mmc 0:1 0x43000000 /boot/sun8i-h2-plus-orangepi-zero-4.20.17.dtb load mmc 0:1 0x42000000 /boot/zImage-4.20.17 bootz 0x42000000 - 0x43000000
  15. actually it's not mine. i've just adjusted it to run on 4.x kernel. the encoder supports baseline profile only.
  16. it's not implemented in v4l2-request and VAAPI but it is perfectly implemented on using old cedrus driver and mainline linux-4.20.17
  17. it's working method for boards based on h2+ and h3, even for a20. at least i built and tested it on pi zero, pi pc, cubieboard2. the latest modifications of the cedrus driver were made on the last week.
  18. You won't get hardware acceleration for encoding h264 because v4l2_request api available for decoding only. If you want to get hardware acceleration for encoding you should: 1. download mainline linux-4.20.17 2. clone repo https://github.com/uboborov/sunxi-cedar-mainline 3. replace or modify device tree files from folder 4.20.17 of the repo (add CMA node and VE node) in the kernel folder 4. build the kernel following instructions from 4.20.17 folder 5. build the cedrus driver from the stage 2 6. clone repo https://github.com/uboborov/ffmpeg_h264_H3 and follow the instructions in the readme file to build ffmpeg with hw h264 support or 7. clone repo https://github.com/uboborov/cedrus to build standalone h264 encoder and use it somehow like: insmod sunxi_cedar.ko ffmpeg -f v4l2 -video_size 640x480 -i /dev/video0 -pix_fmt nv12 -r 25 -f rawvideo pipe: | ./h264enc - 640 480 test.h264
  19. linux-5.3.5 mainline kernel is actually no matter the board it is going to run on. Your OrangePi One has H3 onboard and the kernel has the device tree for your board (sun8i-h3-orangepi-one.dts). I don't really see any problem to try it out.
  20. I've got ffmpeg working with v4l2_request api on Allwinner H3 (orange pi pc). It achieved in a few steps: 1. Download FFmpeg https://github.com/xbmc/FFmpeg/archive/4.0.4-Leia-18.4.tar.gz 2. Patch it with https://github.com/LibreELEC/LibreELEC.tv/tree/master/packages/multimedia/ffmpeg/patches 3. Download mainline kernel 5.3.5 4. Patch it with https://github.com/LibreELEC/LibreELEC.tv/tree/master/projects/Allwinner/patches/linux 5. Copy linux headers on rootfs /usr/include after kernel built: make headers_install ARCH=arm INSTALL_HDR_PATH=/your/path/to/headers 6. Install libdrm-dev and libudev-dev before configuring FFmpeg 7. Configure FFmpeg with: /configure --enable-v4l2-request --enable-libudev --enable-libdrm --enable-shared --disable-static \ --disable-openssl --disable-gray --disable-vaapi --disable-vdpau --disable-rkmpp 8. Build FFmpeg on the target machine (orange pi pc in my case) That's it ) ffmpeg -re -hwaccel drm -i Big_Buck_Bunny_720_10s_2MB.mp4 out.avi FFmpeg perfectly uses HW acceleration on decoding H264.