Coder Social home page Coder Social logo

video-app's Introduction

Video App in C++

I'm building a visualisation tool for live music performances. The app generates video grids containing one video for every element in the song. For elements that are pre-recorded the videos will be pre-recorded. For elements that are played live, the videos will be taken from webcams/capture cards/live streams.

Example Grid

This video explains the function of the app in detail.

Programming live streams

This app is being developed live on weekly Youtube live-streams. They are announced ahead of time on my Youtube channel. You can also find all the previous streams on the C++ Real-time video processing playlist

Installation

1. Prerequisites

This app has 4 external dependencies:

  • CMake to build the project,
  • pkg-config to locate shared libraries,
  • FFmpeg to read and write video files.

On MacOS using Homebrew, run:

brew install cmake ffmpeg pkg-config

2. Clone

git clone https://github.com/youbaowu/video-app --recursive

The repository includes a submodule for GLFW, so make sure to recursively clone the repo. If CMake complains and says it can't find GLFW, it might be because you did not clone it properly. In that case, try:

git submodule update --init

3. Build

Inside the repo, create a build directory and run CMake within it:

mkdir build
cd build
cmake ..
make

4. Run

./video-app

Bonus: Webcam capture with AVFoundation

For webcam capture:

git checkout test/webcam
cd build
cmake ..
make
./video-app

This will use AVFoundation to display your webcam on the OpenGL surface.

Todo

  • Fix av_err2str build problem in gcc (see issue).
  • Fix YUVJ deprecation problem
  • Fix sws_scale() segmentation fault on gcc due to badly constructed output buffers
  • Consider switch to SDL?
  • Replace sws_scale() with hardware-accelerated alternative
  • Audio playback
  • Playback of multiple videos simultaneously

video-app's People

Contributors

youbaowu avatar

Watchers

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