Coder Social home page Coder Social logo

xyx12810 / ffmpeg-media-codec-pipeline Goto Github PK

View Code? Open in Web Editor NEW

This project forked from breakingy/ffmpeg-media-codec-pipeline

0.0 0.0 0.0 7.69 MB

ffmpeg实现音视频(H264/H265/AAC)封装、解封装、编解码pipeline,支持NVIDIA硬编解码

License: MIT License

C++ 97.75% C 2.12% CMake 0.13%

ffmpeg-media-codec-pipeline's Introduction

FFmpeg-Media-Codec-Pipeline

ffmpeg实现音视频封装、编解码pipeline

  • 用ffmpeg实现对音视频解封装、重采样、编解码、封装(MP4),并采用模块化和接口化管理

  • 实现了视频的硬编解码,仅支持英伟达显卡。支持软硬编解码自动切换(优先使用硬编解码、不支持则自动切换到软编解码,ffmpeg需要在编译的时候添加Nvidia硬编解码功能)

  • 支持格式,视频:H264/H265,音频:AAC

  • 代码包含四个模块,如下图所示:

    未命名绘图

  • Warpper实现了对四个模块的组合,如下图所示: 媒体流程

  • 采用模块化和接口化的管理方式,可自行组装扩展形成业务pipeline,比如把解封装模块换成RTSP客户端模块,就可以实现从rtsp拉取实时音视频流;或者添加视频处理模块、音频处理模块,对解码后的音视频进行处理,例如,AI检测、语音识别等。

  • 日志使用的spdlog,地址:https://github.com/gabime/spdlog

Linux编译

  • ffmpeg版本:>=4.x 如果ffmpeg没有安装在/usr/local下面请修改CMakeLists.txt,把头文件和库路径添加进去
  • mkdir build
  • cmake ..
  • make -j
  • 测试:./MediaCodec ../Test/test1.mp4 out.mp4 && ./MediaCodec ../Test/test2.mp4 out.mp4

TODO

  • 同步优化

技术交流

ffmpeg-media-codec-pipeline's People

Contributors

breakingy 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.