Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

M3U

From Wikipedia, the free encyclopedia
Computer file format for a multimedia playlist
M3U
Filename extensions
.m3u, .m3u8
Internet media typevarious;see§ Internet media types
Initial releasec. 1996
Type of formatPlaylist
Extended toHLS playlist

M3U (MP3URL[1][2]) is a computer file format for a multimediaplaylist. One common use of the M3U file format is creating a single-entry playlist file pointing to astream 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 toInternet radio.

Although originally designed for audio files, such asMP3, it is commonly used to point media players to audio and video sources, including online sources. M3U was originally developed byFraunhofer for use with theirWinPlay3 software,[1][3] but numerous media players and software applications now support the format.

Careless handling of M3U playlists has been the cause ofvulnerabilities in many music players such asVLC media player,[4]iTunes,[5]Winamp,[6] and many others.[7]

File format

[edit]

There is no formal specification for the M3U format; it is ade facto standard.

An M3U file is aplain text file that specifies the locations of one or more media files. The file is saved with the "m3u"filename extension if the text is encoded in the local system's default non-Unicode encoding (e.g., aWindows codepage), or with the "m3u8" extension if the text isUTF-8 encoded.[8] The "mp3url" extension originally supported by Winplay3 fell out of use.[1]

Each entry carries one specification. The specification can be any one of the following:

  • anabsolute local pathname; e.g., C:\My Music\Heavysets.mp3
  • alocal pathname relative to the M3U file location; e.g. Heavysets.mp3
  • aURL

Each entry ends with aline break which separates it from the following one. Furthermore, some devices only accept line breaks represented asCR LF, but do not recognize a singleLF.

Extended M3U

[edit]

The M3U file can also include comments, prefaced by the "#" character. Inextended M3U, "#" also introduces extended M3U directives which are terminated by a colon ":" if they support parameters.

M3U extensions
DirectiveDescriptionExampleRequiredStandard
#EXTM3Ufile header, must be the first line of the file#EXTM3UYes
#EXTINF:track information: runtime in seconds, then optional display title of the following resource.
For runtime, a length of -1 or 0 may be used when media is a streaming file with no predefined length.
#EXTINF:123,Artist Name – Track Title␤
artist - title.mp3
NoYes
additional properties as key-value pairs#EXTINF:123 logo="cover.jpg",Stream Title␤
http://example.org/live.strm
NoIPTV
#PLAYLIST:playlist display title#PLAYLIST:Music TVIPTV
#EXTGRP:begin named grouping#EXTGRP:Foreign ChannelsNoIPTV
#EXTALB:album information, title in particular#EXTALB:Album Title (2009)AL,[9] M3A[10]
#EXTART:album artist#EXTART:VariousAL,[9] M3A[10]
#EXTGENRE:album genre#EXTGENRE:Jazz FusionAL[9]
#EXTM3Aplaylist for tracks or chapters of an album in a single file#EXTM3AM3A[10]
#EXTBYT:file size in bytes#EXTBYT:34124NoM3A[10]
#EXTBIN:binary data follows, usually concatenated MP3s#EXTBIN:NoM3A[10]
#EXTALBUMARTURL:url of album art image#EXTALBUMARTURL:https://example.com/a1b2c3d4.jpgNoJamendo/VLC[11]

M3U8

[edit]

The use ofUTF-8 encoding is mandatory in M3U playlists with theM3U8 file extension. Thesystem codepage is usually assumed for ".m3u" but this is often UTF-8 as well nowadays so the distinction has mostly been lost in practice.

HLS

[edit]

Apple used the extended M3U format, UTF-8 encoded, as a base for theirHTTP Live Streaming (HLS)[12] which was documented in an Independent Submission Stream RFC in 2017 asRFC 8216.[13] Therein, amaster 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-.

