Delphi XE5 iOS and Android media file formats supported
Delphi XE5 and FM support multiple media file formats for all of the platforms we target (Windows, OSX, iOS and Android). Looking at the FM source code you will find the multimedia components involved (TMediaPlayer, TMediaPlayerControl) and the formats supported for each platform. For those of you who have the run-time library source code (Professional edition and higher, source code not included in Trial or Starter editions), you can look in the "C:\Program Files (x86)\Embarcadero\RAD Studio\12.0\source\fmx" folder for the source code unit files that have FMX.Media*.pas filenames. For XE5 these include FMX.Media.pas, FMX.Media.Win.pas, FMX.Media.Mac.pas, FMX.Media.iOS.pas and FMX.Media.Android.pas.
Looking inside each source code unit's initialization section you'll find the TMediaCodecManager's RegisterMediaCodecClass calls for the supported media formats.
iOS:
Android:
Windows:
Mac OSX:
You can also use the same RegisterMediaCodecClass calls in your programs to support additional media formats if they are supported on your platforms. If you are looking for some sample video files, Apple has a few QuickTime formatted files available for download at http://support.apple.com/kb/ht1425. I'm sure that you will be able to find other multimedia file formats on other web sites.
Here are a couple of notes relating to multimedia from the XE5 documentation and release notes:
Get Started Today, Try the Free Trial
You can get started now by downloading the RAD Studio XE5 trial at http://www.embarcadero.com/products/rad-studio/downloads
Looking inside each source code unit's initialization section you'll find the TMediaCodecManager's RegisterMediaCodecClass calls for the supported media formats.
iOS:
TMediaCodecManager.RegisterMediaCodecClass('.mov', SVMOVFiles, TMediaType.Video, TAVMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.m4v', SVM4VFiles, TMediaType.Video, TAVMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.mp4', SVMP4Files, TMediaType.Video, TAVMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.mp3', SVMP3Files, TMediaType.Audio, TAVMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.caf', SVCAFFiles, TMediaType.Audio, TAVMediaCodec);
Android:
TMediaCodecManager.RegisterMediaCodecClass('.mov', SVMOVFiles, TMediaType.Video, TAndroidVideoCodec);
TMediaCodecManager.RegisterMediaCodecClass('.m4v', SVM4VFiles, TMediaType.Video, TAndroidVideoCodec);
TMediaCodecManager.RegisterMediaCodecClass('.mp4', SVMP4Files, TMediaType.Video, TAndroidVideoCodec);
TMediaCodecManager.RegisterMediaCodecClass('.mp3', SVMP3Files, TMediaType.Audio, TAndroidMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.caf', SVCAFFiles, TMediaType.Audio, TAndroidMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.3gp', SV3GPFiles, TMediaType.Audio, TAndroidMediaCodec);
Windows:
TMediaCodecManager.RegisterMediaCodecClass('.avi', SVAviFiles, TMediaType.Video, TWindowsMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.wmv', SVWMVFiles, TMediaType.Video, TWindowsMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.mp4', SVMP4Files, TMediaType.Video, TWindowsMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.m4v', SVMP4Files, TMediaType.Video, TWindowsMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.mov', SVMOVFiles, TMediaType.Video, TWindowsMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.wma', SVWMAFiles, TMediaType.Audio, TWindowsMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.mp3', SVMP3Files, TMediaType.Audio, TWindowsMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.wav', SVWAVFiles, TMediaType.Audio, TWindowsMediaCodec);
Mac OSX:
TMediaCodecManager.RegisterMediaCodecClass('.mov', SVMOVFiles, TMediaType.Video, TQTMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.m4v', SVMP4Files, TMediaType.Video, TQTMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.mp4', SVMP4Files, TMediaType.Video, TQTMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.avi', SVAviFiles, TMediaType.Video, TQTMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.wav', SVWAVFiles, TMediaType.Audio, TQTMediaCodec);
TMediaCodecManager.RegisterMediaCodecClass('.mp3', SVMP3Files, TMediaType.Audio, TQTMediaCodec);
You can also use the same RegisterMediaCodecClass calls in your programs to support additional media formats if they are supported on your platforms. If you are looking for some sample video files, Apple has a few QuickTime formatted files available for download at http://support.apple.com/kb/ht1425. I'm sure that you will be able to find other multimedia file formats on other web sites.
Here are a couple of notes relating to multimedia from the XE5 documentation and release notes:
- If you are recording from microphone with TCaptureDeviceManager.Current.DefaultAudioCaptureDevice (as is done with the AudioRecPlay mobile code snippet), you need to save files using the following file extensions: .CAF on iOS and .3GP on Android.
- The default Uses Permissions do not include the Record audio permission. If you want your Android app to be able to record audio, you must ensure that the Record audio permission is set on the Uses Permissions page.
- On Android devices (for now) video plays in full screen mode on your device (don't use the TMediaPlayerControl as a video UI container). Below you'll find a snippet of code you can use in your Android apps to play video. To create a mobile video player sample, drop down a TButton and a TMediaPlayer component. The code shows you two event handlers for the Button onClick and Form onResize.
uses
System.iOUtils;
type
TOpenMedia = class(TMedia);
procedure TForm20.videoBtnClick(Sender: TObject);
begin
MediaPlayer1.FileName := IncludeTrailingPathDelimiter(TPath.GetDocumentsPath) + 'Ocean.mp4';
MediaPlayer1.Play;
end;
procedure TForm20.FormResize(Sender: TObject);
begin
if MediaPlayer1.State = TMediaState.Playing then
TOpenMedia(MediaPlayer1.Media).UpdateMediaFromControl;
end;
Get Started Today, Try the Free Trial
You can get started now by downloading the RAD Studio XE5 trial at http://www.embarcadero.com/products/rad-studio/downloads
Tags:
Android
Delphi
FireMonkey
iOS
iPad
iPhone
MAC OSX
Mobile
Multi-Device
Multimedia
Object Pascal
Pascal
Programming
RAD Studio
Windows


David Intersimone (known to many as David I.) is a passionate and innovative software industry veteran-often referred to as a developer icon-who extols and educates the world on Embarcadero developer tools. He shares his visions as an active member of the industry speaking circuit and is tapped as an expert source by the media. He is a long-standing champion of architects, developers and database professionals and works to ensure that their needs are folded into Embarcadero's strategic product plans. David holds a bachelor's degree in computer science from California Polytechnic State University at San Luis Obispo, California.
I cannot believe you are still not providing any support for flac which the most popular open source audio format, nor helping to set up codecs for it. very disappointing indeed.