INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Output Music File Broken After SD Card Sync  (Read 916 times)

MikeO3

  • Junior Woodchuck
  • **
  • Posts: 83
Output Music File Broken After SD Card Sync
« on: December 15, 2018, 11:23:14 am »

I have been trying to nail down a problem for months now when exporting music from my library to SD or SSD for my car. The issue presents itself on indexing newly loaded content by the media system and it encounters an issue with a track. When it hangs the media interface looses it's mind and reboots. Not a pretty site and thankfully the entertainment system is not linked to the navigation or other computers in the car!!!

Anyway, through sleuthing and many hours of troubleshooting various things as file size, file type, file length, graphic size, etc. I came across the following bad behavior with a broken track name.

It is not the root cause of my problem as the media system does index these files strangely however, I thought I should report it.

Version: MC24.0.68

Use Case:
Source path on NTFS PC H:\Music\Path1
Synchronize to ExFAT32 formatted SD Card G:\Music\Path1
Source 24 88 .flac to destination 24 88 .flac (no conversion)

Problem:
Output filename is broken
Thousands of other files are no problem with the same job and this is the only I found so far.

Note:
If the Album is removed from the source Playlist it will not delete on Sync with the media. I presume this is expected behavior as the proper track is not found comparing it's original track name which is now mangled.
If add Album back in the source Playlist it never resync's which I don't think is expected behavior. It really should replace a missing track I would expect.

Source: 2018-12-15  10:10       141,886,657 01 - Scenen aus Goethes Faust, WoO 3- Ouverture.flac
Target: 2018-12-15  10:10       141,886,657 ..flac

Source H:\ DOS view:
Code: [Select]
Volume in drive H is Drive_H
 Volume Serial Number is BA6E-F3F6

 Directory of H:\Music\Nikolaus Harnoncourt with RCO\Schumann - Scenen aus Goethes Faust, WoO 3

2018-12-15  10:11    <DIR>          .
2018-12-15  10:11    <DIR>          ..
2018-12-15  10:10       141,886,657 01 - Scenen aus Goethes Faust, WoO 3- Ouverture.flac
2018-12-15  10:10        86,755,601 02 - Part I- I. Szene im Garten (Faust, Gretchen, Mephistopheles, Marthe).flac
2018-12-15  10:10        78,391,589 03 - Part I- II. Gretchen vor dem Bild der Mater Dolorosa (Gretchen).flac
2018-12-15  10:10       128,869,091 04 - Part I- III. Szene im Dom (Boser Geist, Gretchen, Choir).flac
2018-12-15  10:10       123,300,236 05 - Part II- IV. Sonnenaufgang- Die ihr dies Haupt umschwebt im luft'gen Kreise (Ariel, Chorus, Faust).flac
2018-12-15  10:10        69,862,841 06 - Part II- IV. Sonnenaufgang- Taler grunen, Hugel schwellen (Chorus, Ariel).flac
2018-12-15  10:10        69,421,467 07 - Part II- IV. Sonnenaufgang- Des Lebens Pulse schlagen frisch-lebendig (Faust).flac
2018-12-15  10:10        72,032,643 08 - Part II- IV. Sonnenaufgang- So ist es also, wenn ein sehnend Hoffen (Faust).flac
2018-12-15  10:10        38,193,222 09 - Part II- V. Mitternacht- Ich heisse der Mangel (Mangel, Schuld, Not, Sorge, 4 Women).flac
2018-12-15  10:10       147,748,173 10 - Part II- V. Mitternacht- Vier sah ich kommen, drei nur gehn (Faust, Sorge).flac
2018-12-15  10:10        45,972,941 11 - Part II- V. Mitternacht- Die Nacht scheint tiefer tief hereinzudringen (Faust).flac
2018-12-15  10:10       231,419,282 12 - Part II- VI. Fausts Tod (Mephistopheles, Lemuren, Faust, Choir).flac
2018-12-15  10:10        58,753,560 13 - Part III- VII. Fausts Verklarung- Waldung, sie schwankt heran (Choir).flac
2018-12-15  10:10        29,531,790 14 - Part III- VII. Fausts Verklarung- Ewiger Wonnebrand (Pater Ecstaticus).flac
2018-12-15  10:10        52,600,810 15 - Part III- VII. Fausts Verklarung- Wie Felsenabgrund mir zu Fussen (Pater Profundus, Pater Seraphicus, Selige Knaben).flac
2018-12-15  10:11        52,194,752 16 - Part III. VII. Fausts Verklarung- Welch ein Morgenwolkchen schwebet (Pater Seraphicus, Chorus, Selige Knaben).flac
2018-12-15  10:11       111,494,046 17 - Part III- VII. Fausts Verklarung- Gerettet ist das edle Glied (Engel, Selige Knaben, Choir, Vollendeter Engel).flac
2018-12-15  10:11        72,487,538 18 - Part III- VII. Fausts Verklarung- Gerettet ist das edle Glied (Engel).flac
2018-12-15  10:11        81,015,314 19 - Part III- VII. Fausts Verklarung- Hier ist die Aussicht frei (Doctor Marianus).flac
2018-12-15  10:11       147,546,959 20 - Part III. VII. Fausts Verklarung- Dir, der Unberuhrbaren (Doctor Marianus, Choir, Magna Peccatrix,..).flac
2018-12-15  10:11       153,283,082 21 - Part III- VII. Fausts Verklarung- Alles Vergangliche ist nur ein Gleichnis (Chorus Mysticus, SSATB).flac
2016-09-21  14:44           609,446 Folder.jpg
2016-09-21  14:44         4,801,123 RCO 09001 - booklet.pdf
              23 File(s)  1,998,172,163 bytes

     Total Files Listed:
              23 File(s)  1,998,172,163 bytes
               5 Dir(s)  4,169,474,883,584 bytes free

