Skip to main content
Topic: iTunes omits first song from each imported .m3u8 playlist (Read 459 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

iTunes omits first song from each imported .m3u8 playlist

I figured this post has more to do with playlist formatting and playlist encoding than anything else, so I thought it would be appropriate to post this in the General Audio subforum.  However, if a moderator feels this topic would be more appropriate for the foobar2000 subforum or another subforum, I understand if this post needs to be moved.

I have about 200 playlists that I have exported as .m3u8 files from foobar2000.  I am importing these playlists into iTunes.  I have found that, for some reason that I don't know, iTunes omits the first track from each playlist.  That is, iTunes just neglects to import the first track of each playlist.  So if I have a playlist that in foobar2000 has 1250 tracks in it, in iTunes the playlist has 1249 tracks in it, and the song that should be the first track in the playlist, just isn't in the playlist at all in iTunes.  I've checked this with many different playlists, the audio files are all iTunes-compatible, they are all .mp3 files or .m4a files.  This happens with every playlist I import into iTunes this way.  I'm assuming this has something to do with the format of the playlists.

Several months ago, I switched from iTunes to foobar2000, so at that time, I exported all of my playlists from iTunes, as .m3u files.  These playlists are now old and out of date, but the beginning tracks of these playlists have remained the same, so I can look at these for comparison's sake.

One thing I noticed is, when I export a playlist as an .m3u from iTunes, and open it in Notepad, I find this:

#EXTM3U
#EXTINF:355,Quiet Now (Live) - Bill Evans
D:\Music\OFFICIAL MUSIC LIBRARY\Music\Bill Evans\The Paris Concert, Edition 1 (Live)\02 Quiet Now (Live).m4a
#EXTINF:286,Giant Steps - John Coltrane
D:\Music\OFFICIAL MUSIC LIBRARY\Music\John Coltrane\Giant Steps\01 Giant Steps.m4a
#EXTINF:348,Cousin Mary - John Coltrane
D:\Music\OFFICIAL MUSIC LIBRARY\Music\John Coltrane\Giant Steps\02 Cousin Mary.m4a


When I export a playlist as an .m3u8 (or .m3u) from foobar2000, and I open it in Notepad, I find this:

D:\Music\OFFICIAL MUSIC LIBRARY\Music\Bill Evans\The Paris Concert, Edition 1 (Live)\02 Quiet Now (Live).m4a
D:\Music\OFFICIAL MUSIC LIBRARY\Music\John Coltrane\Giant Steps\01 Giant Steps.m4a
D:\Music\OFFICIAL MUSIC LIBRARY\Music\John Coltrane\Giant Steps\02 Cousin Mary.m4a



So all that #EXTM3U stuff and #EXTINF stuff is there in the first one, and I don't know what the difference is between these 2 examples.

While it would take a bit of time, I could fairly easily go through and just add the first track, in iTunes, to each playlist after importing each playlist into iTunes.  But I was just wondering if anyone knows why exactly this problem is happening, and if there's some edit I could make to the .m3u8 file in Notepad in order to make it so that iTunes does NOT omit the first track from each playlist.  If there is just some prefix that I have to add to the beginning of each .m3u8 file in Notepad, that would actually be easier for me.  (It would be easier for me because all of the .m3u8 files are consolidated into one folder, so that way I wouldn't have to identify, search for, find the location of, and manually add the first track for each of the 200 playlists into my iTunes library.)

And, unfortunately, something else that could have been a potential solution, is not going to work: I could export the playlists (from foobar2000) as just .m3u files, and that does fix the "first track" problem.  However, because these .m3u files are not encoded with UTF-8, if I use this method, iTunes (or any program) will NOT be able to import any tracks that have special characters (ö, Ø, ø, etc.) in them.  And, unfortunately, I have many tracks that happen to have special characters in them, sparsed all throughout my 20,000-song music library.  So the .m3u or .m3u8 files have to be encoded with UTF-8.  However, for some reason, encoding the file in UTF-8 seems to be what is causing the problem of iTunes not importing the first track.  Even if I export a playlist (from foobar2000) as an .m3u, then open the .m3u in Notepad, click save as, save as "playlist.m3u" and make sure it's encoded with UTF-8, and I import the playlist into iTunes, iTunes won't import the first track.  Also, it seems when I export a playlist from foobar2000 as an .m3u8, this playlist will be automatically encoded with UTF-8, because when I import the playlist into iTunes, it will import the tracks with special characters, but it won't import the first track.

Also, (if I export a playlist from foobar2000): Regardless of whether the playlist file is encoded with UTF-8, or unicode, or whatever, and regardless of whether the file is an .m3u file or an .m3u8 file, it still looks the same when I open it in Notepad, like this:

D:\Music\OFFICIAL MUSIC LIBRARY\Music\Bill Evans\The Paris Concert, Edition 1 (Live)\02 Quiet Now (Live).m4a
D:\Music\OFFICIAL MUSIC LIBRARY\Music\John Coltrane\Giant Steps\01 Giant Steps.m4a
D:\Music\OFFICIAL MUSIC LIBRARY\Music\John Coltrane\Giant Steps\02 Cousin Mary.m4a

So, does anyone know more detail about what is causing the "first track" problem, or about something I could do to fix it? 

Thank you for any help.

I am on Windows 10 64-bit.

Additional search tags: playlist, playlists, import, importing, imported, export, exporting, exported, won't import first track, doesn't import first track, removes first track, remove, removed, 1st track, m3u, m3u8, song, songs, track, tracks, file, files, play list, play lists, text file, txt, edit, will not, does not import first track, bring in first track, have first track, omission, omitting

Re: iTunes omits first song from each imported .m3u8 playlist

Reply #1
Any difference if you add # or #m3ustuff as first line? Also a potencial BOM issue https://en.m.wikipedia.org/wiki/Byte_order_mark of some sort.
PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung

Re: iTunes omits first song from each imported .m3u8 playlist

Reply #2
Originally, Winamp playlists (m3u) were a simple list of tracks.
Soon after that ( Not sure if beggining with 2.0 or already earlier Allright, looking at the what'snew, that happened in version 2.5), it started to add metadata to the playlist, so that the player did not need to reload all that information each time, and instead rely on what it was when it added the track to it.
This is what #EXTM3U and #EXTINF is.

As for your problem, I believe it could be what smok3 says, given that you say that m3u8 doesn't work but m3u does, while looking the same.

If you want to be completely sure, you could try getting an hex editor ( I like hxd ) to inspect the first two bytes of the file, or an advanced notepad editor (like notepad++ ) that indicates the format of the file ( showing if it uses a BOM or not).
What I don't have is any tool that could do a batch conversion from a UTF16 file BOM to an UTF8 file. I guess that's what the "8" in m3u8 should mean.

 

Re: iTunes omits first song from each imported .m3u8 playlist

Reply #3
Any difference if you add # or #m3ustuff as first line? Also a potencial BOM issue https://en.m.wikipedia.org/wiki/Byte_order_mark of some sort.

Adding #M3USTUFF as a new first line when viewing the playlist in Notepad worked. All playlists now imported into iTunes successfully and included the first song. Thank you for the suggestion. I am assuming I could have put any letters and numbers after the # sign, but I just kept it at #M3USTUFF for consistency. lol

(edited for wording)

 
SimplePortal 1.0.0 RC1 © 2008-2018