HLS M3U extensions
DirectiveExampleDescription
#EXT-X-START:TIME-OFFSET=0
#EXT-X-INDEPENDENT-SEGMENTSToggle without parameters
#EXT-X-PLAYLIST-TYPE:VOD orEVENT
#EXT-X-TARGETDURATION:10The maximum Media Segment duration in seconds
#EXT-X-VERSION:4
#EXT-X-MEDIA-SEQUENCE:0The Media Sequence Number of the first Media Segment appearing in the playlist file
#EXT-X-MEDIA:NAME="English", TYPE=AUDIO, GROUP-ID="audio-stereo-64", LANGUAGE="en", DEFAULT=YES, AUTOSELECT=YES, URI="english.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=1123000, CODECS="avc1.64001f,mp4a.40.2"Parameters have either one combined value or one per stream, separated by commas
#EXT-X-BYTERANGE:1024@256000
#EXT-X-DISCONTINUITYtoggle without parametersThe segment represents the start of a new period
#EXT-X-DISCONTINUITY-SEQUENCE:2Indicates start of numbering of periods
#EXT-X-GAPtoggle without parametersThe segment represents a "spacer" before a new period
#EXT-X-KEY:METHOD=NONEIndicates encryption method used and decryption key
#EXT-X-MAP:URI=MediaInitializationSection
#EXT-X-PROGRAM-DATE-TIME:2010-02-19T14:54:23.031+08:00ISO 8601 format
#EXT-X-DATERANGE:ID=foo
#EXT-X-I-FRAMES-ONLYi-frame Toggle without parameters
#EXT-X-SESSION-DATA:DATA-ID=com.example.movie.title
#EXT-X-SESSION-KEY:
#EXT-X-ENDLISTEnd-of-list signal without parameters

IPTV

[edit]

With television broadcasting via the internet protocol (IPTV), M3U playlists are frequently used to store the (start) URLs of the streams, so each entry represents a channel. As usual for continuous streams, the length info directly after#EXTINF: is set to-1. Unlike HLS, other structured information is not provided in separate info lines but with a key–value syntax before the mandatory comma following the length.

#EXTINF:-1 tvg-id="123" tvg-name="Channel Name" tvg-logo="http://example.com/logo.png" group-title="Examples", Channel Namertsp://example.com/stream
IPTV #EXTINF length value extensions
AttributeExampleDescription
Groupgroup-title="News"named (thematic) group of channels, i.e. a genre
tvg-group="Music/Rock"named group of channels, some players support a hierarchical separator within the value
Logotvg-logo="/logos/channel.png"URL to channel logo image file
Nametvg-name="Channel TV"usually the same name repeated after the comma, but can differ to matchdisplay-name in XMLTV
Numbertvg-chno="12"channel number
CUIDtvg-id="1234"unique identifier to linkEPG info with (e.g. usingchannel-id inXMLTV)
Countrytvg-country="NZ"origin country of the channel, possibly usingISO 3166 codes
Languagetvg-language="English"main audio language of the channel, possibly usingISO 639 codes
Radioradio=trueboolean value to mark audio-only channels

Internet media types

[edit]

The onlyInternet media type registered for M3U and M3U8 isapplication/vnd.apple.mpegurl, registered in 2009 and only referring to the playlist format as used in HLS applications.[14][15]

The current[when?] proposal for the HLS playlist format acknowledges two media types which it treats as equivalent:application/vnd.apple.mpegurl andaudio/mpegurl.[12] Likewise, these are the two types recommended for HLS use by Microsoft.[16]

For non-HLS applications, no media types were standardized or registered with theIANA, 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[1][2]

These types, plusapplication/vnd.apple.mpegurl andapplication/vnd.apple.mpegurl.audio, are supported for HLS applications by (for example) Microsoft'sWindows 10[16] andInternet Explorer 9,[17] and LG'sWebOS.[18]

Example

[edit]

The following is an example of an M3U playlist file for "Jar of Flies" album by "Alice in Chains" that was created byMp3tag with the following custom option settings:[19][20][21]

  • 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

[edit]

Tag editors

[edit]
See also:Category:Tag editors

The followingtag editor software allows users to edit theID3 tags inMP3 files, and has support for creating M3U files.

Linux
Windows
macOS

Media players

[edit]
See also:Category:Media players

The following media player software supports playing M3U files.

