Giter VIP home page Giter VIP logo

ffmpeg_h264_h3's Introduction

ffmpeg_h264_H3

h264 encoder support for Allwinner H3 CPU

These are modified sources of the port of FFmpeg for Cedrus originally located here: https://github.com/stulluk/FFmpeg-Cedrus To use these sources checkout original sources and replace file FFmpeg-root-dir/libavcodec/cedrus264.c with one from this repository, replace folder FFmpeg-root-dir/libavcodec/arm/sunxi with folder from this repository.

./configure --prefix=/usr --enable-nonfree --enable-gpl --enable-version3 --enable-vdpau --enable-libx264 --enable-libmp3lame --enable-libpulse --enable-libv4l2

and then, make && sudo make install

ffmpeg_h264_h3's People

Contributors

josaine avatar uboborov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ffmpeg_h264_h3's Issues

top

Добрый день. Хотел узнать, какая загрузка процессора Allwinner H3? и можете ли вы протестировать ещё на rtsp?

Low quality online video

Hello.

I use a NanoPi NEO Core SoC with a 4.14.111 armv7l core

Thanks to your repository https://github.com/uboborov/sunxi-cedar-mainline I was able to build your driver for my configuration

$ dmesg | grep cedar
[    6.149956] sunxi cedar version 0.1
[    6.150347] [cedar]: install start!!!
[    6.150579] cedar_ve: cedar-ve the get irq is 55
[    6.150638] sunxi-cedar 1c0e000.video-engine: assigned reserved memory node cma@4a000000
[    6.265098] [cedar]: memory allocated at address PA: 4B200000, VA: CB200000
[    6.265112] [cedar]: install end!!!
 
$ ls -l /dev/cedar_dev
crw------- 1 root root 150, 0 Jun  8 03:18 /dev/cedar_dev

With your patch for the 3 version https://github.com/uboborov/ffmpeg_h264_H3 built ffmpeg

$ ./ffmpeg.old -codecs | grep 264
ffmpeg version git-2015-01-22-f86a076 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jun  7 2022 13:36:59 with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.12) 20160609
  configuration: --prefix=/usr --enable-nonfree --enable-gpl --enable-version3 --enable-vdpau --enable-libx264 --enable-libmp3lame --enable-libpulse --enable-libv4l2
  libavutil      54.  6.100 / 54.  6.100
  libavcodec     56.  0.101 / 56.  0.101
  libavformat    56.  2.100 / 56.  2.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.102 /  5.  0.102
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (encoders: libx264 libx264rgb cedrus264 )

And everything seems to run, for example, on some rtsp server (whether I take mjpeg or h264 from the camera does not matter)

# ./ffmpeg.old -f v4l2 -input_format mjpeg -video_size 1920x1080 -i /dev/video0 -c:v cedrus264 -x264-params keyint=30 -pix_fmt nv12 -preset ultrafast -b:v 1M -f rtsp -rtsp_transport tcp rtsp://…
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 3390538.306844, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg), 1920x1080 [SAR 1:1 DAR 16:9], -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
[swscaler @ 0xf41700] deprecated pixel format used, make sure you did set range correctly
[VDPAU SUNXI] VE version 0x1680 opened.
[rtp @ 0xf618c0] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
Output #0, rtsp, to 'rtsp://...':
  Metadata:
    encoder         : Lavf56.2.100
    Stream #0:0: Video: h264 (cedrus264), nv12, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 1000 kb/s, 30 fps, 90k tbn, 30 tbc
    Metadata:
      encoder         : Lavc56.0.101 cedrus264
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (cedrus264))

Of course, I see a significant reduction in CPU load compared to using libx264, BUT I just get a decadent fps of about 5 frames per second and at the same time there is still a green stripe at the bottom along the entire video all the time.
Perhaps my SoC just can't do it anymore, but I did parallel decoding and encoding on the libav api from ffmpeg and get about 10 fps for mjpeg and about 19 fps for h264, while the picture does not hang statically with artifacts (not taking into account transmission losses).

PLEASE tell me at least the direction is it possible to somehow hardware speed up and improve video quality?
I am currently using ffmpeg version 5, so I have an idea to transfer the codec, does this make sense in the context of the previous question?

Which commit compiles with this code ?

Almost!
We might need the "git log" of the commit you are using to compile ffmpeg, cause i got:

The lastest version doesn't compile.
libavcodec/libx264.c:742:9: error: ‘x264_bit_depth’ undeclared (first use in this function); did you mean ‘x264_picture_t’? if (x264_bit_depth == 8) ^~~~~~~~~~~~~~ x264_picture_t make: *** [common.mak:49: libavcodec/libx264.o] Error 1
Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.