What is MIME type "audio/x-scpls"?
A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.
The file typically contains entries with URLs or file paths and may include metadata like track title and duration. Media players read it to know what to play and in which order.
Key uses:
- Media Playback: Helps players queue and play multiple audio files sequentially.
- Streaming Audio: Organizes online radio or streaming audio sources by listing their URLs.
- Playlist Management: Simplifies the creation and sharing of curated audio lists.
For more details on how these playlists work, see PLS playlist.
Associated file extensions
Usage Examples
HTTP Header
When serving content with this MIME type, set the Content-Type header:
Content-Type: audio/x-scpls
HTML
In HTML, you can specify the MIME type in various elements:
<a href="file.dat" type="audio/x-scpls">Download file</a>
Server-side (Node.js)
Setting the Content-Type header in Node.js:
const http = require('http');
http.createServer((req, res) => {
res.setHeader('Content-Type', 'audio/x-scpls');
res.end('Content here');
}).listen(3000);
Associated file extensions
FAQs
What kind of file uses the audio/x-scpls MIME type?
This MIME type is strictly associated with PLS playlist files. Unlike actual audio files, a file served as audio/x-scpls is a text file containing a list of file locations or stream URLs that a media player should play in sequence. It is most commonly seen with internet radio stations utilizing SHOUTcast technology.
How do I configure a web server to serve .pls files correctly?
To ensure browsers and media players recognize the playlist, you must map the extension to the MIME type. For Apache, add AddType audio/x-scpls .pls to your .htaccess file. For Nginx, add audio/x-scpls pls; inside your types { } block in mime.types or nginx.conf.
Why does my browser download the PLS file instead of playing the music?
Browsers generally do not have native support for parsing and playing PLS playlists directly within the web page. Instead, the browser downloads the file so it can be handed off to a dedicated media player app (like VLC, Winamp, or iTunes) installed on your computer that is registered to handle audio/x-scpls.
What is the difference between audio/x-scpls and audio/mpeg?
The difference is the content type: audio/mpeg contains actual sound data (like an MP3), while audio/x-scpls contains text instructions pointing to that sound data. If you try to play a PLS file as if it were an MP3, your player will likely return an error because it cannot decode text as audio.
Can I edit a file with the audio/x-scpls MIME type?
Yes, because these files are plain text formatted similarly to Windows .ini files. You can open a file with the .pls extension in any standard text editor (like Notepad or TextEdit) to modify the URLs, titles, or track ordering manually.
What does the 'x-' prefix mean in audio/x-scpls?
The x- prefix indicates that this is a non-standard or proprietary MIME type, specifically originating from ShoutCast Playlist (scpls). While not an IETF standard, it is the de facto standard for PLS files and is supported by almost all streaming audio clients.
How does audio/x-scpls compare to audio/x-mpegurl?
Both are playlist formats, but audio/x-scpls denotes the PLS format (which includes metadata like headers and track length), while audio/x-mpegurl is used for M3U files (which are simple lists of URLs). Media players distinguish between them to parse the text structure correctly.
General FAQ
What is a MIME type?
A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.
MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.
MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.
How do I find the MIME type for a file?
You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.
Why are multiple MIME types listed for one extension?
Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.