SoC 2011/LibNetMD

From VideoLAN Wiki
Revision as of 18:36, 10 June 2011 by AdrianGlaubitz (talk | contribs) (add a little background to motivate libnetmd port)
Jump to navigation Jump to search
This project is part of Google Summer of Code 2011.
Student: Alexander Sulfrian
Mentor: Ilkka Ollakka

Porting PythonNetMD to C to build a new libnetmd

Abstract

The idea is to port the netmd python scripts from the linux-minidisc project (for communication with Sony netmd minidisc player) to a C-based library that could be used by vlc and other applications.

Back in 2001 (1), Sony started equipping their MiniDisc Walkman and decks with an USB socket and called the technology NetMD. NetMD is basically an AV/C-over-USB-based protocol which allows to send audio data to compatible devices to record them at speeds faster than realtime while remaining backwards compatible with previous MiniDisc equipment. The motivation behind NetMD was to make MiniDisc more attractive with the advent of mass-storage-based portable music players like the iPod.

Since NetMD devices still kept the old MiniDisc format, it is not possible to transfer audio data to the device without additional software. On Windows, this is achieved with the infamous software SonicStage (2). Naturally, this software was released for Windows only and development has ceased around 2007 with version 4.3 (4.4 in Japan). People who want to continue using their NetMD equipment are thus stuck using a compatible version of Windows. Since SonicStage uses a lot of dirty hacks (it has to be run as Administrator for full access to the Windows registry) and the NetMD devices require special drivers, the list of compatible Windows versions is quite narrow, namely 32-bits only. Naturally, Linux and MacOS aren't supported at all.

A project on Sourceforge called "libnetmd" (3), was started in 2004 to start developing a free implementation of the NetMD protocol. Since the NetMD protocol is based on a standard (AV/C-over-USB), the protocol can be implemented right a away. However, libnetmd always suffered from the fact, that all transfers to the NetMD devices are encrypted. The original libnetmd therefore never allowed to transfer any tracks to the devices. However, the implementation allowed things like renaming tracks or remote-controlling the NetMD devices.

In 2009, a new attempt for a free implementation of not only the NetMD protocol but also for HiMD support, the mass-storage-based successor to NetMD, was started. The project is called linux-minidisc (4) and has made great progress in completely reverse-engineering the NetMD protocol and the HiMD format, as well as the underlying encryption mechanisms.

While HiMD support has been implemented in a C library called "libhimd", NetMD can be used only through a number of inconvenient Python scripts (5). In fact, the Python implementation of the NetMD is complete and works on all devices. However, many parts of the code are highly experimental even though they work and most average users prefer easy-to-use GUI-based software, which will run on their platform of choice. For that, Python is not very eligible, as it is not available by default on the largest platform, Windows.

The goal of this GSoC task shall therefore be porting the PythonNetMD code from the linux-minidisc project into a C library which is supposed to replace the no longer maintained libnetmd (6). Eventually, both HiMD and NetMD will be readily available from the linux-minidisc project and can be easily adopted to software applications like VLC and other free media players.

Tasks

(1) [1] (2) [2] (3) [3] (4) [4] (5) [5] (6) [6]