M3U files: problems with certain characters?

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
jrvjrv
New Cone
New Cone
Posts: 6
Joined: 19 Nov 2013 20:03

M3U files: problems with certain characters?

Postby jrvjrv » 26 Dec 2019 23:56

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

jrvjrv
New Cone
New Cone
Posts: 6
Joined: 19 Nov 2013 20:03

Re: M3U files: problems with certain characters?

Postby jrvjrv » 27 Dec 2019 03:16

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

User avatar
blueice_haller
Blank Cone
Blank Cone
Posts: 13
Joined: 20 Jul 2008 02:57
VLC version: 3.0.21 Vetinari
Operating System: Windows / Android
Location: Germany

Re: M3U files: problems with certain characters?

Postby blueice_haller » 21 Jan 2024 13:33

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!.
Mit freundlichen Grüßen/Best regards, blueice_haller

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: M3U files: problems with certain characters?

Postby Rémi Denis-Courmont » 21 Jan 2024 19:16

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

User avatar
blueice_haller
Blank Cone
Blank Cone
Posts: 13
Joined: 20 Jul 2008 02:57
VLC version: 3.0.21 Vetinari
Operating System: Windows / Android
Location: Germany

Re: M3U files: problems with certain characters?

Postby blueice_haller » 21 Jan 2024 21:31

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
Mit freundlichen Grüßen/Best regards, blueice_haller


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 23 guests