Multi-platform
ProgramsPlatforms
WindowsmacOSLinuxAndroidOther
AmarokYesNoYesNoNo
AudaciousYesNoYesNoNo
BansheeYesYesYesNoYes
ClementineYesYesYesNoYes
foobar2000YesYesNoYesYes
KodiYesYesYesYesYes
MOC (Music on Console)NoNoYesNoYes
MPlayerYesYesYesYesYes
mpvYesYesYesYesYes
VLC media playerYesYesYesYesYes
iTunesYesYesNoNoNo
make_playlist (mkpl)YesYesYesNoNo
Android
macOS
Nintendo
Windows

See also

[edit]
Other playlist file formats
  • PLS - SHOUTcast
  • XSPF - Xiph.Org Foundation

References

[edit]
  1. ^abcdFraunhofer Gesellschaft, Fraunhofer Institut für Integrierte Schaltungen-A (1996-10-30)."WinPlay3 - Windows real-time ISO/MPEG Audio Layer 3 Player". Archived fromthe original on 1997-06-06. Retrieved2018-01-21.
  2. ^abGruett, Matt."M3U FILES AND STREAMING".LockerGnome. Archived fromthe original on 2001-04-26.
  3. ^"WINAMP.COM | Winamp Documentation". June 6, 2002. Archived fromthe original on 2002-06-06.
  4. ^"VideoLAN-SA-0804 (CVE-2007-6683)". 2008.Arbitrary file overwrite and other abuses through M3U parser and browsers plugins.
  5. ^"CVE-2012-0677: Heap-based buffer overflow in Apple iTunes before 10.6.3 allows remote attackers to execute arbitrary commands".cve.circl.lu.
  6. ^"CVE-2000-0624: Buffer overflow in Winamp 2.64 and earlier allows remote attackers to execute arbitrary commands via a long #EXTINF: ext".www.cvedetails.com.
  7. ^"247 search results".Packet Storm. Retrieved2018-01-23.
  8. ^"Nero 2015 Platinum - System Requirements". Archived fromthe original on 2019-08-13.MP3 URL + UTF-8 (M3U8)
  9. ^abc"Album List for Winamp".albumlist.sourceforge.net. Archived fromthe original on 2008-08-21.
  10. ^abcde"M3A (M3U Album) Format". birdcagesoft. Retrieved2019-10-21.
  11. ^"m3u: use the album art provided by jamendo along with the m3u files". 21 July 2010.
  12. ^ab"About the Common Media Application Format with HTTP Live Streaming | Apple Developer Documentation".developer.apple.com.
  13. ^R. Pantos and W. May (August 2007).HTTP Live Streaming. RFC Editor. sec. 4.3.doi:10.17487/RFC8216.ISSN 2070-1721.RFC8216.
  14. ^"Media Types".www.iana.org.
  15. ^"Media Type Registration for vnd.apple.mpegurl". IANA. Retrieved2019-10-21.
  16. ^ab"Simplified Adaptive Video Streaming: Announcing support for HLS and DASH in Windows 10 – IEBlog".blogs.msdn.microsoft.com.
  17. ^"HTMLVideoElement".MDN Web Docs. 10 April 2025.
  18. ^"::: LG Developer | Audio & Video :::". Archived fromthe original on 2015-12-22. Retrieved2015-12-12.
  19. ^"Mp3tag Help - Configuration > Export".help.mp3tag.de.
  20. ^"Mp3tag Help - Configuration > Playlist".help.mp3tag.de.
  21. ^"Mp3tag Help - Scripting functions".help.mp3tag.de.
  22. ^"Loading..."astroplayer.com. Archived fromthe original on December 1, 2009.
  23. ^"Astro Player (old) - Sidenis LLC". Archived fromthe original on March 3, 2016.
  24. ^"Astro Player - Sidenis LLC". Archived fromthe original on March 3, 2016.
  25. ^"n7player Music Player - Apps on Google Play".play.google.com.
  26. ^"n7player 1.0 - Apps on Google Play".play.google.com.
  27. ^"Musicolet Music Player [No ads] - Apps on Google Play".play.google.com. Retrieved2020-11-02.
  28. ^Hindley, Nathan."XMPlay 3.8.2".XMPlay. Un4seen Developments. Retrieved11 July 2016.

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=M3U&oldid=1338757082"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp