Problems reading square brackets in existing/external m3u playlists

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.

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

Re: VLC does not show any folder or track names if they contain the characters "[" or "]"!

Postby Rémi Denis-Courmont » 14 Jan 2022 17:45

This is already supported in VLC 3.0.17 onward, though it is obviously preferable to use URL encoding for backward compatibility.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

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

Re: VLC does not show any folder or track names if they contain the characters "[" or "]"!

Postby Rémi Denis-Courmont » 14 Jan 2022 17:51

Ok, so you can see here very nicely that VLC stores the characters wrong!
No. VLC uses URL encoding, perfectly fine.
That can't work then, if it compares these in the format with the data in the lists!
Well, the thing is that it does work, as Aza already pointed out.
No other program does this obviously,
...except literally thousands of programs and services such as web radios do or did put URLs in M3U files like VLC does, not to mention that that's how Apple HLS works too. As a matter of fact, the U in M3U stands for URL, for good reasons.

I can't speak for the broken programs that don't understand URLs.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

RobAtx
Blank Cone
Blank Cone
Posts: 18
Joined: 07 Jan 2022 17:17

Re: VLC does not show any folder or track names if they contain the characters "[" or "]"!

Postby RobAtx » 14 Jan 2022 18:32

Sorry for the late answer, I've been quite busy these last days.

To be honest, it's not the part I know the most / I work on. I will move this discussion in the general section as it's relevant for all VLC's ports.
Thanks for your effort, I'll deal with this topic a bit more intensively myself!

There are not many music apps that provide these playlists externally at all, so I honestly have not yet dealt much with the standard, if there is a standardized here at all!

I'm taking a closer look at AIMP right now. This is one of the few, but rather very old players that can store playlists externally.
These M3U lists are masked as you showed me, but strangely enough he understands my unmasked lists when playing without any problems!

So I still think this should be possible, because all the ones I tested so far have no problems with unmasked data and I still ask to fix this little shortcoming if possible!

VLC is such a great universal player, also available from fdroid, I don't want to look for other apps anymore, it's the best player for me besides handling external playlists!
Thanks to all developers, this great software!

RobAtx
Blank Cone
Blank Cone
Posts: 18
Joined: 07 Jan 2022 17:17

Re: VLC does not show any folder or track names if they contain the characters "[" or "]"!

Postby RobAtx » 14 Jan 2022 19:05

This is already supported in VLC 3.0.17 onward, though it is obviously preferable to use URL encoding for backward compatibility.
------------------------------
This is once again probably an encoding issue on your part.

I once again tried with a generated m3u file from VLC with a path looking like yours and here is what I got:

Generated by VLC desktop, working:

Code: Select all

#EXTM3U #EXTINF:45,With brackets in folder ../Folder/Folder%20(3)/Artist-folder%20%5BDisc%202%5D/01%20Title%20%5BUK%5D.mp3
Generated by hand, not working:

Code: Select all

#EXTM3U #EXTINF:45,With brackets in folder ../Folder/Folder (3)/Artist-folder [Disc 2]/01 Title [UK].mp3
These characters need to be escaped. BTW, the second one doesn't open on VLC desktop either.
---------------------------
"These characters need to be escaped. BTW, the second one doesn't open on VLC desktop either."

"This is already supported in VLC 3.0.17 onward, though it is obviously preferable to use URL encoding for backward compatibility."

Sorry but, i find these two statements somewhat contradictory!

RobAtx
Blank Cone
Blank Cone
Posts: 18
Joined: 07 Jan 2022 17:17

Re: VLC does not show any folder or track names if they contain the characters "[" or "]"!

Postby RobAtx » 14 Jan 2022 19:29

----


Thanks for the listing!

I really thought already, can it be that only me this problem bothers!

I have now only briefly read into these posts, but I really wonder, if this "compatibility problem" is really known for so long and there are apparently a few really enervated users by it, can not even make an exception and fix this little thing?

I mean, of course the developers can still say:
"the user should use masked lists".

But as you can read in the posts, others are also of the opinion that the unmasked lists are accepted by all other programs without any problems!

Why doesn't the VLC team want to deliver a perfect piece of software in this point, as it does in almost all other categories?

Namely also in the category of usability!

Please solve this little thing, this can only be a simple problem for you!

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

Re: VLC does not show any folder or track names if they contain the characters "[" or "]"!

Postby Rémi Denis-Courmont » 14 Jan 2022 21:50

This is already "solved" in 3.0.17. We can't solve something that's already solved, and we can't go back in time to change old releases either.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

RobAtx
Blank Cone
Blank Cone
Posts: 18
Joined: 07 Jan 2022 17:17

Re: Problems reading square brackets in existing/external m3u playlists

Postby RobAtx » 14 Jan 2022 22:13

This is already "solved" in 3.0.17. We can't solve something that's already solved, and we can't go back in time to change old releases either.
???

Did you not read my posting above?

How can the problem be solved when one of your developers confirmed to me the day before yesterday on 12.1.2021 that it does not work without masking:
--------------------
Original statement from Aza:

Generated by hand, not working:

Code: Select all
#EXTM3U
#EXTINF:45,With brackets in folder
../Folder/Folder (3)/Artist-folder [Disc 2]/01 Title [UK].mp3

These characters need to be escaped. BTW, the second one doesn't open on VLC desktop either.
-------------------

Which of you two is right now, can you please clarify this among yourselves.

BTW with me it does not work, I write me but not for fun the fingers sore here!

J0J0
New Cone
New Cone
Posts: 3
Joined: 10 Jul 2022 11:16

