Giter VIP home page Giter VIP logo

ogre-ffmpeg-videoplayer's Introduction

A video player engine for Ogre3D using FFmpeg. Includes a demo application using SDL2 for audio output.

This project is forked to fix a compilation issue with our build system.

License

MIT license (see License.txt)

Features

  • Uses Ogre's resource system to open the video file, so it could be coming from an archive, or a network resource, etc.
  • Writes the video to an Ogre texture, which can be used however you want (on an overlay, or somewhere in the scene, etc)
  • Complete A/V sync solution.
  • Multithreaded decoding.
  • Basic playback control support: play/pause, seeking.
  • Works with a variety of FFmpeg versions, including the Libav fork.
  • Audio resampling support (using ffmpeg's swresample / libav's avresample library): can convert audio to the user's desired sample rate, sample format and channel layout.
  • No audio library dependency. Audio is handled by a MovieAudioFactory, which can be implemented by the user. If no MovieAudioFactory is given, videos are played without sound. An example MovieAudioFactory using SDL_audio is included in the demo.
  • Fun fact: Also works with audio-only files, so you can use it as a streaming audio player, if you want.

Dependencies

Video player engine dependencies:

  • FFmpeg
  • Ogre 1.9+
  • boost_thread

Dependencies for the demo:

  • SDL2 for audio output
  • OIS for keyboard controls

Building

The demo can be built the usual cmake way:

mkdir build
cd build
cmake ..
make

Running

Place your video files in the build folder, then run the demo using a filename as argument:

./ogre-ffmpeg-videoplayer-demo big_buck_bunny.avi

Playback controls:

  • Space: Play/Pause
  • Left/Right: Seek by 5 seconds.
  • Down/Up: Seek by 30 seconds.

ogre-ffmpeg-videoplayer's People

Contributors

hhyyrylainen avatar jjonj avatar

Watchers

 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.