File Information Schemas

URI Lists

Media Type(s):
application/mpegurl, application/vnd.apple.mpegurl, application/x-mpegurl, audio/mpegurl, audio/x-mpegurl, text/uri-list, video/vnd.mpegurl.
Extension:
.hls, .m3u, .m3u8, .m4u, .mxu, .uri, .uris.
Latest Version:
https://ns.sm0tvi.net/File/text/uri-list/index.shtml

Introduction

M3U —

Extension: .m3u, .m3u8.
Media Type: application/mpegurl, application/x-mpegurl, audio/mpegurl, audio/x-mpegurl, video/mpegurl, video/x-mpegurl.

#EXTENC — File Encoding Tag

m3u-encoding
         ::= "#EXTENC:" HSP character-set EOL
character-set
         ::= token / quoted-string
Listing #:

#EXTINF — Track Information Tag

info-tag ::= "#EXTINF:" duration (HSP+ parameter HSP*)* "," title? EOL
parameter
         ::= attribute "=" value
value    ::= token | quoted-string
duration ::= "-1" | [0-9]+  ("." [0-9][0-9][0-9]+)?
Listing #:

M4U —

Extension: .m4u, .mxu.
Media Type: video/vnd.mpegurl.

This media type consists of a series of URLs of MPEG Video files. [#]

HLS

Extension: .hls, .m3u8.
Media Type: application/vnd.apple.mpegurl.

URI — Enhanced URI List Format

Extension: .uri, .uris.
Media Type: text/uri-list.

#EXTURI
#EXTMETA PATTERN="/^urn:ietf:rfc:0*(?<number>\d+)/i"
#EXTMETA LANG="en"
#EXTLINK HREFLANG="en" TYPE="text/html"
#EXTLINK TITLE="HTML"
https://www.rfc-editor.org/rfc/rfc{number}.html
#EXTLINK HREFLANG="en" REL="alternate" TYPE="text/plain"
#EXTLINK TITLE="Plain Text"
https://www.rfc-editor.org/rfc/rfc{number}.txt
#EXTLINK HREFLANG="en" REL="alternate" TYPE="application/pdf"
#EXTLINK TITLE="PDF"
https://www.rfc-editor.org/rfc/pdfrfc/rfc{number}txt.pdf
Listing #: Example of an .uri file with a template to allow linking to an RFC from a URN

Albeit URN resolvers were the originally intended applications for the format, [#] it has found use as the format for drag and drop links and link lists in web browsers.

Base Format

The original format of text/uri-list resources specified in RFC 2483 is: [#]

  1. Any lines beginning with the '#' (ASCII %24) character are comment lines and are ignored during processing. (Note that URIs may contain the '#' character, so it is only a comment character when it is the first character on a line.)
  2. The remaining non-comment lines shall be URIs (URNs or URLs), encoded according to the URL or URN specifications (RFC 2141, RFC 1738 and RFC 2396). Each URI shall appear on one and only one line. Very long URIs are not broken in the text/uri-list format. Content-transfer-encodings may be used to enforce line length limitations.
  3. As for all text/* formats, lines are terminated with a CRLF (ASCII %OD %OA) pair.

In applications where one URI has been mapped to a list of URIs, the first line of the text/uri-list response SHOULD be a comment giving the original URI.

#EXTURI — File Header

Identifies this file as an enhanced URI list file. It MUST be the first line in the file for it to be identified as an URI list file.

#EXTMETA — File Metadata Tag

charset — Character Set Attribute

If not explictly given via Content-Type: header or #EXTMETA charset parameter, decoding software SHOULD assume the character set to be UTF-8.

description — Description Attribute

lang — lang Attribute

title — Title Attribute

Software Considerations

Software libraries which parse and output text/uri-list files SHOULD be made able to parse the sibling formats (i.e. */*mpegurl) as well.

1. Is the first line of the file “#EXTURI”?
   If it is, file is an “URI” file, return “URI”
2. Is the first line of the file “#EXTM3U”?
   If it is, the file could be either a “M3U” or “HLS” file.
    a. Does the file contain any lines beginning with “#EXT-X-”?
       If it does, file is a “HLS” file, return “HLS”.
       Otherwise, file is a “M3U” file, return “M3U”.
3. Otherwise, file is of hitherto unknown format, return “UNKNOWN”.
Listing #: Pseudocode listing for algorithm to determine file type.

Security Considerations

Client software should be aware of the security considerations of URIs. For example, accessing some URIs can result in sending a death threat to a head of state, frequently prompting a visit from the relevant protective service. Accessing other URIs may result in financial obligations, or access to resources considered inappropriate by one's employer.

While the legitimate provider of a uri-list could exploit these properties for good or ill, it is more likely that uri-lists will be falsified in order to exploit such characteristics of URIs.

Additionally, the lookup and reverse lookup potential of the uri-list may be attractive to traffic analysts. URI lists may also reveal confidential information, such as the location of sensitive information.

Because of these considerations, external confidentiality measures should be available to protect uri-list responses when appropriate.

Glossary

Words and terms introduced in this document.

pseudocode:
(computing) In computer science, pseudocode is a plain language description of the steps in an algorithm or another system. Pseudocode often uses structural conventions of a normal programming language, but is intended for human reading rather than machine reading.
Pseudocode has various styles, often influenced by different programming languages, such as Fortran, Pascal, C, Structured Basic, or Scratch styles.
See also the English Wikipedia article on ”Pseudocode”.

References and Further Reading