Coder Social home page Coder Social logo

felixzhang7 / ffmpeg-hardware-decode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dlunion/ffmpeg-hardware-decode

0.0 0.0 0.0 29 KB

Use ffmpeg and NVCodec to hardware decode video or video stream. in DNN inference system

Makefile 5.06% C++ 89.40% Cuda 5.55%

ffmpeg-hardware-decode's Introduction

ffmpeg-hardware-decode

Use ffmpeg and NVCodec to hardware decode video or video stream. in DNN inference system

Decoder
 Video.mp4   ->   cuvid(GPU Decoder)   ->   GPU Memory  ->   Normialize Cuda Kernel   ->   
 float*  Channel  based   ->   DNN Inference

Input Format: Supported File/USB Camera/RTSP/RTMP/CustomStream etc.

Normialize Kernel: Subtract mean and divide std, convert YUV to BGR or RGB

Encoder
 Camera/Other Source   ->   nvenc(GPU Encoder)   ->   Custom Memory Stream/File

Output Format: Only supported mp4

Environment

  • ffmpeg 4.2

  • nasm 2.14.02

  • nv-codec-headers

  • opencv 4.2.0 [optional]

  • nvcodec-VideoCodecSDK 10.0.26

  • cuda 10.2

  • x264-snapshot-20190704-2245-stable

  • GPU 2080Ti [optional]

Or download all lean code ffmpeg.hw.lean.code.tar.gz

Startup

  • note: /datav/newbb/lean is root directory
    • โ€‹ /datav/newbb/lean/build lean code directory
    • โ€‹ /datav/newbb/lean/lean lean build result binary directory

Change the directory in *_build file, to your path

> mkdir build && mkdir lean
> cd build
> tar -zxvf ../ffmpeg.hw.lean.code.tar.gz
> mv Video_Codec_SDK_10.0.26 ../lean/
  • Change /datav/newbb/lean to your path, after to run this code
> bash nasm_build
> bash nvcodec_build
> bash x264_build
> bash ffmpeg_build
> bash opencv_build

Run examples

> make run -j8

ffmpeg-hardware-decode's People

Contributors

dlunion avatar

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.