← Back

ofxHPVPlayer

github.com/vjacob/ofxHPVPlayer · @vjacob
OF 0.11 Archived Video/Camera

Cross-platform C++ toolset for playing high-res and high-fps video content.

133 30 Last commit 3y ago Created 9y ago

Forks

Forks pushed to more recently than vjacob/ofxHPVPlayer itself, plus any admin-confirmed fork with commits of its own — worth checking if you're hitting issues with the original.

Jonathhhan/ofxHPVPlayer by @Jonathhhan · ★ 0 · pushed 3y ago

README

ofxHPVPlayer



Description



The HPV (High Performance Video) Eco-system is a cross-platform C++ toolset for playing back high resolution and high framerate video content.

The HPV Eco-system was originally created by the Belgian University of Hasselt/EDM / iMinds in the context of the European funded FP7 programme Dreamspace. Its aim was to build an open and cross-platform toolset for the Unity game-engine giving the ability to realize immersive video installations using multiple calibrated projectors. This project was baptized Holo_ToolSet and contains all the necessary tools to calibrate a multi-projector physical setup, author content for displaying onto this surface and finally render out the mapped content onto the surface, all in Unity. One part of this toolset, the HPV library, aimed at realizing high-res/high-fps videoplayback independant of any platform specific media framework for immersive VR goals. This software, as well as a working Windows 64bit plugin for Windows and example Unity projects, can be found in the original repository of the project Holo_ToolSet.

ofxHPVPlayer is a partial fork of this technology allowing to use and playback HPV encoded video files in openFrameworks. Created HPV files can be played both in Unity and openFrameworks.

alt text

Features



Supported filetypes are: png, jpeg, jpg, tga, gif, bmp, psd, gif, hdr, pic, ppm, pgm alt text

Conditions



``C++

include "ofMain.h"

include "ofApp.h"



int main( ) { ofGLWindowSettings settings; settings.width = 1024; settings.height = 512; settings.windowMode = OF_WINDOW; settings.setGLVersion(4, 1); ofCreateWindow(settings); ofRunApp(new ofApp()); }
- Doesn't support audio playback (yet). Check the example-slave-to-audio example on how to achieve audio-video sync with the built-in openFrameworks audioplayer.

Getting Started

  • Creating HPV files with the HPVCreator. There exist a Qt UI version and a console version, both cross-platform. Or download the example HPV files here.
  • Generate the example project files using the openFrameworks Project Generator.
  • A good place to start is the example-controls project. Play around with the GUI to discover its functionality.
  • Minimal code that you need to play an HPV file:
C++ //-------------------------------------------------------------- void ofApp::setup() { / Init HPV Engine / HPV::InitHPVEngine(); / Create resources for new player / hpvPlayer.init(HPV::NewPlayer()); / Try to load file and start playback / if (hpvPlayer.load("bbb_export.hpv")) { hpvPlayer.setLoopState(OF_LOOP_NORMAL); hpvPlayer.play(); } / Enable vertical sync, if file has fps > 60, you might have to set to false / ofSetVerticalSync(true); / Alternatively, if you experience playback stutter, try to toggle double-buffering true/false Default: OFF hpvPlayer.setDoubleBuffered(true); / }

//-------------------------------------------------------------- void ofApp::update() { /
Update happens on global level for all active players by HPV Manager / HPV::Update(); }

//-------------------------------------------------------------- void ofApp::draw() { /
Draw the texture fullscreen / ofBackground(0); hpvPlayer.draw(0,0,ofGetWidth(), ofGetHeight()); }

//-------------------------------------------------------------- void ofApp::exit() { /
Cleanup and destroy HPV Engine upon exit */ HPV::DestroyHPVEngine(); }
`

Documentation



  • Check the examples showcasing different HPV functionalities.
  • Pre-compressed HPV video files accompanying the examples can be found here. Download the appropiate HPV file by looking at the examples and put it in the respective bin/data folder
  • example-simple: This is a barebones example on how to play an HPV file.
  • example-controls: This showcases (almost) all functionality available in the HPV system.
  • example-slave-to-audio: Sync a HPV video file to an audio file with exactly the same length.
  • example-360video: Play high-res 360 VR video content. Switch between equirectangular (latlong) and perspective modes.
  • example-sync-multiple-videos: This example syncs 4 FullHD files that were the result of splitting one 4K video file.
alt text alt text

Compatibility



  • Built and tested with OF 0.9.8
  • Tested on Windows 7, 8 and 10.
  • Tested on Max OSX 10.12.4 (should work until 10.9)
  • Tested on Ubuntu Desktop 16.04

Licensing



See
LICENSE.md

Included libraries

Contributing



Pull Requests are welcomed:

1. Fork this repository. 2. Create your feature branch (
git checkout -b my-new-feature). 3. Commit your changes (git commit -am 'Add some feature'). 4. Push to the branch (git push origin my-new-feature`). 5. Create new Pull Request.

Get this addon

HTTPS
SSH