Page 1 of 2

Media library folder selection on sdcard is dropped

Posted: 05 Jan 2023 23:00
by inspiredearth
Hi there,
I'm encounting an issue with the Media Library Preferences.

The phone has an SD card. When I select folders on the SD card VLC finds the media files. But after VLC is closed and reopened, it no longer has those folders selected. This occurs every time (I.e., it's not a one off event). It only occurs with the SDcard, and not the internal RAM.

I have checked the file permissions, and as far as I can tell everything is fine.

This is on a Samsung Galaxy A53.

Help with resolving this would be greatly appreciated.

Thanks,

Jonathan

Re: Media library folder selection on sdcard is dropped

Posted: 08 Jan 2023 00:49
by quipstad
I am having the same issue. Samsung Galaxy S9+ running Android 10.

Update: turned off battery optimization and also moved entire app to SD card; neither one helped. The instant I back out of the app (not even "closing" it necessarily) the media library is forgotten. This is only prevented if media is actively playing.

Re: Media library folder selection on sdcard is dropped

Posted: 10 Jan 2023 10:38
by bzr
I am likewise having the same issue. Samsung Galaxy Tab S2 running Android 7 and VLC 3.5.4 Beta 1. I started having the same issue as OP within the past week using the regular Android build, and the problem persists in the beta build. I have made these observations:
  • Media library will drop after closing VLC as previously stated but also after the device enters sleep mode.
  • Media library will drop regardless of whether a playlist is queued or media is playing. Media playback is unaffected, however.
  • Re-selecting folders in the Media library selection menu will cause the app to parse negative 1 out of negative 1 media before discovering all media in selected folders. Actual media, video folders and albums, will populate in the video and audio menus instantly and is accessible for as long as the app is in active use.
  • After returning to VLC from closure or sleep mode, selecting media from the playback history list results in a "Media is from an unavailable storage and cannot be played" message at first, then a "Multiple media cannot be played" message. Media thumbnails are still visible.
  • Setting auto rescan to "on" seems to preserve the selections in the media library selection menu but fails to populate media in the video and audio tabs.
  • Clearing the media database from the advanced options menu and re-selecting folders to add to the media library will cause the app to discover and parse all available media and the video and audio menus will populate as media is discovered. However, selecting any media for playback will result in "Media is from an unavailable storage" and "Multiple media cannot be played" errors.
  • Deleting and reinstalling the app does not solve the issue.
  • Restarting the device or removing and reinserting the SD card does not solve the issue.
Incidentally, these issues have only begun for me after adjusting the "Single line list title ellipsize" setting. I have also had issues with VLC crashing once a video begins playing while streaming with Smart View. I wonder if these occurrences are related or if it is simply my device showing its age, but the above posters seem to have newer devices and Android versions while my tablet has no problem reading the SD card in other apps. Scanning the SD card in Windows shows no errors. I hope this information helps.

Re: Media library folder selection on sdcard is dropped

Posted: 12 Jan 2023 21:11
by inspiredearth
The detailed description bzr have describes exactly what I've also experienced. Thanks for spelling it out in search create term. I submitted my post via a mobile phone, and was reluctant to try and type out too much detail.

Re: Media library folder selection on sdcard is dropped

Posted: 13 Jan 2023 07:16
by Aza
FYI, we are looking into it.

Re: Media library folder selection on sdcard is dropped

Posted: 14 Jan 2023 06:19
by galavanteer
You are not alone. I reported this issue almost exactly a YEAR AGO (January 2022). While I could not browse albums with cover flow, I was able to navigate and play media using the browse function - a little tedious, but it worked. However, I found a work-around by copying my media library from my SD card to internal memory. That worked for 12 months, but my mobile phone (Samsung S20 FE 5G) was slowing down because it was running out of internal memory. So, I had to delete my media library from internal memory and go back to the library on my SD card - and so the issue re-surfaced. Damn!
See:
* https://forum.videolan.org/viewtopic.php?f=35&t=158902

Re: Media library folder selection on sdcard is dropped

Posted: 14 Jan 2023 13:35
by Spike1
The bug is not presenting to me in the 2022-09-14 Nightly.
https://forum.videolan.org/viewtopic.php?f=35&t=161539

Re: Media library folder selection on sdcard is dropped

Posted: 14 Jan 2023 22:44
by galavanteer
This bug has existed, at least, since January 2022. The strange thing is that it only seems to affect SD card memory, not internal memory, and, it does not occur for all folders. For example, I have separate folders for audio books, videos and music, per:

* [SD card] > Media > Audio books
* [SD card] > Media > Movies
* [SD card] > Media > Music

The first two folders stick, but the last one [Music] does not — while it does appear to be selected initially, it is immediately de-selected when escaping [<] from the [Select directories] screen. Also, while the Movies do appear when browsing [Video], although the thumbnails are blank and, when you try to play them, a pop-up appears that says "Media is missing. Hide all missing media? [OK]" — however, the video files are still there and playable if you navigate to the (same) file locations using [Browse].

So, I copied some of the videos from the SD card to a folder in internal memory, thus:

* [internal] > Movies

Hey presto! The thumbnails appear in [Video] — and the videos play as expected.

So, this is not a hard bug, but a flaky bug that only appears to affect (some) libraries on a SD card.

Hard bugs are relatively easy to spot - flaky bugs are much more of a challenge to debug...

~~

Re: Media library folder selection on sdcard is dropped

Posted: 15 Jan 2023 06:24
by bzr
However, I found a work-around by copying my media library from my SD card to internal memory.

That's really a non-solution considering my device's internal storage is 32GB, while my music library alone is 50GB. I have recently added files to my library (two short albums in particular), but I did not have this issue at all until trying to change the interface settings (title ellipsize, specifically) a few days later. Of course, correlation does not imply causation but VLC's media library functions worked as expected until this moment.

I also have a Samsung Galaxy J7 Crown running VLC 3.5.4 Beta 1 and Android 9. The media library is small, consisting of a handful of albums and films loaded on an SD card. I have not had media library issues on this device but I dare not tempt fate and change any settings to try to replicate the issue.

Re: Media library folder selection on sdcard is dropped

Posted: 15 Jan 2023 17:58
by galavanteer
What, exactly, do you mean by:
title ellipsize
Do you mean a song title, something like:
  • "It’s Not Over… The Hits So Far"
If tbe bug is triggered by, say, an ellipsis character (…) being added to a media file name, that may suggest that the indexing algorithm trips up if it sees an extended ASCII character in a file name (… is ASCII 133 (decimal), the sixth character in the extended ASCII sequence). And/or, maybe the ellipsis character (…) is a reserved control character in VLC. Maybe other extended ASCII characters in media file names also trip-up indexing. If, presumably, Unicode is used, this may not be relevant. Possibly this is a clue to why this appears to be a flaky bug.

For what its worth, an example of the folder and file naming scheme I use is:
  • artist: Focus
  • album: Focus - 1972 - Focus 3
  • track: Focus - 1972 - Focus 3 - 06 - Answers¿ Questions! Questions¿ Answers!.mp3
Note, in this example, I use the inverted question mark (¿) since the normal question mark (?) is not a permitted character in a file name.

So, the file path & name would be:
  • [SD card] > media > music > Focus > Focus - 1972 - Focus 3 > Focus - 1972 - Focus 3 - 06 - Answers¿ Questions! Questions¿ Answers!.mp3
~~

Re: Media library folder selection on sdcard is dropped

Posted: 15 Jan 2023 18:43
by Spike1
He seems to be referring to the user option on what VLC should do when a track title is too long to be displayed in full.

More > Settings > Interface > Single line list title ellipsize
{Default/Left/Right/Middle/Marquee}

I can't imagine why the wrong setting here would cause folders to de-select.

Re: Media library folder selection on sdcard is dropped

Posted: 15 Jan 2023 19:11
by galavanteer
<<delete duplicate post — I was repeatedly logged out and had to log back in again>>

Re: Media library folder selection on sdcard is dropped

Posted: 15 Jan 2023 19:12
by galavanteer
Checking:
  • More > Settings > Interface >
I see the option:
  • Show missing medias
    Show distant medias even if they are not present.
Incidentally, "medias" is discouraged since "media" is already plural — plural of "medium."

So, what exactly is "distant medias" — would that be any memory that is not internal, such as a SD card?

Anyway, that would explain why videos appeared (text at least) in [Video], even though it would not play; VLC claimed it was "missing" — even though it was still there and could be played if navigating to the same folder using [Browse].

~~

Re: Media library folder selection on sdcard is dropped

Posted: 16 Jan 2023 00:47
by Spike1
I too unchecked this; my media aren't on a network and I don't want VLC wasting time checking. I don't consider the SD card "distant," but VLC might.

Re: Media library folder selection on sdcard is dropped

Posted: 16 Jan 2023 02:05
by galavanteer
I too unchecked this;
Do you mean:
  • Settings > Media library > Auto rescan (?)
In my install, this is unchecked — I believe that is as it has always been.
~~

Re: Media library folder selection on sdcard is dropped

Posted: 16 Jan 2023 05:34
by Spike1
No, I was replying to your post on the "distant medias" setting and that was the setting I meant.

I suspect that checking "Auto rescan" might work around the folder-drop bug, but it would spend time on a complete scan every time VLC starts.

Re: Media library folder selection on sdcard is dropped

Posted: 16 Jan 2023 09:06
by bzr
I suspect that checking "Auto rescan" might work around the folder-drop bug, but it would spend time on a complete scan every time VLC starts.

Already got you with my initial reply of my observations:
  • Setting auto rescan to "on" seems to preserve the selections in the media library selection menu but fails to populate media in the video and audio tabs.
OP responded saying that my observations matched their own, but the cause of the issue remains to be ascertained. If your install of VLC behaves differently, then... wow, I'm sure we all needed this flaky bug in our lives.
Also:
More > Settings > Interface > Single line list title ellipsize
{Default/Left/Right/Middle/Marquee}

I can't imagine why the wrong setting here would cause folders to de-select.

Spike1 is right here and I mention it because I only started having issues with the media library selection after changing this setting from "Marquee" to "Left." The app seemed to refresh, and returning to the Video and Audio menus only had me met with the issue being discussed here. Changing the setting back did not solve the issue.

Edit, to reply to galavanteer: I understood "distant medias" to refer to any media files that could not be discovered by the media library, hence the actual option being titled "Show missing medias." A mistranslation, perhaps, and nothing to do with the actual storage medium. Turning this option on will leave the video/audio menus populated but trying to play any album will cause the "Multiple media cannot be played" error while the app tries to load each file within to no avail.

Re: Media library folder selection on sdcard is dropped

Posted: 16 Jan 2023 14:30
by Skantes
Hi, I'm currently looking into this, but haven't managed to reproduce the issue on any device, could you please send me some logs (More -> Settings -> Advanced -> Debug logs (at the bottom)) at android-support@videolan.org or in PM ? That would really help to fix it.

Re: Media library folder selection on sdcard is dropped

Posted: 17 Jan 2023 02:49
by galavanteer
I am beginning to suspect that the probelm may lie with a media file, possibly some artifact of the file name. Well, this is a potential hypotheis. Anyway, I renamed my music folder from "Music" to "Music one" — then created a parallel folder "Music two" — and I am moving artist folders (containing album folders), two or a three at a time.

So far, I can select "Music two" (1.0 Gb) — but not "Music one" (12.3 Gb) … so only a small fraction in the new folder, but I will continue to move artist folders. I will not be surprised if I discover that "Music two" ceases to be selected at some point, maybe even "Music one" will become selectable again. If either or both happens, I will try to determine what file is at issue.
~~

Re: Media library folder selection on sdcard is dropped

Posted: 17 Jan 2023 03:00
by galavanteer
@Skantes — @Aza asked me to do this a year ago, but nothing was revealed, maybe you should cross-check with them. Actually, I think it would be necessary to do a real-time trace to trap this bug. It seems possible to select a media libray folder, but it would appear to be de-selected on exiting the media library folder selection screen — maybe it was never selected in the first place, in spite of the checkbox displaying as checked in the media library folder selection screen.
~~

Re: Media library folder selection on sdcard is dropped

Posted: 18 Jan 2023 00:42
by galavanteer
@Skantes, @Aza. I just sent a debug log to android-support@videolan.org via WeTransfer.

I am experiencing "Multiple media cannot be played" https://forum.videolan.org/viewtopic.php?&f=35&t=161666 (other thread) as well as: AND The curious thing is that, per: Music one - now 11.5 Gb (was 12.3 Gb) - media library still cannot be selected
Music two - now 1.7 Gb (was 1.0 Gb) - media library was selected - for a while, with cover flow and playable … but selection dropped some time later
I was subsequently able to re-select [Music two] after it was dropped … and *WAS* able to see cover-flow in [♬Audio] … *AND* play albums and tracks from cover-flow without seeing the "Multiple media cannot be played" pop-up. Maybe this error was cleared when I re-selected [Music two] after it was de-selected. Hmmm…
~~

Re: Media library folder selection on sdcard is dropped

Posted: 18 Jan 2023 00:55
by galavanteer
It would seem that the issues discussed here overlap with this other thread: ~~

Re: Media library folder selection on sdcard is dropped

Posted: 19 Jan 2023 08:27
by msfox
I had the same problem with VLC 3.5.3. My music is on SD-Card.
-> drop the "Media library folder".
Now, I have downgrade to VLC 3.5.1 (via F-Droid)
-> doesn't drop the folder - at the first test.

Re: Media library folder selection on sdcard is dropped

Posted: 24 Jan 2023 01:59
by inspiredearth
I had the same problem with VLC 3.5.3. My music is on SD-Card.
-> drop the "Media library folder".
Now, I have downgrade to VLC 3.5.1 (via F-Droid)
-> doesn't drop the folder - at the first test.
Thanks for that info. I'll try that out.

Re: Media library folder selection on sdcard is dropped

Posted: 24 Jan 2023 08:50
by qpham504
I didn't downgrade, I just wiped my cache and storage, added the media folder and disable rescan. Once that was done I force close the app to test. It seems to be working. Might be something different between this and the prev version.