Jump to content

ubobrov

Members
  • Posts

    20
  • Joined

  • Last visited

Reputation Activity

  1. Like
    ubobrov got a reaction from Dan MacDonald in 4kp30 video on Orange Pi Lite and mainline hardware acceleration   
    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.
  2. Like
    ubobrov got a reaction from gounthar in Understanding Hardware-Accelerated Video Decoding   
    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.
  3. Like
    ubobrov got a reaction from P.P.A. in Understanding Hardware-Accelerated Video Decoding   
    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.
  4. Like
    ubobrov got a reaction from Magnets in 4kp30 video on Orange Pi Lite and mainline hardware acceleration   
    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.
  5. Like
    ubobrov got a reaction from gounthar in 4kp30 video on Orange Pi Lite and mainline hardware acceleration   
    None of these images work on H5. 
    Unfortunetely, encoder doesn't work on H5
  6. Like
    ubobrov got a reaction from Adam08 in 4kp30 video on Orange Pi Lite and mainline hardware acceleration   
    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
     
     
  7. Like
    ubobrov got a reaction from gounthar in 4kp30 video on Orange Pi Lite and mainline hardware acceleration   
    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
     
     
  8. Like
    ubobrov got a reaction from Tido in 4kp30 video on Orange Pi Lite and mainline hardware acceleration   
    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
     
     
  9. Like
    ubobrov got a reaction from gounthar in 4kp30 video on Orange Pi Lite and mainline hardware acceleration   
    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
     
  10. Like
    ubobrov got a reaction from gounthar in 4kp30 video on Orange Pi Lite and mainline hardware acceleration   
    check what u-boot prints on boot,
    check your boot.cmd content from which you've made boot.scr
  11. Like
    ubobrov got a reaction from manuti in 4kp30 video on Orange Pi Lite and mainline hardware acceleration   
    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.
     
  12. Like
    ubobrov got a reaction from gounthar in 4kp30 video on Orange Pi Lite and mainline hardware acceleration   
    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.
     
  13. Like
    ubobrov got a reaction from gounthar in 4kp30 video on Orange Pi Lite and mainline hardware acceleration   
    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  
  14. Like
    ubobrov got a reaction from gounthar in 4kp30 video on Orange Pi Lite and mainline hardware acceleration   
    actually it's not mine. i've just adjusted it to run on 4.x kernel.
    the encoder supports baseline profile only.
  15. Like
    ubobrov got a reaction from gounthar in Which H2+/H3/H5/H6 board for H.264 encoding   
    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
  16. Like
    ubobrov got a reaction from gounthar in 4kp30 video on Orange Pi Lite and mainline hardware acceleration   
    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  
  17. Like
    ubobrov got a reaction from gounthar in 4kp30 video on Orange Pi Lite and mainline hardware acceleration   
    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.
  18. Like
    ubobrov reacted to divis1969 in HW accelerated video decoding/encoding on BPI M?   
    I have reworked ffmpeg's cedrus264 encoder to use libcedrus and modified libcedrus to allow few clients to use VE (in the same process).
    How it is possible to use both vdpau-sunxi decoder and cedrus264 encoder to transcode the video.
    The results for
    ./ffmpeg -hwaccel vdpau -i big_buck_bunny_720p_H264_AAC_25fps_3400K.MP4 -pix_fmt nv12 -r 5 -an -b:v 64k -c:v cedrus264 stream.mp4 are the following:
    Video is viewable, CPU usage is ~80-90%, FPS while encoding ~6.7, time real 0m56.523s, user 0m28.210s, sys 0m15.720s
    It is not as good as I was expecting though. Perhaps, copying data in memory is a bottleneck.
    Not sure it could be improved
     
    The code is located at https://github.com/divis1969/libcedrus (branch master) and https://github.com/divis1969/FFmpeg (branch 2.8-cedrus)
  19. Like
    ubobrov got a reaction from manuti in 4kp30 video on Orange Pi Lite and mainline hardware acceleration   
    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.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines