GithubHelp home page GithubHelp logo

mark-hoo / ofxomxplayer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jvcleave/ofxomxplayer

0.0 2.0 0.0 93.96 MB

OpenMax accelerated video player for openFrameworks on the Raspberry Pi

Makefile 0.68% C++ 56.61% GLSL 0.35% C 42.33% Shell 0.03%

ofxomxplayer's Introduction

STATUS: PERPETUAL DEVELOPMENT
Use [Releases] (https://github.com/jvcleave/ofxOMXPlayer/releases) unless you are contributing or looking for bleeding edge (requires blood). Releases contain tested versions that work for specific versions of openFrameworks.

CURRENT KNOWN MAJOR ISSUES:
Videos with and audio track (even silent) work best and allow more accurate looping/frame tracking

DESCRIPTION:
This is an openFrameworks video player addon for the Raspberry Pi. The video player is hardware accelerated and can provide textures to openFrameworks to be used for shaders, etc.

REQUIREMENTS:
GPU split set to 128 (may need to be higher for larger videos) openFrameworks version 0.8 or higher http://www.openframeworks.cc/setup/raspberrypi/

USAGE:
(NEW) Clone into openFrameworks/addons

There 2 modes of Playback, Direct (aka Non-textured) or Textured.

Direct:

  • Renders directly to the screen, no texture access or pixels. This is most similar to what you will see in omxplayer
  • By default is played fullscreen video
  • OF is still able to run other processes in the background.
  • 1080p video playback is typically good

Textured:
Allows the use of

  • shaders
  • pixel access
  • drawing overlays
  • 720p video works best here

Audio:

  • Audio can be played back through HDMI or headphone jack
  • May be disabled to save resources
  • initialVolume can be passed

Headphone jack may require this tweak:
https://gist.github.com/jvcleave/4972661

To use HDMI Audio you may need to add the below line to /boot/config.txt and reboot. See http://elinux.org/RPiconfig for more details

hdmi_drive=2

EXAMPLES:
example-basic:
Playback of video in texture mode (default)

example-multiple-players:
Simultaneous playback 2 videos in non-texture mode

example-playlist:
Playback of a folder of videos in texture mode

example-pixels:
Example of pixel access that is needed for OpenCv operations/Saving images, etc

example-restartMovie:
restart a movie by pressing "r" + ENTER in ssh session (or "r" on attached keyboard)

example-shader:
Use of shaders, fbos and video

example-multiple-players:

  • Multiple players
  • Usage of a display area to play non-textured video non-fullscreen

There may be other examples in Master branch but the above are most likely to remain

COMPRESSION RECOMMENDATIONS:

CREDITS:
Majority of the code is based off of https://github.com/popcornmix/omxplayer

with some modifications by xbmc: https://github.com/xbmc/xbmc

See addons/ofxOMXPlayer/libs/omxplayer/COPYING for license details inherited from omxplayer/xbmc

Thanks to OtherCrashOverride for helping me figure out the linking issue to enable callbacks https://github.com/OtherCrashOverride

Thanks to @bendenoz for help with the looping https://github.com/bendenoz

Test video files from: http://www.bigbuckbunny.org/index.php/download/

ofxomxplayer's People

Contributors

jvcleave avatar bigfatbrowncat avatar

Watchers

James Cloos 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.