Playlist m3u wrong encoding / chars

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
pepi01
New Cone
New Cone
Posts: 5
Joined: 01 May 2018 22:27

Playlist m3u wrong encoding / chars

Postby pepi01 » 01 May 2018 22:34

Hello,

I use quite a lot VLC for the playlists inside my USB drive that i use on my car to have music playlist. Till here all fine, on VLC < 3.0 I just drag drop the music from the USB Drive to VLC, save playlist as m3u and no issues.

Since the newer versions 3.0 i noticed something has changed in the way to deal with playlist.

1. Order or add music
2. Save the playlist as m3u on the same drive
3. When i open the list with the notepad i see wrong encoding (as spaces with %20 etc...)

Is there some workaround or maybe some setting has changed since the update?
On other computer I've 2.2.6 and i can edit / save and i don't find issues.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Playlist m3u wrong encoding / chars

Postby Jean-Baptiste Kempf » 02 May 2018 17:28

And the player cannot read those % ?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

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

Re: Playlist m3u wrong encoding / chars

Postby Rémi Denis-Courmont » 03 May 2018 15:14

This sounds correct, actually. Does the playlist generated by VLC 3.0 not open correctly inside VLC 2.2 and 3.0 ?
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

pepi01
New Cone
New Cone
Posts: 5
Joined: 01 May 2018 22:27

Re: Playlist m3u wrong encoding / chars

Postby pepi01 » 04 May 2018 20:44

Actually some songs are not recognized using another VLC.
However the main issue it's regarding another devices, like the car, he don't recognize the playlist at all.

I though was due some encoding difference but i converted from ANSI to UTF8 and same result, creating the Playlist using VLC 3.0+ it get generated differently than previous version of VLC in my case... :/

oortone
Blank Cone
Blank Cone
Posts: 20
Joined: 16 Jun 2018 22:41

Re: Playlist m3u wrong encoding / chars

Postby oortone » 16 Jun 2018 22:45

I just had the same problem. I use VLC o create playlists for Sonos (which for some strange reason is too stupid to create them itself) and after updating the new format does not work anymore.

Anyone who knows what this new format where space is replaced with %-signs and stuff is called?

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

Re: Playlist m3u wrong encoding / chars

Postby Rémi Denis-Courmont » 17 Jun 2018 09:49

The file format is MP3 URL, or M3U for short. The lines are URLs.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

oortone
Blank Cone
Blank Cone
Posts: 20
Joined: 16 Jun 2018 22:41

Re: Playlist m3u wrong encoding / chars

Postby oortone » 17 Jun 2018 11:13

Thanks Rémi but I meant what it's called when %-signs and numbers are used instead of blankspace in paths. So it's not the file format but the way to encode paths this way I wanted to know the name of.

oortone
Blank Cone
Blank Cone
Posts: 20
Joined: 16 Jun 2018 22:41

Re: Playlist m3u wrong encoding / chars

Postby oortone » 17 Jun 2018 11:38

I compared this to iTunes and that program does not use %-characters and numbers in it's path descriptions. I wonder why VLC has changed this? I don't think it complies to the standard for m3u playlists:
http://n4k3d.com/the-m3u-file-format/

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

Re: Playlist m3u wrong encoding / chars

Postby Rémi Denis-Courmont » 17 Jun 2018 13:46

Thanks Rémi but I meant what it's called when %-signs and numbers are used instead of blankspace in paths. So it's not the file format but the way to encode paths this way I wanted to know the name of.
It's called URL.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

oortone
Blank Cone
Blank Cone
Posts: 20
Joined: 16 Jun 2018 22:41

Re: Playlist m3u wrong encoding / chars

Postby oortone » 17 Jun 2018 17:49

Thanks Rémi but I meant what it's called when %-signs and numbers are used instead of blankspace in paths. So it's not the file format but the way to encode paths this way I wanted to know the name of.
It's called URL.
No, not really. Replacing characters by the percantage charcter followed by numbers is not in itself called "URL". But you're on to something. The Wikipedia chapter of Internationalized URL:s shed some light upon this:
https://en.wikipedia.org/wiki/URL
"The URL path name can also be specified by the user in the local writing system. If not already encoded, it is converted to UTF-8, and any characters not part of the basic URL character set are escaped as hexadecimal using percent-encoding"


But in the case of VLC-playlists it's mainly the space character that is replaced by %20 so it's not primarily a matter of internationalisation.
The interesting question is how many mp3-player systems that are incompatible with this %-encoding.
Seeems to be quite a few. VLC should have made it a user option to use either classic encoding (WINamp style) or this new encoding style. One could probably argue that the m3u-playlists prouced by VLC nowdays shouldn't even be allowed to be called m3u since they are not compatible with the classic m3u-format.

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

Re: Playlist m3u wrong encoding / chars

Postby Rémi Denis-Courmont » 17 Jun 2018 19:00

