GithubHelp home page GithubHelp logo

coollibs / easy_ffmpeg Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 162.13 MB

Simplifies including the FFmpeg libraries. And adds wrappers for some common operations.

License: Boost Software License 1.0

CMake 0.42% C++ 3.27% C 96.31%

easy_ffmpeg's Introduction

easy_ffmpeg

This wrapper around FFmpeg libraries makes it very easy to use them in your own project, cross-platform, and even shipping an executable to end users. You can either use it just to include the FFmpeg libraries, or you can also use our wrappers to simplify some common tasks like decoding a video.

Including

To add this library to your project, simply add these three lines to your CMakeLists.txt:

add_subdirectory(path/to/easy_ffmpeg)
target_link_libraries(${PROJECT_NAME} PRIVATE easy_ffmpeg::easy_ffmpeg)
ffmpeg_copy_libs(${PROJECT_NAME}) # This will make sure the shared libraries get installed next to the executable.

On Linux, you will also need to install the FFMPEG libraries with

sudo apt-get install libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libpostproc-dev libswresample-dev libswscale-dev

On Mac, you will also need to install the FFMPEG libraries with

brew install ffmpeg

Then include it as:

#include <easy_ffmpeg/easy_ffmpeg.hpp>

Learning about FFmpeg

If you need to use the raw FFmpeg API, here are the few tutorials that we managed to find:

Shipping an application

โš  You need to be mindful of the LICENSE of FFmpeg. This wrapper provides a GPL version of FFmpeg on Windows, so you are not allowed to use it in a closed-source software (you can replace the libs in lib/FFmpeg/windows if you need to, and the LICENSE in lib/FFmpeg). There are also several other things to do to comply with their license, see https://ffmpeg.org/legal.html

NOTE: Since FFmpeg libs need to be linked dynamically:

  • On Windows to ensure that end-users have the FFmpeg libs on their machine we copy them to the folder where your executable is created. If you send your executable to someone, you need to also share the libs. And if you create an installer, it will automatically include the libs so there is nothing to do in that case.
  • On Linux and MacOS you need to tell your users to install FFMpeg manually, with sudo apt-get install ffmpeg on Linux and brew install ffmpeg on MacOS (+ install Homebrew if they don't have it already)

Running the tests

Simply use "tests/CMakeLists.txt" to generate a project, then run it.
If you are using VSCode and the CMake extension, this project already contains a .vscode/settings.json that will use the right CMakeLists.txt automatically.

easy_ffmpeg's People

Contributors

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