Hello all
I'd like to followup on this thread with some questions / thoughts:
- What are the general requirements / needs on media decoding for LWJGL users?
- What formats are acceptable?
Generally, I'd be in favour of a "minimal" solution in the spirit of the STB image readers / writers:
- Being able to decode videos that under control of the developer, i.e. don't support weird formats, corrupt videos etc.
- Restrict support to a minimal set of common containers / codecs. E.g. support MP4/MOV & H.264 (eventually H.265).
- Minimal metadata support (dimensions, framerate).
- Camera input support.
API-wise:
- IMHO the main goal should be to basically decode frames and get them into Buffers easily, so they can be loaded without big overhead into OpenGL textures. Similar for encoding.
Library-support:
- libvlc and ffmpeg are great frameworks, but also quite big (although they can be configured minimally). Also quite a heavy dependency, including license issues.
- I'd rather handcraft a JNI interface with a small c library that then maps to the OS native media libraries, i.e. AV Foundation on OS X, Windows Media Foundation, or (likely) ffmpeg on Linux. I've done this before for OS X, it's just a few lines of code.
Since moste earlier solutions (xuggler etc) are stale, I'll start hacking on this at some point, and will be happy to consider your inputs.
Any opinions on this?