Target G:\ Exported DOS view:
Code: [Select]
Volume in drive G is Car Tunes 5
 Volume Serial Number is 6A42-890E

 Directory of G:\Music\Christian Gerhaher, Christiane Iven, Alastair Miles, Mojca Erdmann, Werner Gura, Birgit Remmert, Elisabeth von Magn.\Schumann_ Scenen aus Goethes Faust, WoO 3

2018-12-15  11:17    <DIR>          .
2018-12-15  11:17    <DIR>          ..
2018-12-15  10:10       141,886,657 ..flac
2018-12-15  10:10        86,755,601 . (1).flac
2018-12-15  10:10        78,391,589 . (2).flac
2018-12-15  10:10       128,869,091 . (3).flac
2018-12-15  10:10       123,300,236 . (4).flac
2018-12-15  10:10        69,862,841 . (5).flac
2018-12-15  10:10        69,421,467 . (6).flac
2018-12-15  10:10        72,032,643 . (7).flac
2018-12-15  10:10        38,193,222 . (8).flac
2018-12-15  10:10       147,748,173 . (9).flac
2018-12-15  10:10        45,972,941 . (10).flac
2018-12-15  10:10       231,419,282 . (11).flac
2018-12-15  10:11        58,753,560 . (12).flac
2018-12-15  10:11        29,531,790 . (13).flac
2018-12-15  10:11        52,600,810 . (14).flac
2018-12-15  10:11        52,194,752 . (15).flac
2018-12-15  10:11       111,494,046 . (16).flac
2018-12-15  10:11        72,487,538 . (17).flac
2018-12-15  10:11        81,015,314 . (18).flac
2018-12-15  10:11       147,546,959 . (19).flac
2018-12-15  10:11       153,283,082 . (20).flac
              21 File(s)  1,992,761,594 bytes

     Total Files Listed:
              22 File(s)  1,992,763,831 bytes
               8 Dir(s)  510,983,667,712 bytes free
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Output Music File Broken After SD Card Sync
« Reply #1 on: December 15, 2018, 07:58:58 pm »

Ah, it took me a while to see it, but that is almost certainly a problem with trying to index such a long path and filename from the SD card or SSD into your car's media system.

It sounds to me like the path and filename are fine on the SD card or SSD until you try to index the files on the media system. Is that correct? If you check the SD card or SSD using Windows before connecting it to the car's Media System everything looks fine?

The media system tries to read the long path and filename, fails, and rewrites the filename, then just locks up and reboots. It could even be that it can't handle filenames like "..flac". Windows wouldn't like that filename either.

Is it an Android Auto system? I believe there are filename limits on Android.



Your longest path including filename on the SD card would be 294 characters long!

G:\Music\Christian Gerhaher, Christiane Iven, Alastair Miles, Mojca Erdmann, Werner Gura, Birgit Remmert, Elisabeth von Magn.\Schumann_ Scenen aus Goethes Faust, WoO 3\15 - Part III- VII. Fausts Verklarung- Wie Felsenabgrund mir zu Fussen (Pater Profundus, Pater Seraphicus, Selige Knaben).flac

Even just the path to the directory is 167 characters long, and even with the shortest filename adding 53 characters, so 220 characters total, that is causing something to fail, and the file naming to be lost.

I assume based on the path above that you have left the Handheld Sync option for Audio Path set to "[Album Artist (auto)]\[Album]\", and [Album Artist (auto)] is defaulting to [Artist] as you have no value in [Album Artist]? You could change the Handheld Sync option to something that avoids the problem, such as just "[Album]", or you could tag any problem Albums with a short [Album Artist] value so that the long path never occurs.

You may need to find out how long a path and filename your car's Media System can handle from the supplier, or by experimentation. There may be a setting in the system to make it support longer filenames.



Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

MikeO3

  • Junior Woodchuck
  • **
  • Posts: 83
Re: Output Music File Broken After SD Card Sync
« Reply #2 on: December 15, 2018, 09:28:23 pm »

Thanks for the reply and analysis... I thought it easiest to reply inline to answer your questions.

