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

audio only? #28

Closed blitz-research closed 7 years ago

blitz-research commented 7 years ago

Hi,

Is it possible to use theoraplayer as an audio player only?

Not such a big deal if it isn't but it would save a me a day or 2 of coding!

Bye, Mark

kspes commented 7 years ago

eh, I guess you can simply discard frames and get only the audio, but the CPU would still process frames and spend resources doing it. We could add a flag to the video clip to have it not decode the video stream, but that might not work on MP4 or WebM, not sure.

also, why would you need this anyway? In your use case, you can just keep the audio file separate and use it to do a/v sync for video playback, and when you need audio only, just pipe it through your audio api?

blitz-research commented 7 years ago

Nah never mind, I don't want video being decoded while I stream music!

I was just thinking that since I'm already using theoraplayer for in game videos, it'd be nice if I could also use it for background music etc, instead of writing my own threaded vorbis decoder etc from scratch.

But that's just crazy talk I guess!

blloyd75 commented 7 years ago

Perhaps use the vorbis decoder like theora player does? It's not a hard interface.

Brian A Lloyd

On Sep 14, 2017, at 7:27 PM, Mark Sibly notifications@github.com wrote:

Closed #28.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

borisblizzard commented 7 years ago

We actually have an audio solution that we internally rather than theoraplayer's implementation. You might find it useful since it's also multiplatform. https://github.com/AprilAndFriends/xal