I am rewriting my media player but have no idea what a 'standard' playlist is or what file extension or the contents are.
I have several playlists in my media player, in my format, but I am thinking if I can download an existing playlist and import into the player it could make things easier when defining them.
Tried looking on the internet but get no joy, it seems most are specific to individual players or I cannot download the playlist as a file.
Can anyone enlighten me as to what to look for?
CD
Playlists?
-
- Addict
- Posts: 1309
- Joined: Fri Aug 28, 2015 6:10 pm
- Location: Portugal
Playlists?
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
Re: Playlists?
M3U (file extension) is the most popular playlist type, used by Winamp, iTunes, VLC, and most other media players.collectordave wrote:Can anyone enlighten me as to what to look for?
The file format is plain text (yay!) and described here -> https://en.wikipedia.org/wiki/M3U
In its most basic form, it's just a list of filenames with one file per line. Yep, that simple, and it's what my M3U playlist on my PC looks like.
-
- Addict
- Posts: 1309
- Joined: Fri Aug 28, 2015 6:10 pm
- Location: Portugal
Re: Playlists?
Thanks BarryG
Just looked at the example and it seems the M3U file is placed in the folder where the music is and the list is just a list of relative paths to the actual song files.
There seems to be an extended version as well which seems to have length of track artist and song title as a separate entry.
I will stick to the simple one first as that matches what I store for my playlist.
regards
CD
Just looked at the example and it seems the M3U file is placed in the folder where the music is and the list is just a list of relative paths to the actual song files.
There seems to be an extended version as well which seems to have length of track artist and song title as a separate entry.
I will stick to the simple one first as that matches what I store for my playlist.
regards
CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
Re: Playlists?
Tip : take the "relative format" as when you move the music to another place... a lot of simple work to do all over.
See Example 3 on the wiki page.
See Example 3 on the wiki page.
Yeah I know, but keep in mind ... Leonardo da Vinci was also an autodidact.
Re: Playlists?
Not always - I use Winamp but my music folder is elsewhere.collectordave wrote:it seems the M3U file is placed in the folder where the music is
My folder structure:
Code: Select all
D:\Apps\Winamp\Winamp.exe
D:\Apps\Winamp\Playlist.m3u
D:\Music\Song1.mp3
D:\Music\Song2.mp3
Code: Select all
\Music\Song1.mp3
\Music\Song2.mp3
Re: Playlists?
It sounds like you're interested in reading playlists more than creating them.
For what it's worth, I knew I had a M3U writer IncludeFile. I checked it out today and it's just 3 procedures
For what it's worth, I knew I had a M3U writer IncludeFile. I checked it out today and it's just 3 procedures
Code: Select all
Procedure.i CreateM3U(File.i, FileName.s)
Protected Result.i = CreateFile(File, FileName)
If (Result)
If (File = #PB_Any)
File = Result
EndIf
WriteStringN(File, "#EXTM3U")
EndIf
ProcedureReturn (Result)
EndProcedure
Procedure AddM3UEntry(File.i, URL.s, Title.s = "", Seconds.i = 0)
WriteStringN(File, "#EXTINFO:" + Str(Seconds) + "," + Title)
WriteStringN(File, URL)
EndProcedure
Procedure.i CloseM3U(File.i)
CloseFile(File)
ProcedureReturn (#Null)
EndProcedure