Jump to content

Falil to resolve music in m3u Playlist


Recommended Posts

I have a m3u playlist which is generated with iTunes on macbook Air. When I copied it to my phone and oped it with Poweramp, some of music cannot be played.

My environment

  • Poweramp build number build-925-bundle-play [925004-e493ac43] Full Version 64 bit
  • your device model Xiaomi Redmi note 9S
  • your Android version 11 RKQ1.200826.002
  • your custom ROM name/version (if you're on custom ROM) -

File hierarchy of my mac:

~/Music/Music/Media.localized/Music/[Artist]/[Album]/[music]

File hierarchy of my phone:

/storage/[SD Card NAME]/Music/[Artist]/[Album]/[music]

All files and folders under Music are copied from my mac using SMBSync. So, all of them have exactly the same name with correspondent on my mac. m3u playlist is stored under Music folder. Artists, album folders and music files contain non-ASCII character. So does m3u file.

Since m3u file is generated by iTunes, it contains full path of music on my mac. I paste a few lines to show example.

#EXTM3U
#EXTINF:342,オーケストラ - BiSH
/Users/***/Music/Music/Media.localized/Music/BiSH/KiLLER BiSH/03 オーケストラ.m4a
#EXTINF:238,紅蓮華 - LiSA
/Users/***/Music/Music/Media.localized/Music/LiSA/紅蓮華/1-01 紅蓮華.m4a
#EXTINF:235,釣った魚にエサやれ - MOSHIMO
/Users/***/Music/Music/Media.localized/Music/MOSHIMO/TODOME/1-03 釣った魚にエサやれ.m4a                <---First three music can be played without any troubles.
#EXTINF:225,負けないで - ZARD
/Users/***/Music/Music/Media.localized/Music/ZARD/負けないで/01-負けないで.m4a            <---This music cannot be played.

Text encoding is UTF-8.

 

Problem

After scanning my SD card, m3u playlist is shown on Poweramp. When I opened it and choose certain music, I get "Folder is missing or not readable" error. When I see the error, file path is shown under error massage, and it starts with "/Users/***/Music/Music/Media.localized/Music/". Cleary, this path is my mac's, and that's why Poweramp fails to play.

However, according to this post, Poweramp resolves m3u playlist by last folder and file name only. So containing full path of my mac itself isn't problem. In fact, about 2/3 of music in a.m3u can be played without any troubles. I didn't have this problem before, so I suspect recent update caused this problem.

 

What I've tried

  • Full scan
  • Re install Poweramp
  • Change playlist name to a.m3u8
  • Edit a.m3u and change written path to music file in my phone

Nothing above solved problem. Trouble only occurs on certain music, and nothing above changed music fail to play. However, last attempt changed error massage to "Failed to play file!".

Thank you for reading.

Link to comment
Share on other sites

@ryohei Poweramp resolves playlist entries based on last folder/filename. Tracks and folders should be known to the Poweramp, i.e. added/selected in Settings / Library / Music folders.

You can force Playlists re-resolve either via Full Rescan option in settings or via header menu / Resolve… option in Playlists category.

Link to comment
Share on other sites

See also the notes on Playlists in

Ensure that the filename and the final layer containing folder match exactly between your device's file system and the items listed in the M3U8 file. In your example above, that would be the folder [Album] and the files [music].m4a that are checked. As Max says, all other directory path information (whether Android, Mac or PC) is discarded by the scanning/resolving process.

For one of the files that still does not work after you've tried a Full Rescan and/or a Rescan/Resolve in the actual library playlist menu: find the same song in the All Songs or Folders category and check that its Info/Tags path details match exactly with the contents quoted in the playlist file.

Andre

Link to comment
Share on other sites

Thank you for advice.

"Music" folder is added to Poweramp, so Poweramp can play every music via "All Songs", "Albums", etc.

Quote

Ensure that the filename and the final layer containing folder match exactly between your device's file system and the items listed in the M3U8 file. In your example above, that would be the folder [Album] and the files [music].m4a that are checked. 

Quote

find the same song in the All Songs or Folders category and check that its Info/Tags path details match exactly with the contents quoted in the playlist file.

Poweramp doesn't allow to copy & paste path, so I took screenshots. First one was taken when I choose Artists->[Artist]->[Album]->[Music]. In this situation, I can play this music without any troubles. Second one was taken when I choose Playlists->[Playlist]->[Music]. Last folder name and music file name seems exactly the same.

Screenshot_2022-03-15-20-16-10-245_com.maxmpz.audioplayer.thumb.jpg.28387374a90b5dc1b10fb1c53d33e043.jpg Screenshot_2022-03-15-20-16-39-764_com.maxmpz.audioplayer.thumb.jpg.a47c1402e56c59a0570452bf470cd0b1.jpg

Quote

all other directory path information (whether Android, Mac or PC) is discarded by the scanning/resolving process.

I expect Poweramp to do that. But all other directory path information is Not discarded when resolving music which can't be played. Poweramp is trying to reach path on mac, and that's why it fails.

Link to comment
Share on other sites

11 minutes ago, ryohei said:

I expect Poweramp to do that. But all other directory path information is Not discarded when resolving music 

Yes, it is ignored. The full line obviously still exists in the original M3U8 file, so will be displayed for your reference within any error messages, but the actual resolving process which connects each individual line in an M3U file to a corresponding song from Poweramp's scanned Music Library only uses the filename and first-level folder name for matching purposes. As that process has apparently failed in this case, all PA can do is report on what information it does have.

It's a bit hard to diagnose from screenshots when they include some non-ASCII character sets, and I expect that may also be the issue the resolving process is facing. For testing purposes, could you try copying one of those problem song files into a plainly-named (ASCII only) folder somewhere within your music hierarchy - something simple like "Test" would be fine - and then edit the same revised word into the relevant line in the M3U8 file and do a FULL Rescan. If that still fails, try doing the same trick with the filename too, until we find where the problem lies. 

Andre

Link to comment
Share on other sites

Quote

could you try copying one of those problem song files into a plainly-named (ASCII only) folder somewhere within your music hierarchy - something simple like "Test" would be fine

/Users/ryohei/Music/Music/Media.localized/Music/ZARD/負けないで/TEST.m4a <-Fail

/Users/ryohei/Music/Music/Media.localized/Music/ZARD/TEST/01-負けないで.m4a <-Fail

/Users/ryohei/Music/Music/Media.localized/Music/ZARD/TEST/TEST.m4a <-Success

So, both folder name and file name have problem. I made a hypothesis that certain character cause problem, so I split filename to identify it.

 

/Users/ryohei/Music/Music/Media.localized/Music/ZARD/TEST/負け.m4a <-Success

/Users/ryohei/Music/Music/Media.localized/Music/ZARD/TEST/ないで.m4a <- Fail

 

/Users/ryohei/Music/Music/Media.localized/Music/ZARD/TEST/な.m4a <-Success

/Users/ryohei/Music/Music/Media.localized/Music/ZARD/TEST/い.m4a <-Success

/Users/ryohei/Music/Music/Media.localized/Music/ZARD/TEST/で.m4a <-Fail

/Users/ryohei/Music/Music/Media.localized/Music/ZARD/負けない/01-負けない.m4a <-Success

Character 'で' seems to be the cause.

I have many music files which can't be played, but I noticed that all of them contain ゛or゜(voiced consonant mark of Japanese language) in file path or filename. 

I googled and find that characters which contain ゛or゜ can be expressed in Unicode in two ways. For example, て U+3066 + ゙  U+3099, or で U+3067. I've confirmed that my m3u8 playlist, which iTunes generated, uses former expression. On the other hand, my music file name uses latter.

Users can't choose which expression to use. It's application dependent. And this problem can occur in many other languages. For example, ë (U+00EB) or e (U+0065) + ◌̈ (U+0308). So I hope Poweramp treat these letters properly so that text in both expression are interpreted as same. Seems there is solution to do that easily (normalization).

Link to comment
Share on other sites

8 minutes ago, ryohei said:

I googled and find that characters which contain ゛or゜ can be expressed in Unicode in two ways. For example, て U+3066 + ゙  U+3099, or で U+3067. I've confirmed that my m3u8 playlist, which iTunes generated, uses former expression. On the other hand, my music file name uses latter.

Yes, that would be the problem then. As we said earlier, the folders and filenames need to match exactly (character by character) not just have symbols which look similar. This isn't too much of a problem in ASCII, but it would definitely be an issue with the zillions of similar-looking Unicode variants.

The easiest solution would be to do a global search-and-replace in all your M3U8 files to ensure that the characters used in the playlist files are the same characters as those used in the path/filename. Or do the opposite and use a batch file renamer to correct the path/filename details. Or just stop using iTunes and/or the syncing software as something is not copying the details accurately.

Andre

Link to comment
Share on other sites

@andrewilley I would add that unicode paths also processed differently by Windows, Linux (which Android uses), and by Android itself. Windows specifically processes unicode paths and it may replace some chars or otherwise modify the path, while Linux handles paths as opaque data.

While Android uses Linux kernels, the file processing in the latest (Android 10+) versions always parses filenames. 

This means some unicode characters, esp. multibyte sequences, some Asian scripts, emoji, etc. - those may change while folders are copied to Android device, and playlist entries won’t match files anymore.

Link to comment
Share on other sites

@andrewilley

You're right. This is the problem of iTunes, not Poweramp. At least it's not a bug. I don't understand why my playlist was working before though.

I wrote a simple shell script to combine all separated character.

find ~/Music/Music/Media.localized/Music -name "*.m3u8" -print0 | xargs -0 nkf --overwrite -w --ic=UTF8-MAC

After using this, I can play all music without any troubles. Thank you for helping me.

Link to comment
Share on other sites

So the Unicode paths and filenames were actually correct across both systems, but the M3U8 files created by iTunes were wrong. At least there's an answer now anyway, and an easy one to run again for any future issues. Annoying though.

The irony is that Unicode was developed to stop this kind of nonsense for international character sets beyond 7-bit ASCII - but then different implementations of Unicode are not as compatible as you'd hope.

Andre

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...