Planning to create a music player - Format Support Advice needed
Jul 4, 2010 at 8:01 AM Thread Starter Post #1 of 27

darknessproz

100+ Head-Fier
Joined
May 13, 2010
Posts
422
Likes
14
I am planning to create from scratch a music player. It will be written in Python and thus usable on all OS-es. I am not really sure if it would be successful, but i will give it a few months effort.
 
The main question now is to what codecs/file formats should it support? Help appreciated. 
wink.gif

 
Jul 4, 2010 at 8:18 AM Post #2 of 27
As far as codecs are concerned... why reinvent the wheel? If its open source, you could probably use libavcodec - which runs on anything and the kitchen sink. Mp3 mp4/aac/m4a ogg and flac would be the absolute basics IMO
 
on the other hand, what would differenciate this from the other dozens of music players on the market?
 
Jul 4, 2010 at 8:21 AM Post #3 of 27
Nothing, i am doing this as a programming exercise for myself. I will release it for reviews if i'm successful though. :D. Will look into libavcodec though, thanks for the suggestion.
 
Jul 4, 2010 at 10:55 AM Post #4 of 27
You forgot wav. :) Well you can just use the OS's underlying multimedia layer (e.g. gstreamer).
What are you going to use for the gui?
 
(btw, your favorite linux distro already has 21321321 music players, written in all kinds of languages)
 
Jul 4, 2010 at 7:15 PM Post #5 of 27
True on both counts, i did forget wav... silly me.
 
Personally, there *are* too many media players and the few that stand out either do so cause of their simplicity, or have some killer feature - for example i started using foobar2000 mainly cause i could queue up tracks easily. Likewise i use quod libet on linux quite often cause it has awesome search, is lightweight (and incidentally python)
 
The advantage, to me, of libavcodec over the underlying media player is its the same libraries across platforms
 
Jul 4, 2010 at 8:44 PM Post #6 of 27
Not planning to do anything big with this, since there will be only 1 person working on it. I'm just doing it as an practice as i'm learning python anyway. 
 
I WILL use libavcodec, as it, as you mentioned, offers cross-platform support.
 
I'm gonna code the GUI using Python's Tkinter GUI module, if any of you out there are familiar with it.
 
Jul 4, 2010 at 10:17 PM Post #7 of 27
For a challenge you can try to make it do gapless playback when switching from one track to another.  Easier with lossless codecs like FLAC and WAV.  Possible with LAME encoded MP3 since LAME writes a sample offset to let you know how many samples to skip over at the end to sync to the next track gaplessly.
 
There is also an interesting Python library called remix.  I've been meaning to learn more Python and have been thinking of possibly doing some little projects using remix as a way to get me motivated to actually do something.  :)
 
Here's an interesting Python project that used remix to analyze music in search of click tracks.
 
Jul 4, 2010 at 10:25 PM Post #8 of 27
I'll look into that library in a few hour's when i have the time.
 
Gapless playback..., maybe in v2.0. :)
 
I'll probably take a few weeks to get the GUI up and running, as i'm the only person working on it, and i have major exams coming up this year...
 
Jul 5, 2010 at 12:27 AM Post #9 of 27
Quote:
I am planning to create from scratch a music player. It will be written in Python and thus usable on all OS-es. I am not really sure if it would be successful, but i will give it a few months effort.
 
The main question now is to what codecs/file formats should it support? Help appreciated. 
wink.gif

 
Men who "reinvent the bike" (Russian saying) are always welcome :)
 
Why don't you just improve Foobar2000? It's a perfect player for me, except one thing: it does not support VST plugins natively. There is George Yohng's VST wrapper but, unfortunately, it cannot handle more than 2 channels. Which is a pity, because now there are good surround plugins (e.g., Isone Pro Surround) for headphones and lots of hi-rez 5.1 music. So, any player which bridges the gap between these two, will be a winner in my book! :) As long as it supports ASIO, of course.
 
Jul 5, 2010 at 2:54 AM Post #10 of 27
Writing a better VST host for Foobar would not be something you would do in Python.  That's a C++ type project.  It also wouldn't be a fun project to do, which is probably why no one has jumped to write a better VST host for Foobar. 
 
Jul 5, 2010 at 2:54 AM Post #11 of 27
Haha, such audiophile features are beyond me for the moment, will look into implementing them in the future. The main thing i'm going for now would be cross-platform support, which is quite easy to do using Python.
 
Jul 5, 2010 at 4:07 AM Post #12 of 27
Back to the original topic, are there any other common formats used that are not supported by libavcodec? I am working on the GUI right now, and i want to gather all the codecs before i begin programming the music playing function in proper.
 
Jul 5, 2010 at 12:41 PM Post #13 of 27
It supports quite a lot of (audio) codecs, I'd be surprised if it missed anything important.
 
Jul 5, 2010 at 3:52 PM Post #14 of 27
libavcodec support the following audio codecs:
AAC, MP3, Vorbis, WMA, Apple Lossless, FLAC, Monkey's Audio, Shorten, TTA, WavPack, and more.
 
Looks to me like it already cover what 95% of people use, although there are more interesting audio codecs out there.
 
Jul 6, 2010 at 6:33 AM Post #15 of 27
Alright, thanks for the help. I will definitely keep the Head-Fi community informed on the progress of my personal project. :)
 
EDIT: 1 final question, does the choice of decoders used affect the sound quality? Eg, if i use 2 different MP3 decoders to play the same file, will they sound different? 
 

Users who are viewing this thread

Back
Top