Reinventing the Wheel: A Better Media Player

Posted: November 22nd, 2009 | Author: | Filed under: Music, Software | Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , | No Comments »

As I’ve posted in the past, I am a picky media player user. I’ve tried most every free player under the sun, along with some not so free solutions and have yet to be entirely satisfied with any of the available products. To that end, I’ve started to think about the possibility of writing my own media player. The following are some of the considerations that I’ve been mulling over:

Base Requirements:

  • Playback of both mp3 and flac files. Support for other formats could be added as required by me or other users, possibly with us of some sort of plugin engine.
  • Some kind of a rating system, preferably with a high level of granularity. I’m not married to the standard 5-stars idea, and may explore alternative ideas, including tagging.
  • Truly smart playlists that allow for the standard global AND/OR rules, as well as more advanced expressions that support brackets and branching logic.
  • Smart importing from existing iTunes, Songbird, Media Monkey, and Windows Media Player libraries, various playlist formats, and other types of media collections.

Feature Wish List:

  • Blackberry Sync: When not at home, I listen to music from a flash card on my Blackberry Curve. The device can be filled with media by simply dumping it all on the media card, which appears as a removable drive. As previously mentioned, I listen to a mix of mp3 files and lossless flac files. When dumping these files to the Blackberry, I would like to see one thread dedicated to converting the flac files to mp3s, while another thread actually fills the device, resulting in a sync process that is not significantly slowed by media conversions. Additionally, since I have hard drive space to spare, I would like to cache some or all of the resulting mp3 files so that they don’t have to be converted again on the next sync. I would also like to see the ability to import files from the Blackberry to the library so that I could pick up media on the go and bring it home with me.
  • Library Export/Backup: With a library of 10K+ tagged and rated songs, losing the library of meta data about my music would be a traumatic experience indeed. To solve my paranoia over losing this data, I would like to implement the export of single playlists and entire libraries to all of the major playlist formats, as well as to a structured XML document, similar to the one that iTunes maintains. Some kind of automated backup feature like the one that iTunes has would also be nice.
  • Online Integration: I currently report all of my song plays to last.fm, which is an excellent resource for discovering new music. I would like my media player to link in with last.fm and other online resources, but am also open to developing my own online resource that lets users to easily compare and organize their collections, correct their meta data, and actively discover new music that other users have rated.
  • Library Sharing/Streaming: We run a large network with lots of computers, and I’d like the ability to listen to my music from anywhere in the house. I really like the work that Subsonic has done in this area, and hope to implement some or all of it’s features, while at the same time linking it into my database so that I can see my playlists and edit my meta data from anywhere in the house, and indeed, from anywhere in the world.
  • Cross-Platform and Open-Sourced: Given all of my recent experience with Debian Linux, I’d like to see my media platform running on both Windows and Linux. This one might take me awhile to accomplish, but is definitely a goal of mine, given that I am now a confirmed Linux user who still keeps a couple of Windows platforms lying around.

Implementation:

Of course, with all of these goals in mind, the next step is to consider which platform I’d like to build on. This basically comes down to a number of choices, some cross-platform, some not:

  • Visual Studio .NET: My development IDE of choice, Visual Studio provides extremely quick GUI creation and a great number of useful libraries that cut out a lot of the nitty gritty time consuming base code necessary for a project as large as a media player. Additionally, the Windows Media Player control allows for drop-in playback of media, and I have a ton of example code lying around that implements most of the features listed above. Unfortunately, while .NET 2.0 is supported on Linux under the Mono platform, I don’t know how far that support goes in terms of media management and playback.
  • SFML: The Simple Fast Media Library is available as libraries that are pre-compiled to run on Windows, Linux, and Mac, with support for Visual Studio, C/C++, Python, and Ruby. It includes packages for windowing, graphics, networking, and most importantly, audio capture and playback. This is a definite contender as it is open source, meaning that I could build the libraries directly into my code, and simply recompile for different platforms. Of course, the downside is that I’ll have to code in C++, and without any kind of graphical interface builder.
  • Juce: Jules Utility Class Extensions is like a more featured version of SFML that provides packages for just about every conceivable task, including some serious audio libraries that support all kinds of playback, effects, and hardware accelerated features. In addition, it does audio CD reading and writing out of the box on Mac and PC platforms. If I were to strike out from Visual Studio, this would probably be my library of choice, as it can do nearly everything that VS can do, but is fully open sourced and supported on just about every available platform.
  • Java: I have no idea how realistic this idea is. I do know that in the past, I’ve created Java apps that can play both wav and mp3 files, and stream those files over a network connection. That said, as much as I enjoy coding in Java, it is widely regarded as being slow and clunky – not exactly traits that I’d like associated with a media player that will be running all day. On the other hand, Java is not C/C++ (a huge bonus as far as I’m concerned), is fully object oriented, has decent audio support, and makes networking extremely easy. That said, programming GUI’s of any kind of complexity in Java is not a task to be taken on lightly.

