Media Transfer Protocol

From Wikipedia, the free encyclopedia

Jump to: navigation, search

The Media Transfer Protocol is a devised set of custom extensions to the Picture Transfer Protocol (PTP).[1] Whereas PTP was designed for downloading photographs from digital cameras, Media Transfer Protocol supports the transfer of music files on digital audio players and movie files on portable media players.

Media Transfer Protocol (commonly referred to as MTP) is part of the "Windows Media" framework and thus closely related to Windows Media Player. Windows Vista has built-in support for MTP. Support for Media Transfer Protocol in Windows XP requires the installation of Windows Media Player 10 or higher.[2] Mac and Linux systems have software packages to support it.

The USB Implementers Forum device working group standardized MTP as a fully fledged Universal Serial Bus (USB) device class in May 2008.[3] MTP is since then, an official extension to PTP and shares the same class code.[4] However, no known MTP device as of June 2008 currently uses the PTP class code according to that specification.

Contents

[edit] Overview

The protocol is implemented for use across USB. The host connecting to an MTP device is called an MTP Initiator whereas the device itself is an MTP Responder.[5]

The main purpose of the protocol is to transfer media files and associated metadata to/from devices, with optional additional support for remote control of the device, reading and setting of device parameters such as special DRM-related device parameters for restricted content.[5] The device can also send events to the host.

A main reason for using MTP rather than for example the USB mass storage device class is that the latter operates at the granularity of a mass storage device block (usually in practice, a FAT block), rather than at the logical file level. In other words, the USB mass storage class is designed to give a host computer undifferentiated access to bulk mass storage, such as compact flash, rather than to a file system, which might be safely shared with the target device (except for specific files which the host might be modifying/accessing). In practice, therefore, when a USB host computer has mounted an MSC partition, it assumes absolute control of the storage, which then may not be safely modified by the device without risk of data corruption until the host computer has severed the connection.

MTP and PTP specifically overcome this issue by making the unit of managed storage a local file rather than an entire (possibly very large) unit of mass storage at the block level.

Additionally, the MTP allows MTP Initiators to identify the specific capabilities of device(s) with respect to file formats and functionality. In particular, MTP Initiators may have to provide passwords and other information to unlock files, or otherwise enable restricted capabilities. Nothing specific of this nature is in the core standard but the possibility is allowed via Vendor extensions. MTPZ, the Zune Extension to MTP specifically denies access to files until authentication has been processed.

[edit] Drawbacks

By design, MTP devices (like PTP devices) are not treated as a traditional removable drive. The actual filesystem is implemented by the device, not by the computer's operating system. In theory the OS may hide this difference, but this is unfortunately not the case on Windows or Mac OS. This also means that conventional filesystem recovery tools will be of no use if the drive is corrupted, or crashes.

Moreover, the set of MTP (or PTP) I/O commands is limited. Modification of contents or keywords is not possible. The file must be available completely at transfer initiation which makes interfacing to a standard file system complex (traditional APIs allow opening of files, writing at any step and then closing them). With PTP/MTP, the file size must be known at the opening stage.[citation needed]

Ancillary data with alternate file extensions (other than MP3, WAV and other multimedia) are generally not transferrable to MTP (this is not a restriction of the specification rather than the implementation of the protocol or application software). For backup purposes this limitation may be circumvented by changing the file extension (e.g., ARCHIVE.ZIP to ARCHIVE.MP3), and doing the reverse when copying onto another computer.

[edit] Windows MTP support

On Microsoft Windows, MTP is supported in Microsoft Windows XP if Windows Media Player 10 or later versions are installed. Windows Vista has MTP built-in. Most MTP-compatible devices do not appear through drive letter assignment in Windows Explorer, instead they will appear as "devices" in Windows Explorer. Additionally, on Windows, MTP-compatible devices support a feature called AutoSync, which lets users configure Windows Media Player to automatically transfer all newly acquired or ripped content to devices whenever they are connected. AutoSync is customizable so that the player will transfer only content that meets certain criteria (songs rated four stars or higher, for instance). Changes made to file properties (such as a user rating) on a device can be propagated back to the computer when the device is reconnected. Windows 7's sensor platform will support sensors built into MTP-compatible devices.

[edit] Support for legacy Windows versions

