Short Bytes: Using the rich ffmpeg video library written in C, you can make simple media applications. Based on the updated version of ffplay (sample program coming with ffmpeg), today I’m sharing a way to code your own media player in less than 1000 lines.
If you want to get started with ffmpeg, there isn’t much information available online. In this article, I’ll be sharing the tutorial I found on dranger.com that borrows a C program written by Martin Böhme and uses it to develop a working video player.
To get the video and audio output of the media file, SDL has been used as it’s a good cross-platform media library used in many video games and media software. To compile the programs that’ll be taught in the tutorial, you need to download SDL development libraries on your system and install it.
With an idea queues, mutexes etc. in C and some multimedia basics, you are good to start with making your own media player. Also check out our list of best media players for iPhone in details here!
While the program doesn’t make a player to fulfill all your media playback needs, it should be seen as a way to learn more and discover the opportunities to make improvements in the program. If you’re an Android user, you can check out our list of the top android video player something you might use in 2022 right here!
Click here to get started with the tutorial. On each page, there’s a C file that you can download, compile, and follow along.
Did you find this article helpful? Share your views in the comments below.