Well, that about sums it up. This project is definitely something that I intend to undertake in the coming months, and until then, I’ll keep thinking about my requirements and what library I’d like to use to implement it. If anybody else has experience with some useful audio libraries that they’d like to share, please do so in the comments.


Of iPhones, Blackberries, and Opera Mini

Posted: August 22nd, 2009 | Author: | Filed under: Software | Tags: , , , , , , , , , , , , , , , | 2 Comments »

A good friend of mine recently picked up an iPhone 3G, and I have to say that it is an absolutely gorgeous device. I’ve been a smart phone user since picking up a Blackberry Curve 8310 about a year ago, and would never even consider returning to a ‘normal’ phone. While I love my Blackberry, but I must admit that the iPhone really ups the ante in a couple of respects.

For me, the most obvious difference in the two phones is the web browsing experience. The iPhone runs Safari, built on top of Webkit, and pages actually look and act like the real thing. The Blackberry, on the other hand, uses a proprietary browser built on Java (like everything else on the platform), and provides a distinctly last-generation experience. While his pages look like the real thing, mine are often butchered, missing functionality, and hard to read.

Wanting an iPhone but not willing to pay $700 for the device, and being limited by rumours of Roger’s new 2 year minimum hardware upgrade policy, I decided to take a shot at improving my mobile experience with Opera Mini for the Blackberry instead. I had heard excellent things about this app from a friend, and while Opera only claims about 2% of the browser market, I’ve read some excellent reviews, and encountered a few rabid fans.

After downloading and installing the browser, I was immediately greeted by the best web experience that I’ve ever had on a mobile device (short of the iPhone of course). Pages render beautifully, Javascript runs fast, and the entire page is displayed on load. You can choose the section of the page that you’re interested in, and the browser zooms in to an appropriate size for reading. While browsing the page, each link is highlighted so that you can easily see where they are, and the view automatically shifts and resizes so that the entirety of the current paragraph is in view. The user can choose to download low, medium, or high quality copies of images depending on the speed of their connection (I chose low because my phone does not support 3G or WiFi), so even image-heavy pages look great while loading fast.

While using the browser, the idea that gets into your head is that it was designed by people who had actually used mobile browsers for a long period of time, and thought really hard about features that made sense on a low-bandwidth connection with a smallish screen. As an example, I often bookmark RSS feeds from sites that I like to follow, because it’s faster to browse the headlines and then click through to interesting stories than to load up each page individually on my 2G connection. Opera Mini places a link to a listing of all RSS feeds available from a particular site in the top corner of every page, making it fast and easy to add new pages to my bookmarks list.

The only complaint that I have so far about this program is that it seems to eat the keypress events from my system keys, meaning that I can’t raise or lower the volume or pause my music while simultaneously browsing the web. No matter, as a quick tap on the end key minimizes the app, after which the keys work as expected.

All in all, I am incredibly impressed with this application and highly reccomend it to anybody looking to add a little love to their mobile browsing experience without shelling out for a steve-phone just yet.


Areca: The Open Sourced Backup Solution

Posted: January 19th, 2009 | Author: | Filed under: Software | Tags: , , , , , , , , , , , , , | 1 Comment »

Readers will recall the issues that I’d had some time ago in trying to force Windows Backup to play ball with an external hard drive encrypted by TrueCrypt. For some reason or another, Windows Backup refused to recognize the mounted drive as a valid backup location. One reader recommended that I try Acronis True Image out. Seeing as I like free stuff, I’ve found a free solution that solves the problem entirely.

Now it should be said from the outset that this process is a little bit ugly and a tad long winded, but that it does a really swell job and is full of opportunities to improve upon and to customize it for your particular situation.

Read on for the full tutorial – now with pretty pictures!
Read the rest of this entry »