Post Reply 
Playlists on MacOS
03-12-2024, 09:26
Post: #1
Playlists on MacOS
Hi Simon, Hi Support Forum,

Can I create a playlist with .m3u8 , from a folder in which there are music files in the .FLAC format,
not from Apple Music /iTunes, but from any external folder in a HDD with music files?
It is not a problem to create the file/contendDir in MINIM properties, but to create the .m3u8 playlist on iMAC with macOS Ventura 13.7.1

Thx für your help !?

Liebe Grüsse
Dr. Alexander Schiemann
Find all posts by this user
Quote this message in a reply
03-12-2024, 11:21
Post: #2
RE: Playlists on MacOS
You can use a text editor such as TextEdit or nano to create a .m3u8 playlist file containing absolute or relative file paths to your audio files. If you use TextEdit, make sure you save the file as plain text.

If the audio files are on an external disk or a network shared folder, this must be mounted on the Mac and the files must be accessed using a path similar to the following:

/Volumes/myHDD/some/folder/path/filename1.m4a
/Volumes/myHDD/other/folder/path/filename2.m4a

The .m3u8 file can be on the external HDD or shared folder or it can be on your local disk.
Find all posts by this user
Quote this message in a reply
03-12-2024, 19:20
Post: #3
RE: Playlists on MacOS
Hi Simon,
it is very tedious to show me the way how to create an M3U8 playlist in text editor.
I open the audio files as .flac in text editor and then?
please ...
Thx Alexander
Find all posts by this user
Quote this message in a reply
03-12-2024, 22:20
Post: #4
RE: Playlists on MacOS
You don't open your .flac files in a text editor. A .m3u8 playlist file is a plain text file containing a list of file paths for audio files. The file paths can be absolute or they can be relative to the folder containing the .m3u8 file.

Here is an example with absolute paths:

The playlist file path is /Users/myUser/myMusic/myPlaylists/example1.m3u8. It contains the following lines:

/Users/myUser/myMusic/Album1/file1.flac
/Users/myUser/myMusic/Album2/file2.flac
/Users/myUser/myMusic/Album3/file3.flac

Here is an example with relative paths:

The playlist file path is /Users/myUser/myMusic/myPlaylists/example2.m3u8. It contains the following lines:

../Album1/file1.flac
../Album2/file2.flac
../Album3/file3.flac

Using relative paths allows the playlist file and audio files to be moved to a different location without needing to edit the playlist file.

Here is an example with audio files on a mounted volume and absolute paths:

The playlist file path is /Users/myUser/myMusic/myPlaylists/example3.m3u8. It contains the following lines:

/Volumes/myHDD/otherMusic/Album1/file1.flac
/Volumes/myHDD/otherMusic/Album2/file2.flac
/Volumes/myHDD/otherMusic/Album3/file3.flac
Find all posts by this user
Quote this message in a reply
04-12-2024, 01:27
Post: #5
RE: Playlists on MacOS
You may find more examples and explanation of the format of an .m3u8 text file at
https://www.dacast.com/blog/m3u8-file/
Find all posts by this user
Quote this message in a reply
04-12-2024, 09:57
Post: #6
RE: Playlists on MacOS
I have no idea if this will work on macOS, but you could script it:

Code:
PLAYLIST_DIR="/Users/myUser/myMusic/myPlaylists"

RELATIVE_PATH=$(realpath -m --relative-to="$PLAYLIST_DIR" "$PWD")
find . -name "*.flac" -printf "%f\0" | awk -v PATH="${RELATIVE_PATH}/" 'BEGIN {RS="\0"}; {print PATH$0}' > "playlist.m3u8"

If you run this within the folder containing the FLAC files it will generate playlist.m3u8 containing relative paths, which would need moving to the playlist root.

It can be changed to write directly to the playlist folder but I thought it safer to start with to write to the current directory.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)