Jump to content
  • Advertisement
Sign in to follow this  
Zingam

Linux: Coding a video player for a game?

This topic is 737 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

I will soon need to code a video player for the Linux port of our commercial game.

We don't need anything fancy just MP4 (and sound). I can't figure out what would be legal to use. We don't have the budget for 3rd party commercial libraries and it is a Linux port after all.

 

Do you have any recommendations?

 

 

Share this post


Link to post
Share on other sites
Advertisement

Hello,

 

Have you taken a look at libVLC, it's the api part of VLC media player. It's realeased under LGPL so if you don't modify the lib youdon't have to redistribute anything. The principle of usage is simple : VLC render frame in a buffer and notify you when it's ready to read it. The api is C based.

 

Regards

Share this post


Link to post
Share on other sites

Use ffmpeg

 

... or I suppose you could spend several work-years trying to build your own MP4 decoder that kinda works okay on your specific files with bugs you can work around.

 

Haha! Not interested in doing that! :D 5 days per platform max. We've done three and we have four more to go. :rolleyes:

Share this post


Link to post
Share on other sites

ffmpeg uses libav.  

 

 

Nope. libav is a fork of ffmpeg, and ffmpeg doesn't use libav.

Unless by ffmpeg you mean libav's video converter that had same name as identical tool from original ffmpeg project.

Share this post


Link to post
Share on other sites

What video player library you are using on the other platforms?

Media Foundation and the respective proprietary AV APIs.

Edited by Zingam

Share this post


Link to post
Share on other sites

Take a look at https://en.wikipedia.org/wiki/OpenH264  http://www.openh264.org/faq.html

 

It's used by FireFox.  https://blog.mozilla.org/blog/2013/10/30/video-interoperability-on-the-web-gets-a-boost-from-ciscos-h-264-codec/

 

The license is confusing, but here's how I think it works:

 

The important part is that you do not compile and link the patented code.  You do not ship the shared library binary.  Your app downloads the library and Cisco volunteers to pay the patent license fee for that user on your behalf.

 

The code is open source. But, that does not grant you license to use the patents.  It's only open source so that anyone can contribute to the source.

Share this post


Link to post
Share on other sites

Some good suggestions here, might I recommend LibTheoraPlayer?

 

https://github.com/AprilAndFriends/theoraplayer

 

I've had some amazing luck integrating the predecessor of this, https://sourceforge.net/projects/libtheoraplayer/ (same project as above, older repository).

 

Some more documents about it on its' website, http://libtheoraplayer.cateia.com/wiki/index.php/Main_Page (not sure how up to date it is) but it was enough to get started. If I remember correctly, this was free to use for any purpose & runs on Linux.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!