Reputation: 337
how can I create a .m3u playlist file with .mp3
and .m4a
files in it using debian linux please?
I tried this but the end-result is non-playable ls -w 1 *.m4a *.mp3> ~/.mpd/playlists/beeb-radio.m3u
.
It lists all the files with the correct extensions but when I try to load it in MPD, it says that the song is non-playable.
Upvotes: 2
Views: 3421
Reputation: 1
I use the mkpl
tool.
For your purpose the command is like this:
mkpl -d beeb-radio/ -a -r -f mp3 m4a ~/.mpd/playlists/beeb-radio.m3u
-d
or --directories
-> Directories that contains multimedia files
-f
or --format
-> Select only a file format
-a
or --absolute
-> Absolute file name
-r
or --recursive
-> Recursive search
~/.mpd/playlists/beeb-radio.m3u
-> playlist file
Upvotes: 0
Reputation: 337
The source directory is ~/Music/beeb-radio/ and the target directory is ~/.mpd/playlists
and the relevant code is -
cd ~/Music
ls -1 beeb-radio/*.{mp3,m4a} > ~/.mpd/playlists/beeb-radio.m3u'
This creates the file 'beeb-radio.m3u' which is instantly playable by MPD if put into its playlist directory.
Upvotes: 1