VLC encounters issues with playlists using open square bracket '['
Description
I attempted to create a playlist of a new album I'd purchased; when I drag-and-dropped the songs into the VLC playlist window they were read and played fine so I saved the playlist. However, when I later attempted to open the playlist, it failed to open. After trial and error I determined that the offending character was an open square bracket: [.
The error behaves similarly whether the song's path or filename itself contains the square bracket (a bracket in the path causes the entire list to not load, brackets in the filenames cause those files to not load); brackets in metadata did not cause this problem (when I removed the brackets from the path and filenames, playlist creation and loading worked fine even with brackets remaining in the metadata song title).
If the playlist filename itself contains an open square bracket, an entirely new set of errors seems to occur; the VLC playlist populates with the song metadata but the files cannot be opened.
This issue should be prioritized at least to some degree, as many song titles and/or album titles (and thus path and filenames) may include the [Explicit] tag; while a workaround is to rename the paths/files to replace or remove the bracket, this is tedious at a minimum, and possibly undesirable by users.
- Platform: Windows 10 Pro 21H2 build 19044.1466
- Software: VLC 3.0.16 Vetinari (originally discovered on 3.0.8)
Steps to test/reproduce:
"Control" test (t1)
- Take a folder with music files (tested with ogg and mp3) that DO NOT contain
[ - Select all files within the folder, add to VLC playlist, save playlist as M3U8 (with no
[characters in playlist filename) in same path as the folder itself (i.e. one level above the songs) - Clear the VLC playlist
- Open the M3U8 playlist in VLC
- Playlist opens and plays as expected
Bad path test (t2)
- Taking the same folder/files as in control test, rename the folder to contain the
[character - Select all files within the folder, add to VLC playlist, save playlist as M3U8 in same path as the folder itself
- Clear the VLC playlist
- Open the M3U8 playlist in VLC
- Playlist empties upon attempting to play
Bad filename test (t3)
- Taking the same folder/files as in control test, rename one or more song files to contain the
[character - Select all files within the folder, add to VLC playlist, save playlist as M3U8 in same path as the folder itself
- Clear the VLC playlist
- Open the M3U8 playlist in VLC
- Any songs whose filenames contain
[are not loaded into the playlist
Bad playlist name test (t4)
- Taking the same folder/files as in control test, select all files within the folder, add to VLC playlist, save playlist as M3U8 with the
[character in the playlist filename - Clear the VLC playlist
- Open the M3U8 playlist in VLC
- Errors will be reported attempting to open the songs; path data appears to get lost
Attachments
Playlist files corresponding to the above tests:
-
vlc_test_1.m3u8= t1 -
vlc_test_2.m3u8= t2 -
vlc_test_3.m3u8= t3 (with one .mp3 file renamed) -
vlc_test_3a.m3u8= t3 (with one .mp3 file and one .ogg file renamed) -
vlc__test_4_.m3u8= t4 (note that file needs to be renamed e.g.vlc [test 4].m3u8)
Logs corresponding to the above tests:
-
t1-create-save.log= create/save process (step 2) for t1 -
t1-open.log= open process (step 4) for t1 -
t2-create-save.log= create/save process (step 2) for t2 -
t2-open.log= open process (step 4) for t2 -
t3-create-save.log= create/save process (step 2) for t3 (one file renamed) -
t3-open.log= open process (step 4) for t3 (one file renamed) -
t3a-create-save.log= create/save process (step 2) for t3 (two files renamed) -
t3a-open.log= open process (step 4) for t3 (two files renamed) -
t4-create-save.log= create/save process (step 1) for t4 -
t4-open.log= open process (step 3) for t4 -
t4-errors.log= error logs for t4
Notes
- User-level paths in the logs have been sanitized, replacing my account name with
username. - Some paths and files have been reused (e.g. test 3, test 1); where filenames differ, the files were renamed correspondingly according to the test. Each playlist was freshly generated using path data that was accurate for the duration of that test.