Quick headline: I think ceiling of 255 is a maximum for my car's media system fields including the NTFS, FAT & EXFAT32 filename max of 255 unicode chars.

Ah, it took me a while to see it, but that is almost certainly a problem with trying to index such a long path and filename from the SD card or SSD into your car's media system.

It sounds to me like the path and filename are fine on the SD card or SSD until you try to index the files on the media system. Is that correct? If you check the SD card or SSD using Windows before connecting it to the car's Media System everything looks fine?
The samples above are directly from the SD card as output from MC. So output is munged before even putting in the car. You gave me the idea to check out the EX FAT32 max specifications: 255 characters. This kinda solves the problem of the cutoff limit!

Quote
The media system tries to read the long path and filename, fails, and rewrites the filename, then just locks up and reboots. It could even be that it can't handle filenames like "..flac". Windows wouldn't like that filename either.
Odd thing it is does handle these "..flac" files and all sorts of other weird characters like ' : , and other unicode type of characters. Rather impressive to be honest! :)

The system has never rewritten a file that I have seen as I use the raw DOS command line data to dir *.* /s/b to import the portable filenames into Excel to analyze and measure characters using the LEN() function.

Quote
Is it an Android Auto system? I believe there are filename limits on Android.
It is Mercerdes-Benz COMAND. No idea what kernel they are using for OS.

Quote
Your longest path including filename on the SD card would be 294 characters long!

G:\Music\Christian Gerhaher, Christiane Iven, Alastair Miles, Mojca Erdmann, Werner Gura, Birgit Remmert, Elisabeth von Magn.\Schumann_ Scenen aus Goethes Faust, WoO 3\15 - Part III- VII. Fausts Verklarung- Wie Felsenabgrund mir zu Fussen (Pater Profundus, Pater Seraphicus, Selige Knaben).flac

Even just the path to the directory is 167 characters long, and even with the shortest filename adding 53 characters, so 220 characters total, that is causing something to fail, and the file naming to be lost.
Ya and longer up to 345 for the longest. The COMAND system must be unix derivative as raw paths which are not yet indexed show up as /folder/artist/track. I now suspect they probably have field size limits for Album/Artist/Track and not the whole file path string. I have had paths longer then 255 with no issue.

Quote
I assume based on the path above that you have left the Handheld Sync option for Audio Path set to "[Album Artist (auto)]\[Album]\", and [Album Artist (auto)] is defaulting to [Artist] as you have no value in [Album Artist]? You could change the Handheld Sync option to something that avoids the problem, such as just "[Album]", or you could tag any problem Albums with a short [Album Artist] value so that the long path never occurs.
So caught exactly this scenario of missing [Album Artist] as I thought the system was tagging as Unknown in the car. So I ran a job which made all blank [Album Artist] or [Album Artist (auto)] = [Album Artist] the other day and ensured my whole library (~43K) had no blank [Album Artist]. I will eliminate all these long strings which may have been auto updated yesterday creating these monster paths. Thanks for that advice.

Quote
You may need to find out how long a path and filename your car's Media System can handle from the supplier, or by experimentation. There may be a setting in the system to make it support longer filenames.
My workaround for the last couple of months has been eliminating anything >200 so probably will up that to >254. This is a pain to validate when my SSD is 1TB (about ~14K tracks) and SD card 512GB (about 7K tracks). Sigh...

Is there a Smartlist expression function or search string I can use to measure length a path/filename rule and take some course of action?
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Output Music File Broken After SD Card Sync
« Reply #3 on: December 15, 2018, 10:00:17 pm »

As you say the filenames are munged immediately out of MC, try checking the setting "Options > General > Advanced > Support extra long filenames (experimental)". I think MC handles long filenames now without it, but worth a try. It might fix any issues with filename lengths up to 254 characters, since a few examples at less than 254 characters failed.

Windows has a fit not so much in creating files like "..flac", or more specifically "...flac", but when you try to rename them, move them, or some other functions. Windows can't find the file because it interprets the "..." and an ellipsis instead of three dots, or something like that. Particularly bad in directory names as well.

Is there a Smartlist expression function or search string I can use to measure length a path/filename rule and take some course of action?

Yes. https://wiki.jriver.com/index.php/String_Manipulation_Functions#Length

You can use that to do a simple test of [filename] for the full length, or [filename (name)] and [filename (path)] for the component pieces.

There are also some functions to pull out specific sub-directory names from a path... these ones for a start: https://wiki.jriver.com/index.php/File_Path_and_Identifier_Functions


BTW, small thing, but the format names are FAT32 and exFAT, rather than exFAT32 as far as I know. exFAT may be a 32-bit format, but it supports larger volumes than FAT32. Your original post had me a bit confused there as to what you were using for a while.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

MikeO3

  • Junior Woodchuck
  • **
  • Posts: 83
Re: Output Music File Broken After SD Card Sync
« Reply #4 on: December 15, 2018, 10:45:50 pm »

Thanks for the pointers... I'll let you know how it goes.
Logged
Pages: [1]   Go Up