AprilAndFriends / theoraplayer

A multi-threaded C++ library that plays video files supporting multiple codecs across platforms. Easy to use, fast, responsive, abstract interface and minimal dependencies, you'll soon be wondering how you lived without it! ;) Audio and Video interfaces are completely abstracted so the library can be used anywhere, regardless of what you use to display video frames and play audio samples (eg. OpenGL / OpenAL, Direct3D / DirectSound?, SDL / SDL_mixer, X11 / alsa ...) The library can pre-cache video frames and decoded audio samples for maximum efficiency and smooth playback, even on single-cpu systems. Currently, the library supports Theora on Windows, Mac, iOS, Linux, Android, WinRT and Windows Phone. H.264 is supported on Mac and iOS.
BSD 3-Clause "New" or "Revised" License
84 stars 43 forks source link

License? #14

Open blitz-research opened 7 years ago

blitz-research commented 7 years ago

Hi,

I'm a bit confused about the license - it states here that the library is BSD licensed:

http://libtheoraplayer.cateia.com/wiki/index.php?title=Licensing

But the library appears to use ffmpeg which is LGPL:

https://www.ffmpeg.org/legal.html

Do you have to distribute the ffmpeg bit separately or am I missing something?

Bye! Mark

kspes commented 7 years ago

Hi,

the library is BSD licensed yes. the ffmpeg part is a separate plugin module, you don't have to use it. but yeah, if you want to, then LGPL applies for ffmpeg. also, if I'm not mistaken, the ffmpeg module doesn't work properly. I recommend simply using theora or mp4 on iOS/mac, that way you don't have licensing problems and don't have to deal with ffmpeg's huge codebase.

blitz-research commented 7 years ago

I recommend simply using theora or mp4 on iOS/mac, that way you don't have licensing problems.

I would like to do this too! Good to hear ffmpeg is optional too.

I'm having a few problems building though, 'rebuild solution' results in:

Can't open file 'libvpx,.lib' Can't open file 'libclipwebm.lib'.

Right clicking on libtheoraplayer and selecting rebuild-all successfully builds 5 'somethings' though (npot really used to msvc).

Can't really find any build instructions so I'm a bit lost - what do I need to build and what do I need to link with and what are the include paths etc?

borisblizzard commented 7 years ago

All libraries should be present in the solution, but in order to compile vpx (and therefore clibwebm and finally the test projects), you need to install vsyasm. You can find the binary and instructions in the vpx/msvc/util directory. It's fairly simple. :)

blitz-research commented 7 years ago

I've got most of it building now I think - am I correct in thinking this is all I need for a minimal setup?

ogg vorbis theora theoraplayer (your bit)

Is theora kind of the video equivalent of vorbis? Is ogg the 'wrapper' for both?

I also had to tweak a few things to get theoraplayer to build with mingw64:

Also, I hacked a #define _LIB into theoraplayerExport.h to force a static lib build - is this all I need to do?

Haven't actually got it running yet, will let you know when I do!

On Wed, Dec 14, 2016 at 9:43 AM, Boris Mikic notifications@github.com wrote:

All libraries should be present in the solution, but in order to compile vpx (and therefore clibwebm and finally the test projects), you need to install vsyasm. You can find the binary and instructions in the vpx/msvc/util directory. It's fairly simple. :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AprilAndFriends/theoraplayer/issues/14#issuecomment-266856033, or mute the thread https://github.com/notifications/unsubscribe-auth/ADU3QutBRUKT88Biw5yfMpGMWfqEvxy2ks5rHwNmgaJpZM4LKFfd .

borisblizzard commented 7 years ago

You actually have static configurations (DebugS and ReleaseS variants) that have these defined. Of course, only if you use Visual Studio.

If you want to build statically, make sure to define _LIB in all libraries, not just theoraplayer. We use this convention to make sure things don't break needlessly.

blitz-research commented 7 years ago

Ok, I have this running on Windows, Mac and Linux now, including OpenALAudio driver. Works nicely thanks - android and ios next up! Would be really nice if you could update the docs at http://libtheoraplayer.cateia.com/wiki/index.php/Main_Page - caused me a fair bit of confusion...

Should/Can I create multiple instance of theoraplayer::Manager? I see that theoraplayer::init() creates a theoraplayer::manager singleton so I'm just using that, is this correct?

It looks like the linux version hasn't been touched in a while - needed to change #ifdef _LINUX to #ifdef __linux and there's still a reference to mFilePtr instead of plain filePtr in there (plus some other issues).

Does/should the WebM plugin work? Is this 'better' than plain theora?

kspes commented 7 years ago

No, the manager is designed to be a singleton. Why would you want multiple managers?

WebM is generally better and faster than Theora, but at the moment, the webM plugin for theoraplayer isn't finished. We plan to finish it in the next few months as we'll need it for our projects. I'll announce it when it's done. Theora is more than good though, especially if you can use hardware acceleration on the platform (win32, iOS arm32, Android arm32). Without hardware accelleration, theora is kinda slow though.

blitz-research commented 7 years ago

Why would you want multiple managers?

No idea, but there is/was a 'new TheoraVideoManager' in the tutorial at the site above so it looked like I was expected to create one, singelton or not.

It wasn't until I worked out the site above is way out of date and had a look through the code that I worked out theoraplayer::init() creates a Manager too.

It's just not entirely clear what's going on here (Manager doesn't actually prevent you creating multiple instances, IMO it should if it's a singleton) so I thought I'd ask.

We plan to finish it in the next few months as we'll need it for our projects. I'll announce it when it's done.

Excellent, looking forward to it!

On Mon, Dec 19, 2016 at 5:11 AM, Kresimir Spes notifications@github.com wrote:

No, the manager is designed to be a singleton. Why would you want multiple managers?

WebM is generally better and faster than Theora, but at the moment, the webM plugin for theoraplayer isn't finished. We plan to finish it in the next few months as we'll need it for our projects. I'll announce it when it's done. Theora is more than good though, especially if you can use hardware acceleration on the platform (win32, iOS arm32, Android arm32). Without hardware accelleration, theora is kinda slow though.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AprilAndFriends/theoraplayer/issues/14#issuecomment-267829821, or mute the thread https://github.com/notifications/unsubscribe-auth/ADU3QoWpXcrKtMHoqRzzmWaE-vcnCou9ks5rJVtAgaJpZM4LKFfd .

borisblizzard commented 7 years ago

Yeah that tutorial is out of date. It is a singleton class, but we prefer to avoid the whole mess with having a having to call getSingleton() since it's kinda ugly to read. :)

WEBM already works on classic Win32 (not on WinRT!), but we haven't adapted the required YASM code for other platforms yet. So technically you could easily use WEBM on Win32.