Advertisement Jump to content
Sign in to follow this  
noatom

How do you play a video(WITH SOUND)

This topic is 1886 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement

If you are on windows, DirectShow (or the more recent media foundation) will just pull out the decoded pixels for you.

If you want to embed the video on a surface as a texture, you'll need a full decode to RGB. I've heard some cards have non-standard video texture support but I have never checked myself.

If you are using say - Theora - then you can just download the decoder library and you will be in portable land.

 

Keep in mind that most video files are really mere container formats so there's no real guarantee library X will decode file .BLAH, even worse, audio and video can be completely independant. To deal with this flexibility, you will have to look at the aforementioned windows functionalities or libraries such as ffmpeg, libav.

Share this post


Link to post
Share on other sites

DirectShow really isn't. I think you can make it in 100 LOCs! It is legacy, but still works. To my surprise, sometimes it works better than the more recent media foundation (I have a webcam which does 2x the framerate in DirectShow)!

I never had the chance to play with Media Foundation.

I also never played with Theora, but I did use Vorbis, which is super easy. If the Theora decoding library is even 4x more difficult, it's still nothing to worry about!

Theora cannot decode arbitrary video files, but it's a well specified format. Just stick to it and you'll be happy!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!