Giter VIP home page Giter VIP logo

motiontk's Introduction

MotionTK

"Motion for OpenTK", or MotionTK for short, is a video playback library for OpenTK built on FFmpeg, inspired by the Motion library for SFML.

About

I was looking for a lightweight video playback library for OpenTK, but couldn't find anything that met my requirements. From my SFML days I remembered the Motion library by Zachariah Brown, so I rewrote a simplified version of it in C#.

Dependencies

To function properly, this library requires a working copy of OpenTK and some of the FFmpeg libraries. Specifically, these libraries are required:

  • OpenTK.dll
  • avcodec-58.dll
  • avformat-58.dll
  • avutil-58.dll
  • swresample-3.dll
  • swscale-5.dll

OpenTK itself requires OpenGL and OpenAL to be installed.

Usage

Videos are loaded by instantiating the DisplaySource class. From there, you can access the VideoPlayback property, which exposes a Draw function to render the current frame as well as the TextureHandle itself. The audio SourceHandle can be accessed via the AudioPlayback property. Playback control functions (Play, Pause and the like) are available via the DisplaySource instance. Don't forget to dispose all disposable instances you create!

For a working example check the "Sample" project included with the sources.

Contributing

If you experience any problems, please file a GitHub issue or contact me under [email protected].

You are of course also invited to fix it yourself and create a pull request :)

Known Issues

FFmpeg has trouble finding files with non-ASCII characters in their path.

motiontk's People

Contributors

atomcrafty avatar

Watchers

James Cloos avatar Stylianos Polychroniadis 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.