Re: Problems reading square brackets in existing/external m3u playlists

Postby J0J0 » 10 Jul 2022 11:49

I can confirm that opening an m3u8 file _without_ %-encoded local paths does work in the currently latest VLC (3.0.17.3) on macOS 10.15.7 Catalina.

Here is a portion of the m3u8 file:

Code: Select all

#EXTM3U Amon Tobin - One Offs... Remixes & B Sides - Four Ton Mantis (Bonobo mix) [TRUCD031] (2002).mp3 Amon Tobin - Foley Room - Bloodstone feat. Kronos Quartet [ZENDNL121] (2007).mp3 Amon Tobin - Foley Room - Esther's [ZENDNL121] (2007).mp3 Amon Tobin - Foley Room - Keep Your Distance [ZENDNL121] (2007).mp3 Amon Tobin - Foley Room - The Killer's Vanilla [ZENDNL121] (2007).mp3 ... ...
I can also confirm that the exact same file didn't open in the VLC version I had used before (3.0.16.)

Hope that helps anyone stumbling across this thread while figuring out why m3u8 files don't open in certain older VLC versions.

J0J0
New Cone
New Cone
Posts: 3
Joined: 10 Jul 2022 11:16

Re: Problems reading square brackets in existing/external m3u playlists

Postby J0J0 » 10 Jul 2022 12:08

I just realised that there still is a certain character that doesn't work in m3u8 files _without_ %-encoded local paths. Here is an example. This file basically opens correctly but the two file names containing the # character throw an error in VLC that they can't be played when double clicked on them in the VLC playlist window:

Code: Select all

#EXTM3U /Users/jojo/Downloads/tmp/Squarepusher - Music Is Rotted One Note - Ruin [NTH-90294] (1998).mp3 /Users/jojo/Downloads/tmp/Squarepusher - Music Is Rotted One Note - Last Ap Roach [NTH-90294] (1998).mp3 /Users/jojo/Downloads/tmp/Squarepusher - Budakhan Mindphone - Splask [WARP LP 62] (1999).mp3 /Users/jojo/Downloads/tmp/Squarepusher - Budakhan Mindphone - Two Bass Hit (dub) [WARP LP 62] (1999).mp3 /Users/jojo/Downloads/tmp/Squarepusher - Selection Sixteen - Freeway [6648909962] (1999).mp3 /Users/jojo/Downloads/tmp/Squarepusher - Selection Sixteen - 8 Bit Mix #2 [6648909962] (1999).mp3 /Users/jojo/Downloads/tmp/Squarepusher - Go Plastic - Metteng Excuske V1.2 [WARPCD85] (2001).mp3 /Users/jojo/Downloads/tmp/The Bug - London Zoo - Angry feat. Tippa Irie [ZENCD132] (2008).mp3 /Users/jojo/Downloads/tmp/The Bug - London Zoo - Insane feat. Warrior Queen [ZENCD132] (2008).mp3 /Users/jojo/Downloads/tmp/Florence + the Machine - You've Got The Love [single] - You've Got the Love (The xx remix) [] (2009).mp3 /Users/jojo/Downloads/tmp/EQD - Equalized #004 - [untitled] [EQD004] (2010).mp3 /Users/jojo/Downloads/tmp/Cosmin TRG - Simulat - Samiska [50WEAPONS03CD] (2011).mp3

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

Re: Problems reading square brackets in existing/external m3u playlists

Postby Rémi Denis-Courmont » 10 Jul 2022 13:59

This thread was about brackets.

The hash sign is a separator in this context. It must be encoded if it is used as a regular consituent of the file name. This is intended. VLC is not in a position to redefine URL syntax.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

J0J0
New Cone
New Cone
Posts: 3
Joined: 10 Jul 2022 11:16

Re: Problems reading square brackets in existing/external m3u playlists

Postby J0J0 » 10 Jul 2022 16:00

I am well aware that this thread was about brackets, I still think that it fits well within this context since mostly it is talked about in this thread about VLC's readability of %-encoded and not encoded m3u files :-) I hope it's ok for you to keep this context without opening a new thread?

Out of curiousity and since I need to generate m3u files in a PR I am working on for another FOSS project, I asked Python 3.9 how it would urlencode the # in a path:

Code: Select all

>>> from urllib.parse import urlparse >>> urlparse("/path/file_#_foo.bar") ParseResult(scheme='', netloc='', path='/path/file_', params='', query='', fragment='_foo.bar') >>> urlparse("/path/file_/_foo.bar") ParseResult(scheme='', netloc='', path='/path/file_/_foo.bar', params='', query='', fragment='') >>>
Indeed it seems it would consider it a kind of separator. I'm about to read the docs to find out what the fragment thing that's returned really is.....
Update: Alright, it's right there: https://docs.python.org/3.9/library/url ... e.urlparse and it's obvious: In eg. a URL for the web the # is eg. to link to #anchors and probably for other things I am not aware of. Anyway, got it, in a URL it definitely has a very special meaning and certainly can't be used unescaped.

The question I am asking myself now is: Is a local file path without URL-encoding per definition a URL? Are hashes forbidden in paths on macOS, Linux and Windows? I'll start to research this now but if you find the time and since you seem to be the main coder of a platform independet tool you might be able to know by heart. Thanks in advance!

This seems to be the most comprehensive information I found so far. Will look deeper, but by now I can't find that the hash is particulary forbidden to use in local path names: https://superuser.com/questions/358855/ ... ows-and-os


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 47 guests