Thanks Rémi but I meant what it's called when %-signs and numbers are used instead of blankspace in paths. So it's not the file format but the way to encode paths this way I wanted to know the name of.
It's called URL.
No, not really.
The way VLC formats the lines is called URL. There is no "replacing" involved here. That's what the U in M3U stands for.

Using file paths instead of URLs is out of question. We need URLs to support HTTP, FTP, to avoid codepage problems, and to support moving playlists from one system to another or to the cloud.

I could not care less about broken third party software.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

pepi01
New Cone
New Cone
Posts: 5
Joined: 01 May 2018 22:27

Re: Playlist m3u wrong encoding / chars

Postby pepi01 » 30 Jun 2018 23:47

i need to disagree.
The format i was using it wasn't the URL format, indeed now you can save it and it appears as URL however the behaviour has changed since the last version and now spaces are replaced by different characters etc...

on the previous version i was just putting songs on the playlist, saving it and voila, right now it totally change the "enconding" of the file which makes my car system don't recognize it.. so far I'm using an older version of VLC to adjust the playlist

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

Re: Playlist m3u wrong encoding / chars

Postby Rémi Denis-Courmont » 01 Jul 2018 16:50

Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

oortone
Blank Cone
Blank Cone
Posts: 20
Joined: 16 Jun 2018 22:41

Re: Playlist m3u wrong encoding / chars

Postby oortone » 03 Jul 2018 12:41

That doesn't really "prove" anything since VLC did not use that URL-format with escape charactes until recently but they have called their playlists M3U for ages and so has many other applications not using that "standard".
Unless this M3U file format was specified in real standard like IEEE when it was first implemented there's no truth or right or wrong, instead there's been a practice which VLC now has broken. What you believe "we need" is not an argument, that varies.

Also there's no such thing as "third party software" in this discussion since VLC didn't invent the format or standardized it.

Also the Wikipedia page you refer to have examples not using %-escape characters and it also describes URL:s, relative and absolute paths as valid for the M3U format which means that the URL in the name M3U really means "URL", they uset it in an informal fashion apparently.

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

Re: Playlist m3u wrong encoding / chars

Postby Rémi Denis-Courmont » 03 Jul 2018 18:29

That doesn't really "prove" anything since VLC did not use that URL-format with escape charactes until recently but they have called their playlists M3U for ages and so has many other applications not using that "standard".
If you are implying that VLC invented URLs in M3U, you are being ridiculous. Internet radio channels, and more recently HLS, have used that format for years and years and years.

And there is only one URL format, and it has a proper standard (IETF RFC3986).
Also the Wikipedia page you refer to have examples not using %-escape characters and it also describes URL:s, relative and absolute paths as valid for the M3U format which means that the URL in the name M3U really means "URL", they uset it in an informal fashion apparently.
M3U can contain URLs and file paths, relative or absolute. VLC follows those rules. It reads M3U playlist with relative or absolute, URls or file paths - except for a few unsolvable ambiguous corner cases. It writes M3U playlist containing "URLs or file paths" as well.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

User avatar
InTheWings
Developer
Developer
Posts: 1275
Joined: 07 Aug 2013 13:15
VLC version: crashing
Operating System: Linux
Contact:

Re: Playlist m3u wrong encoding / chars

Postby InTheWings » 04 Jul 2018 10:07

The above mentioned wikipedia examples shows local files not being encoded as URI at all.
That's also the most common way found in the wild.

We probably need to process local files list as encoded only when when %XX is in use
:!: If you want your problem to be solved :
* First read troubleshooting guide VSG:Main
* Always provide verbose LOGS ! (command line or from gui)
* Always check your issue against a developer build from Nightly Build of VLC
* Tell us when your problem is solved !

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Playlist m3u wrong encoding / chars

Postby mederi » 04 Jul 2018 13:02

Since Winamp times there is no percent-encoding/URL encoding of paths of local files in m3u playlists. VLC could also preserve the option to save m3u playlists for local files without the special encoding, just lists of human-readable paths in simple text files (ANSI/UTF8). VLC supports/loads them, but now cannot save them. If a playlist is stored on the same drive, then relative paths should be used, otherwise absolute ones. I suggest to add another m3u saving profile besides current m3u/m3u8 profiles.

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

Re: Playlist m3u wrong encoding / chars

Postby Rémi Denis-Courmont » 06 Jul 2018 19:40

Since Winamp times there is no percent-encoding/URL encoding of paths of local files in m3u playlists. VLC could also preserve the option to save m3u playlists for local files without the special encoding, just lists of human-readable paths in simple text files (ANSI/UTF8). VLC supports/loads them, but now cannot save them. If a playlist is stored on the same drive, then relative paths should be used, otherwise absolute ones. I suggest to add another m3u saving profile besides current m3u/m3u8 profiles.
No. As explained before, this breaks if the playlist is uploaded to remote storage (alongside the files that it refers), as you cannot have relative file paths for non-file resources.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

