An open API service indexing awesome lists of open source software.

https://github.com/59de44955ebd/ffmpeghapglplayer

mattbeghin's FFmpegHapGlPlayer as VS2017 project (pre-configured for x64 Release only)
https://github.com/59de44955ebd/ffmpeghapglplayer

ffmpeg hap opengl vs2017 windows

Last synced: 2 months ago
JSON representation

mattbeghin's FFmpegHapGlPlayer as VS2017 project (pre-configured for x64 Release only)

Awesome Lists containing this project

README

        

# FFmpegHapGlPlayer

This repo contains "[FFmpegHapGlPlayer](https://github.com/mattbeghin/FFmpegHapGlPlayer)" as VS2017 project, and includes all required binary libs and include files to build for x64 Release. If you want to build for Win32 and/or Debug, you have to configure and compile the needed libs (ffmpeg, SDL2, snappy) yourself.

Matt's original FFmpegHapGlPlayer repo:
https://github.com/mattbeghin/FFmpegHapGlPlayer

Original README:

Very simple cross-platform code to playback a HAP video file using FFMPEG for demuxing and HapDecode/OpenGL for decoding.
It handles Hap, Hap Alpha, HapQ but not HapQ+Alpha since it's not recognized by ffmpeg today (july 2018).

The idea in this project is to demonstrate how to:
- demux a HAP video file using FFmpeg / libavformat
- decompress the snappy compression using HapDecode
- send the compressed DXT buffer to an OpenGL texture (or two if HapQ+Alpha but this format is not yet supported in FFMPEG...)
- render the texture using OpenGL (with a specific shader in case of HapQ)

It uses SDL2 to create an OpenGL window.

I've been searching for how to do this process and couldn't find a simple sample, so here it is.
As it's only to demonstrate the process, it ignores any audio track, and I took some shortcuts (freeing resources properly, SDL_Delay call etc.), so the code is small enough to focus on demux->HapDecode->texture(s)->shader->display.