Page 1 of 1

M3U files: problems with certain characters?

Posted: 26 Dec 2019 23:56
by jrvjrv
I have two .m3u files that at first glance seem like they should behave the same. These are both on an ubuntu 18.04 machine. One is

/media/jrv/seagate4T/music/Adams, John/BBC Music v11 n2- Andriessen- Short Ride in a Fast Machine, The Chairman Dances, Harmonium/m3u.Harmonium.m3u
and its contents are:
03 Harmonium- I. Negative Love.flac
04 Harmonium- II. Because I Could Not Stop for Death.flac
05 Harmonium- III. Wild Nights.flac

The other is
/media/jrv/seagate4T/music/Mozart, Wolfgang Amadeus/AAM, Schröder, Hogwood- The Symphonies Vol 5 Disc 1/m3u.Symphony in C major K213c[K208].m3u
and its contents are:
01 Symphony in C major K213c[K208]- I. Molto allegro.flac
02 Symphony in C major K213c[K208]- II. Andantino.flac
03 Symphony in C major K213c[K208]- III. Presto assai.flac

The first plays just fine. If I try to play the second nothing happens. In messages vlc says, "main info: playlist is empty"

If I copy the three .flac files in the second .m3u and rename them a1.flac, a2.flac, and a3.flac, then create a test.m3u with those names, vlc works correctly. So it seems that vlc is unhappy with certain characters in the file names. What characters does vlc not like to find in a .m3u file, and is there any way to escape them?

JR

Re: M3U files: problems with certain characters?

Posted: 27 Dec 2019 03:16
by jrvjrv
It seems the square brackets are the problem, and url encoding works to fix it. This works:

01 Symphony in C major K213c%5bK208%5d- I. Molto allegro.flac
02 Symphony in C major K213c%5bK208%5d- II. Andantino.flac
03 Symphony in C major K213c%5bK208%5d- III. Presto assai.flac

Are there any other characters that won't work without encoding?

JR

Re: M3U files: problems with certain characters?

Posted: 21 Jan 2024 13:33
by blueice_haller
Today I came across the same situation with VLC 3.0.20 Vetinary.
Yes there is indeed an character that cause issues: The hyphen - and space around it.
If your m3u is the following, VLC cuts the text before including the hyphen, so that the Title shows just 100% Deutscher Schlager!

Code: Select all

#EXTM3U #EXTINF:0,Radio Paloma - 100% Deutscher Schlager! #EXTVLCOPT:network-caching=1000 http://pool.radiopaloma.de/RADIOPALOMA.mp3 #EXTINF:0,Radio Paloma - 100% Deutscher Schlager! #EXTVLCOPT:network-caching=1000 http://pool.radiopaloma.de/RADIOPALOMA.mp3
I tried to encode the hyphen with %2d and %2D, but then the Title shows Radio Paloma %2d 100% Deutscher Schlager! or Radio Paloma %2D 100% Deutscher Schlager!.

Re: M3U files: problems with certain characters?

Posted: 21 Jan 2024 19:16
by Rémi Denis-Courmont
The defacto format for EXTINF is duration comma author hyphen title, so no surprises there. This is intended behaviour that is followed by most players (not just VLC) AFAIK.

Re: M3U files: problems with certain characters?

Posted: 21 Jan 2024 21:31
by blueice_haller
Thank you. I need to change my example so that it works as expected:

Code: Select all

#EXTM3U #EXTINF:0, - Radio Paloma - 100% Deutscher Schlager! #EXTVLCOPT:network-caching=1000 http://pool.radiopaloma.de/RADIOPALOMA.mp3 #EXTINF:0, - Radio Paloma - 100% Deutscher Schlager! #EXTVLCOPT:network-caching=1000 http://pool.radiopaloma.de/RADIOPALOMA.mp3