[VLC Beta] Corrupt media database file

VLC for Android and Chrome OS specific usage questions
lee321987
Blank Cone
Blank Cone
Posts: 11
Joined: 21 Aug 2012 11:16

[VLC Beta] Corrupt media database file

Postby lee321987 » 27 Dec 2021 01:55

VLC (Android) version: 3.4.3 Beta 6

I just did:
Settings > Advanced > Dump Media Database

The resulting "vlc_media.db" file can not be opened in an SQLite database viewer (I tried 4 different viewers).

The errors I get when trying to open the .db file mention:
Malformed database schema (playlist_update_nb_media_on_media_deletion) - near "FROM": syntax error.

Spike1
Big Cone-huna
Big Cone-huna
Posts: 735
Joined: 02 Jan 2021 12:54
VLC version: And:3.6.0β,Win:2.2.1

Re: [VLC Beta] Corrupt media database file

Postby Spike1 » 27 Dec 2021 14:44

Not all "databases" are SQL databases. Someone smarter may be along to say whether there is a VLC error here. If OP's perception is widespread, perhaps VLC ought not describe its survey of media files as a "database".

lee321987
Blank Cone
Blank Cone
Posts: 11
Joined: 21 Aug 2012 11:16

Re: [VLC Beta] Corrupt media database file

Postby lee321987 » 27 Dec 2021 19:00

All the tutorials I can find say to use an SQL database viewer / editor to read the file.

evadedave
Blank Cone
Blank Cone
Posts: 56
Joined: 21 May 2021 04:11

Re: [VLC Beta] Corrupt media database file

Postby evadedave » 28 Dec 2021 02:43

The main source of info. about VLC Android's SQLite DB seems to be the following unofficial Nepali website:

https://www.vlchelp.com/android-backup- ... lcmediadb/

Shame that VLC's own wiki here has hardly any useful info. about the Android version. However a dev did confirm that the DB was indeed an SQLite one, so there may be an actual bug here.
For now they [playlists] are stored in the underlying media library, in an sqlite database.

Spike1
Big Cone-huna
Big Cone-huna
Posts: 735
Joined: 02 Jan 2021 12:54
VLC version: And:3.6.0β,Win:2.2.1

Re: [VLC Beta] Corrupt media database file

Postby Spike1 » 28 Dec 2021 02:46

Very well. (Tutorials? Links?) Then I am back to waiting for an implementor to drop in and investigate it. Cheers!

PS - evadedave filed simultaneously but has a link, such as it is. OP may have others. I'm out.

evadedave
Blank Cone
Blank Cone
Posts: 56
Joined: 21 May 2021 04:11

Re: [VLC Beta] Corrupt media database file

Postby evadedave » 28 Dec 2021 03:10

FWIW, the SQLite Database Editor app mentioned on that site failed to open VLC 3.4.2's DB as well. Might indicate that the bug (if it is indeed one) has existed for a while now, but I'll leave it to the devs to check.

rstone
Blank Cone
Blank Cone
Posts: 90
Joined: 29 Nov 2020 18:11

Re: [VLC Beta] Corrupt media database file

Postby rstone » 29 Dec 2021 06:36

Give DB Browser for SQLite a try. The trigger in question uses the UPDATE FROM syntax which was recently added to SQLite in v3.33.0.

lee321987
Blank Cone
Blank Cone
Posts: 11
Joined: 21 Aug 2012 11:16

Re: [VLC Beta] Corrupt media database file

Postby lee321987 » 29 Dec 2021 21:04

@rstone
Thank you, but it does not work. Same error as the other database viewers.

evadedave
Blank Cone
Blank Cone
Posts: 56
Joined: 21 May 2021 04:11

Re: [VLC Beta] Corrupt media database file

Postby evadedave » 31 Dec 2021 02:09

@lee: If possible you should add it to the issue tracker. Probably more chance of getting a proper dev response that way.

Spike1
Big Cone-huna
Big Cone-huna
Posts: 735
Joined: 02 Jan 2021 12:54
VLC version: And:3.6.0β,Win:2.2.1

Re: [VLC Beta] Corrupt media database file

Postby Spike1 » 31 Dec 2021 13:19

Yes, if VLC writes the playlist database using statements only recently added to SQLite, it would be guaranteed not to run on older phones. On some phones/carriers, getting a newer Android version is not an option.

evadedave
Blank Cone
Blank Cone
Posts: 56
Joined: 21 May 2021 04:11

Re: [VLC Beta] Corrupt media database file

Postby evadedave » 31 Dec 2021 22:39

Not necessarily. If VLC relies on the inbuilt Android SQLite library then yes, naturally older devices with older Android versions installed won't support the latest SQLite versions/statements. However it's entirely possible for an app like VLC to use a third-party SQLite support library that is Android version independent, or even to use a different but equivalent set of SQL statements depending on the version of Android it's running on. Mind you I don't know anything about VLC's code so I'm not saying that's what it does; just wanted to note that an older Android version doesn't automatically imply an app can't access newer SQLite on it.

In any case the issue here is whether the app's SQLite DB is malformed, since even the latest updated SQLite editors are failing to open it.

Aza
Developer
Developer
Posts: 2126
Joined: 14 Mar 2019 10:04

Re: [VLC Beta] Corrupt media database file

Postby Aza » 05 Jan 2022 13:52

However it's entirely possible for an app like VLC to use a third-party SQLite support library that is Android version independent
That's exactly the case.
Give DB Browser for SQLite a try. The trigger in question uses the UPDATE FROM syntax which was recently added to SQLite in v3.33.0.
You guessed well. We are using a pretty recent SQLite version and your browser have to use at least the 3.33.0 version.
For example, it's working on my system:
Image

lee321987
Blank Cone
Blank Cone
Posts: 11
Joined: 21 Aug 2012 11:16

Re: [VLC Beta] Corrupt media database file

Postby lee321987 » 06 Jan 2022 00:09

@Aza
THANK YOU IT WORKS!
Even though the stable build says it's based on SQLite 3.34.1 it would not open the .db file.
I had to download the nightly build of DB Browser for SQLite.
I am very happy.

evadedave
Blank Cone
Blank Cone
Posts: 56
Joined: 21 May 2021 04:11

Re: [VLC Beta] Corrupt media database file

Postby evadedave » 06 Jan 2022 04:21

Thanks @Aza. :)

Aza
Developer
Developer
Posts: 2126
Joined: 14 Mar 2019 10:04

Re: [VLC Beta] Corrupt media database file

Postby Aza » 06 Jan 2022 08:31

You're welcome :)


Return to “VLC for Android and Chrome OS”

Who is online

Users browsing this forum: No registered users and 13 guests