For downlevel operating systems, specifically, Windows 2000, Windows 98 and Windows Me, Microsoft has released the MTP Porting Kit.[6] It includes the full MTP specification, documentation and tools. While the MTP porting kit itself can only be installed on Windows XP or later operating systems, it includes a generic device driver for MTP devices (MTP9x-2k.exe). The driver's INF file (wpdmtp_sample.inf) has to be modified to describe the attributes for the specific device before connecting the player. Specifically, the following changes are required:

1. Adding device specific VID/PID entries to the "Manufacturer & Models" section.
; Vendor needs to supply the VID (xxxx) and PID (yyyy)
%Test.DeviceDesc% = Test_MTP, USB\VID_xxxx&PID_yyyy

2. Optionally, editing the device specific text strings in the "Localizable macro substitutions" section (required only for description purposes).
Test.DeviceDesc = "<Device name>"
MfgName = "<Manufacturer name>"
Provider = "<Provider name>"

The VID and PID values can be looked up in the registry of any XP or Vista PC the device has been connected to at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB
The key name contains the VID/PID string; values in the keys below it contain the device name and manufacturer name.

After making this modification, the driver can be installed on downlevel operating systems and works with Windows Media Player 9 Series or other players which offer MTP support.

Some manufacturers, such as Creative Technology, also provide legacy MTP drivers for some of their players; these usually consist of MTP Porting Kit files with a customized INF file describing their specific players.

[edit] Deficiencies in the Windows implementation

Windows Explorer treats MTP devices somewhat like a file system, except without an assigned drive letter, making it impossible for other applications to access the data directly. For example on Windows XP, drag and drop is only allowed through Windows Explorer when the Windows Media Player synch is running. This can cause confusion as users find they can sometimes drag files to and from the device easily, and be blocked (with error messages) at other times (if Media Player has been closed). Also, again on XP, the User-Mode Driver Framework service must be running in the background.[7]

MTP is not found in versions of Windows prior to Windows XP; however, if the MTP Porting Kit is used, users of legacy systems can gain partial connectivity to the player through Windows Media Player 9 or other third-party media managers (which may impose additional steps in transferring files).

[edit] Synchronization

The protocol itself does not implement synchronization, but with it synchronization of a device to a host computer using mechanisms similar to SyncML, Apple's iSync or Windows Media Player's AutoSync can be implemented.

[edit] Market acceptance

Microsoft's partners including Creative Technology, Intel, iriver and Samsung who manufactured devices based on Microsoft's "Portable Media Center specification" popularized this protocol. These devices were lined up at the 2004 Consumer Electronics Show.

After an initial period of uncertain reactions several large media player producers such as Creative Technology and iriver have opted to embrace the MTP protocol and drop their own custom device protocols. The general perception is that these companies are happy that they no longer have to develop their own protocols and device drivers for their products. The current device makers and device lines supporting MTP are:

[edit] PlaysForSure

The Microsoft certification mark PlaysForSure was commonly used to distinguish devices that support MTP or USB mass storage device class (MSC), or both, and Windows Media Audio. However, only MTP devices received the PlaysForSure "Subscription" mark, which denoted support for Janus DRM. The PlaysForSure program has been terminated and replaced by a Certified for Windows Vista[8] program instead.

[edit] Implementations

MTP Basic has been proposed for standardization and shall become available on multiple platforms.

  • Windows XP supports MTP if Windows Media Player 11 (or the Windows Media 11 Runtime) is installed.
  • Windows Vista natively implements MTP.
  • The Xbox 360 can connect to MTP devices.
  • Linux MTP interoperability can be achieved by using:
    • libgphoto2 a shared library which supports PTP with some MTP extensions and was originally designed to support PTP cameras
      • The gphoto2 commandline tool for scripted uploading.
      • F-Spot has MTP support through libgphoto2
    • libmtp a shared library implementing the MTP protocol which also includes some command-line example tools
      • Amarok has MTP support through libmtp
      • Audacious has MTP support through libmtp.
      • Banshee has MTP support through libmtp
      • Rhythmbox has MTP support through libmtp.
      • MTPfs supports mounting MTP devices like filesystem through libmtp.
  • Mac OS X has MTP support by way of XNJB. (XNJB also use the libmtp implementation of the protocol.)
  • Symbian OS includes MTP support for music, videos and images.
  • AmigaOS and MorphOS have support for MTP devices through the Poseidon USB Stack and its PTP class driver.
  • Songbird, a cross-platform media player, has experimental support for MTP through an extension, however at present it will only function on Windows XP (with Windows Media Player 11 installed) or on Windows Vista.

[edit] See also

[edit] References

[edit] External links

Personal tools