M3U (''
MP3
MP3 (formally MPEG-1 Audio Layer III or MPEG-2 Audio Layer III) is a coding format for digital audio developed largely by the Fraunhofer Society in Germany under the lead of Karlheinz Brandenburg. It was designed to greatly reduce the amount ...
URL
A uniform resource locator (URL), colloquially known as an address on the Web, is a reference to a resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identi ...
''
) is a computer file format for a multimedia
playlist
A playlist is a list of video or audio files that can be played back on a media player, either sequentially or in a shuffled order. In its most general form, an audio playlist is simply a list of songs that can be played once or in a loop. ...
. One common use of the M3U file format is creating a single-entry playlist file pointing to a
stream
A stream is a continuous body of water, body of surface water Current (stream), flowing within the stream bed, bed and bank (geography), banks of a channel (geography), channel. Depending on its location or certain characteristics, a strea ...
on the Internet. The created file provides easy access to that stream and is often used in downloads from a website, for emailing, and for listening to
Internet radio
Internet radio, also known as online radio, web radio, net radio, streaming radio, e-radio and IP radio, is a digital audio service transmitted via the Internet. Broadcasting on the Internet is usually referred to as webcasting since it is not ...
.
Although originally designed for audio files, such as
MP3
MP3 (formally MPEG-1 Audio Layer III or MPEG-2 Audio Layer III) is a coding format for digital audio developed largely by the Fraunhofer Society in Germany under the lead of Karlheinz Brandenburg. It was designed to greatly reduce the amount ...
, it is commonly used to point media players to audio and video sources, including online sources. M3U was originally developed by
Fraunhofer for use with their
WinPlay3 software, but numerous media players and software applications now support the format.
Careless handling of M3U playlists has been the cause of
vulnerabilities
Vulnerability refers to "the quality or state of being exposed to the possibility of being attacked or harmed, either physically or emotionally." The understanding of social and environmental vulnerability, as a methodological approach, involves ...
in many music players such as
VLC media player
VLC media player (previously the VideoLAN Client) is a free and open-source software, free and open-source, software portability, portable, cross-platform media player software and streaming media Server (computing), server developed by the Vide ...
,
iTunes
iTunes is a media player, media library, and mobile device management (MDM) utility developed by Apple. It is used to purchase, play, download and organize digital multimedia on personal computers running the macOS and Windows operating s ...
,
Winamp
Winamp is a media player (software), media player for Microsoft Windows originally developed by Justin Frankel and Dmitry Boldyrev by their company Nullsoft, which they later sold to AOL in 1999 for $80 million. It was then acquired by Rad ...
, and many others.
File format
There is no formal specification for the M3U format; it is a ''
de facto'' standard.
An M3U file is a
plain text
In computing, plain text is a loose term for data (e.g. file contents) that represent only characters of readable material but not its graphical representation nor other objects ( floating-point numbers, images, etc.). It may also include a lim ...
file that specifies the locations of one or more media files. The file is saved with the "m3u"
filename extension
A filename extension, file name extension or file extension is a suffix to the name of a computer file (for example, .txt, .mp3, .exe) that indicates a characteristic of the file contents or its intended use. A filename extension is typically d ...
if the text is encoded in the local system's default non-Unicode encoding (e.g., a
Windows codepage), or with the "m3u8" extension if the text is
UTF-8
UTF-8 is a character encoding standard used for electronic communication. Defined by the Unicode Standard, the name is derived from ''Unicode Transformation Format 8-bit''. Almost every webpage is transmitted as UTF-8.
UTF-8 supports all 1,112,0 ...
encoded.
Each entry carries one specification. The specification can be any one of the following:
* an ''absolute local pathname''; e.g., C:\My Music\Heavysets.mp3
* a ''local pathname'' relative to the M3U file location; e.g. Heavysets.mp3
* a
URL
A uniform resource locator (URL), colloquially known as an address on the Web, is a reference to a resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identi ...
Each entry ends with a
line break which separates it from the following one. Furthermore, some devices only accept line breaks represented as
CR LF
, but do not recognize a single
LF
.
Extended M3U
The M3U file can also include comments, prefaced by the "#" character. In extended M3U, "#" also introduces extended M3U directives which are terminated by a colon ":" if they support parameters.
Apple used the extended M3U format as a base for their
HTTP Live Streaming
HTTP Live Streaming (also known as HLS) is an HTTP-based adaptive bitrate streaming communications protocol developed by Apple Inc. and released in 2009. Support for the protocol is widespread in media players, web browsers, mobile devices, and ...
(HLS)
which was documented in an Independent Submission Stream RFC in 2017 a
RFC 8216[
] Therein, a ''master playlist'' references segment playlists which usually contain URLs for short parts of the media stream. Some tags only apply to the former type and some only to the latter type of playlist, but they all begin with
#EXT-X-
.
M3U8
The
Unicode
Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
version of M3U is M3U8, which uses
UTF-8
UTF-8 is a character encoding standard used for electronic communication. Defined by the Unicode Standard, the name is derived from ''Unicode Transformation Format 8-bit''. Almost every webpage is transmitted as UTF-8.
UTF-8 supports all 1,112,0 ...
-encoded characters. M3U8 files are the basis for the
HTTP Live Streaming
HTTP Live Streaming (also known as HLS) is an HTTP-based adaptive bitrate streaming communications protocol developed by Apple Inc. and released in 2009. Support for the protocol is widespread in media players, web browsers, mobile devices, and ...
(HLS) format originally developed by
Apple
An apple is a round, edible fruit produced by an apple tree (''Malus'' spp.). Fruit trees of the orchard or domestic apple (''Malus domestica''), the most widely grown in the genus, are agriculture, cultivated worldwide. The tree originated ...
to stream video and radio to
iOS
Ios, Io or Nio (, ; ; locally Nios, Νιός) is a Greek island in the Cyclades group in the Aegean Sea. Ios is a hilly island with cliffs down to the sea on most sides. It is situated halfway between Naxos and Santorini. It is about long an ...
devices, and which is now a popular format for adaptive streaming in general.
The 2015 proposal for the HLS playlist format uses UTF-8 exclusively and does not distinguish between the "m3u" and "m3u8" file name extensions.
Internet media types
The only
Internet media type
In information and communications technology, a media type, content type or MIME type is a two-part identifier for file formats and content formats. Their purpose is comparable to filename extensions and uniform type identifiers, in that they ident ...
registered for M3U and M3U8 is
application/vnd.apple.mpegurl
, registered in 2009 and only referring to the playlist format as used in HLS applications.
The current proposal for the HLS playlist format acknowledges two media types which it treats as equivalent:
application/vnd.apple.mpegurl
and
audio/mpegurl
.
Likewise, these are the two types recommended for HLS use by Microsoft.
For non-HLS applications, no media types were standardized or registered with the
IANA
The Internet Assigned Numbers Authority (IANA) is a standards organization that oversees global IP address allocation, autonomous system number allocation, root zone management in the Domain Name System (DNS), media types, and other Internet P ...
, but a number of media types are nonetheless associated with the historical and ongoing use of the M3U and M3U8 formats for general playlists:
*
application/mpegurl
*
application/x-mpegurl
*
audio/mpegurl
*
audio/x-mpegurl
These types, plus
application/vnd.apple.mpegurl
and
application/vnd.apple.mpegurl.audio
, are supported for HLS applications by (for example) Microsoft's
Windows 10
Windows 10 is a major release of Microsoft's Windows NT operating system. The successor to Windows 8.1, it was Software release cycle#Release to manufacturing (RTM), released to manufacturing on July 15, 2015, and later to retail on July 2 ...
and
Internet Explorer
Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated as IE or MSIE) is a deprecation, retired series of graphical user interface, graphical web browsers developed by Microsoft that were u ...
9, and LG's
WebOS
webOS, also known as LG webOS, is a Linux kernel-based multitasking operating system for smart devices, such as smart TVs, that has also been used as a mobile operating system. Initially developed by Palm, Inc. (which was acquired by Hewlett ...
.
Examples
;Example 1
This is an example of an extended M3U file on the Windows platform. Sample.mp3 and Example.ogg are the media files. 123 and 321 are the lengths in seconds. A length of -1 or 0 may be used when the media file is a streaming file, as there is no actual, predefined length value. The value after the length is the title to be shown, which is generally the same as the location of the file which is on the second line. On the
macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
and
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
platforms,
Unix paths are used.
#EXTM3U
#EXTINF:123, Sample artist - Sample title
C:\Documents and Settings\I\My Music\Sample.mp3
#EXTINF:321,Example Artist - Example title
C:\Documents and Settings\I\My Music\Greatest Hits\Example.ogg
;Example 2
This example shows how to create an m3u file linking to a specified directory (for example, a
flash drive, or CD-ROM). The m3u file should contain only one string: the path to the directory. After starting, the media player will play all contents of the directory:
C:\Music
;Example 3
Here is another example, using relative format. The M3U file is placed in the same directory as the music, and directories must be preserved when moving the playlist to another device if subdirectories are used. This method is more flexible, as it does not rely on the file path staying the same.
This is the same file as above, saved as sample.m3u in C:\Documents and Settings\User\My Music\
#EXTM3U
#EXTINF:123, Sample artist - Sample title
Sample.mp3
#EXTINF:321,Example Artist - Example title
Greatest Hits\Example.ogg
This format in an M3U allows copying to another device for playback. All files and directories referred to must also be copied.
;Example 4
Here is a mixed example:
Alternative\Band - Song.mp3
Classical\Other Band - New Song.mp3
Stuff.mp3
D:\More Music\Foo.mp3
..\Other Music\Bar.mp3
http://www.example.com:8000/Listen.mp3
http://www.example.com/~user/Mine.mp3
Notes:
* Alternative and Classical are sub-directories of the directory that this playlist is stored in.
* "Song" and "New Song" are in sub-directories of the directory that this playlist is stored in.
* "Stuff" is in the same directory that the playlist is stored in.
* "Foo" is in the specified (Windows) volume and directory, which may or may not be the same directory the playlist is in.
* "Bar" is in a different directory at the same level as the playlist directory. The double-dots reference the parent directory of the playlist directory, then into the sub-directory "Other Music" to reach "Bar".
* "Listen" is a Shoutcast stream.
* "Mine" is an MP3 stored on a web server.
;Example 5
References to other M3U playlists, for example, are generally not well-supported.
AnotherPlayList.m3u
;Example 6
The following is an example of an M3U playlist file for "
Jar of Flies" album by "
Alice in Chains
Alice in Chains (often abbreviated as AiC) is an American rock band formed in Seattle in 1987. Since 2006, the band's lineup has comprised vocalist/guitarists Jerry Cantrell and William DuVall, bassist Mike Inez, and drummer Sean Kinney. Voca ...
" that was created by
Mp3tag with the following custom option settings:
* playlist extended info format =
"%artist% - %title%"
* playlist filename format =
"%artist%_%album%_00_Playlist.m3u"
* tag to filename conversion format =
"%artist%_%album%_$num(%track%,2)_%title%"
#EXTM3U
#EXTINF:419,Alice in Chains - Rotten Apple
Alice in Chains_Jar of Flies_01_Rotten Apple.mp3
#EXTINF:260,Alice in Chains - Nutshell
Alice in Chains_Jar of Flies_02_Nutshell.mp3
#EXTINF:255,Alice in Chains - I Stay Away
Alice in Chains_Jar of Flies_03_I Stay Away.mp3
#EXTINF:256,Alice in Chains - No Excuses
Alice in Chains_Jar of Flies_04_No Excuses.mp3
#EXTINF:157,Alice in Chains - Whale And Wasp
Alice in Chains_Jar of Flies_05_Whale And Wasp.mp3
#EXTINF:263,Alice in Chains - Don't Follow
Alice in Chains_Jar of Flies_06_Don't Follow.mp3
#EXTINF:245,Alice in Chains - Swing On This
Alice in Chains_Jar of Flies_07_Swing On This.mp3
Software
Tag editors
The following
tag editor software allows users to edit the
ID3 tags in
MP3
MP3 (formally MPEG-1 Audio Layer III or MPEG-2 Audio Layer III) is a coding format for digital audio developed largely by the Fraunhofer Society in Germany under the lead of Karlheinz Brandenburg. It was designed to greatly reduce the amount ...
files, and has support for creating M3U files.
;Linux
*
Kid3,
Puddletag.
;Windows
*
Mp3tag,
Puddletag.
Media players
The following media player software supports playing M3U files.
;Multi-platform
;Android
* Astro Player,
Kodi
Kodi may refer to:
Arts, entertainment, and media
* KODI, a radio station in Cody, Wyoming, USA
* Kodi (film), ''Kodi'' (film), India, 2016
* Kodi, a dog in the 2004 film ''Balto III: Wings of Change''
Other uses
* Kodi (software), an open sour ...
, N7Player,
Musicolet
;macOS
*
Music
Music is the arrangement of sound to create some combination of Musical form, form, harmony, melody, rhythm, or otherwise Musical expression, expressive content. Music is generally agreed to be a cultural universal that is present in all hum ...
,
QuickTime Player
QuickTime (or QuickTime Player) is an extensible multimedia architecture created by Apple, which supports playing, streaming, encoding, and transcoding a variety of digital media formats. The term ''QuickTime'' also refers to the QuickTime Pla ...
,
IINA
;Nintendo
*
New Nintendo 3DS
The is a clamshell design dual-screen handheld game console produced by Nintendo, originally released on October 11, 2014 in Japan and rolled out to all major global markets by September 25, 2015. It is the fourth system in the Nintendo 3DS fam ...
(including XL and
2DS XL variants) with
Internet Browser app
*
Nintendo Switch
The is a video game console developed by Nintendo and released worldwide in most regions on March 3, 2017. Released in the middle of the Eighth generation of video game consoles, eighth generation of home consoles, the Switch succeeded the ...
with the
YouTube
YouTube is an American social media and online video sharing platform owned by Google. YouTube was founded on February 14, 2005, by Steve Chen, Chad Hurley, and Jawed Karim who were three former employees of PayPal. Headquartered in ...
(
site-specific) app
*
Wii U
The Wii U ( ) is a home video game console developed by Nintendo as the successor to the Wii. Released in late 2012, it is the first eighth-generation video game console and competed with Microsoft's Xbox One and Sony's PlayStation 4.
The W ...
with the
Internet Browser or
YouTube
YouTube is an American social media and online video sharing platform owned by Google. YouTube was founded on February 14, 2005, by Steve Chen, Chad Hurley, and Jawed Karim who were three former employees of PayPal. Headquartered in ...
app
;Windows
*
foobar2000
foobar2000 (often abbreviated as fb2k or f2k) is a freeware audio player for Microsoft Windows, iOS, Android, macOS, and formerly Windows Phone, developed by Peter Pawłowski. It has a modular design, which provides user flexibility in c ...
,
JRiver Media Center
JRiver Media Center is a multimedia application that allows the user to play and organize various types of media on a computer running Windows, macOS, or Linux operating systems. Developed by JRiver, Inc., it is offered as shareware.
JRiver Me ...
,
JuK
Juk or JUK may refer to:
* JuK, software
* Juk (food), Korean rice porridge
* Juk language, a Mon–Khmer language spoken in Laos
* Ukkusissat Heliport (IATA: JUK), in Greenland
* Wapan language (ISO 639-3: juk), a Jukunoid language of Nigeria
{{ ...
,
MediaMonkey
MediaMonkey is a digital media player and media library application developed by Ventis Media Inc., for organizing and playing audio on Microsoft Windows and Android operating systems. MediaMonkey for Windows (sometimes noted as MMW) includes ...
,
PotPlayer,
Winamp
Winamp is a media player (software), media player for Microsoft Windows originally developed by Justin Frankel and Dmitry Boldyrev by their company Nullsoft, which they later sold to AOL in 1999 for $80 million. It was then acquired by Rad ...
,
Windows Media Player
Windows Media Player (WMP, officially referred to as Windows Media Player Legacy to retronym, distinguish it from Windows Media Player (2022), the new Windows Media Player introduced with Windows 11) is the first media player (application soft ...
,
XMPlay
See also
*
List of tag editors
;Other playlist file formats
*
PLS - SHOUTcast
*
XSPF - Xiph.Org Foundation
References
External links
*
*
*
{{DEFAULTSORT:M3u
Playlist file formats
Digital audio
Filename extensions