the_clansman_fr
New Cone
New Cone
Posts: 2
Joined: 08 Jul 2018 10:58

Re: Playlist m3u wrong encoding / chars

Postby the_clansman_fr » 08 Jul 2018 11:04

Hello,
Wanted to use VLC as I use usually to generate m3u files.
As seen on this post that vlc 3.0 and vlc 2.0 does not generate m3u file by the same way.
So, it is a bug.
I've uninstalled vlc 3.0 to install 2.0 and all is working fine.
Is it possible to upgrade vlc 3.0 to make an option concerning m3u generation to keep functionnalities installed in vlc 2.0 soft?
Thanks.

the_clansman_fr
New Cone
New Cone
Posts: 2
Joined: 08 Jul 2018 10:58

Re: Playlist m3u wrong encoding / chars

Postby the_clansman_fr » 08 Jul 2018 11:10

More information:
In the wiki (https://en.wikipedia.org/wiki/M3U) we can see that the format is like this:
#EXTINF:123, Sample artist - Sample title
C:\Documents and Settings\I\My Music\Sample.mp3
#EXTINF:321,Example Artist - Example title
C:\Documents and Settings\I\My Music\Greatest Hits\Example.ogg
As vlc 3.0 does not respect the wiki anymore, vlc 3.0 has a bug.
So an upgrade has to be done.

oortone
Blank Cone
Blank Cone
Posts: 20
Joined: 16 Jun 2018 22:41

Re: Playlist m3u wrong encoding / chars

Postby oortone » 08 Jul 2018 14:26

That doesn't really "prove" anything since VLC did not use that URL-format with escape charactes until recently but they have called their playlists M3U for ages and so has many other applications not using that "standard".
If you are implying that VLC invented URLs in M3U, you are being ridiculous. Internet radio channels, and more recently HLS, have used that format for years and years and years.

And there is only one URL format, and it has a proper standard (IETF RFC3986).
Also the Wikipedia page you refer to have examples not using %-escape characters and it also describes URL:s, relative and absolute paths as valid for the M3U format which means that the URL in the name M3U really means "URL", they uset it in an informal fashion apparently.
M3U can contain URLs and file paths, relative or absolute. VLC follows those rules. It reads M3U playlist with relative or absolute, URls or file paths - except for a few unsolvable ambiguous corner cases. It writes M3U playlist containing "URLs or file paths" as well.
I didn't imply VLC invented URL:s, I explained why you can't refer to the 'U' (as in URL) in the word "M3U playlist" as some kind of proof why VLC should break the way it used to write M3U playlist. The URL format is apparently well defined, the M3U format is not. That's why VLC should have kept the old encoding as an option.

oortone
Blank Cone
Blank Cone
Posts: 20
Joined: 16 Jun 2018 22:41

Re: Playlist m3u wrong encoding / chars

Postby oortone » 08 Jul 2018 14:27

Since Winamp times there is no percent-encoding/URL encoding of paths of local files in m3u playlists. VLC could also preserve the option to save m3u playlists for local files without the special encoding, just lists of human-readable paths in simple text files (ANSI/UTF8). VLC supports/loads them, but now cannot save them. If a playlist is stored on the same drive, then relative paths should be used, otherwise absolute ones. I suggest to add another m3u saving profile besides current m3u/m3u8 profiles.
No. As explained before, this breaks if the playlist is uploaded to remote storage (alongside the files that it refers), as you cannot have relative file paths for non-file resources.
And using the % breaks other things.
Conclusion, they should have both options.

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

Re: Playlist m3u wrong encoding / chars

Postby Rémi Denis-Courmont » 08 Jul 2018 16:06

As vlc 3.0 does not respect the wiki anymore, vlc 3.0 has a bug.
I don't think indiscriminate, excessive, or irrelevant examples in Wikipedia are authoritative, but FWIW, VLC uses the URL format, which is found in Example 4. So it does "respect the wiki".
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

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

Re: Playlist m3u wrong encoding / chars

Postby Rémi Denis-Courmont » 08 Jul 2018 16:09

And using the % breaks other things.
There is a difference between breaking a legitimate use case, and exposing a bug in another software.
Conclusion, they should have both options.
I doubt that the option can be explained in understandable fashion to users. But patch welcome.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

pepi01
New Cone
New Cone
Posts: 5
Joined: 01 May 2018 22:27

Re: Playlist m3u wrong encoding / chars

Postby pepi01 » 09 Jul 2018 22:09

Hello,

I understand the context, however would be possible have an option to choose the encoding method for the M3U ? mostly because the new encoding break the functionality for creating playlist and in my case the car doesn't recognize any of them among other devices i've :(

Maybe can be a feature request?


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 40 guests