Can you delete a timeline from within the database?

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

joemart

  • Posts: 96
  • Joined: Wed Apr 14, 2021 3:16 pm
  • Real Name: Joseph Martire

Can you delete a timeline from within the database?

PostTue Nov 30, 2021 4:07 pm

I recently encountered an issue within Davinci Resolve where I load a project and it never finishes loading. It's stuck on the loading part and cannot get past it. Is there a way to delete the timeline from the database without having to open the entire project? How would I go about this?
Offline

John Paines

  • Posts: 5820
  • Joined: Tue Jul 28, 2015 4:04 pm

Re: Can you delete a timeline from within the database?

PostTue Nov 30, 2021 4:24 pm

It might be possible if you knew how to a edit a project.db file in an external editor, but the "how" isn't public knowledge.

You also don't know for sure whether it's a timeline which is preventing the project from loading. BMD staff will sometimes examine damaged projects if you upload it to a file sharing service and supply a link here.
Offline

joemart

  • Posts: 96
  • Joined: Wed Apr 14, 2021 3:16 pm
  • Real Name: Joseph Martire

Re: Can you delete a timeline from within the database?

PostTue Nov 30, 2021 8:25 pm

I've uploaded the DRP project and the Resolve project into this dropbox link. Hopefully someone can take a look at it. I just want to get rid of the "test" timeline that I created.

https://www.dropbox.com/sh/gp47ey8tqht7 ... yQ73a?dl=0
Offline
User avatar

TheBloke

  • Posts: 1905
  • Joined: Sat Nov 02, 2019 11:49 pm
  • Location: UK
  • Real Name: Tom Jobbins

Re: Can you delete a timeline from within the database?

PostTue Nov 30, 2021 9:09 pm

Google drive link to fixed DRP.

This imports into Resolve and loads OK now. I edited the XML to delete the "test" timeline from MediaPool/Master/MpFolder.xml. I made no other changes, so can't be certain that there aren't any consistency issues. To try and guard against that I imported the edited DRP into Resolve, then re-exported a fresh DRP out of Resolve, which is the file uploaded above.

Give it a good test to be sure it's OK, and if you notice any weirdness you might want to export all the remaining timelines as DRTs and import into a fresh new project.

PS. I saw the same problem with the original DRP - it imported OK into Resolve, but then trying to load it would freeze Resolve at about 80%, requiring a force quit. Whatever was in the "Test" timeline was triggering some freeze in Resolve.
Resolve Studio 17.4.3 and Fusion Studio 17.4.3 on macOS 11.6.1

Hackintosh:: X299, Intel i9-10980XE, 128GB DDR4, AMD 6900XT 16GB
Monitors: 1 x 3840x2160 & 3 x 1920x1200
Disk: 2TB NVMe + 4TB RAID0 NVMe; NAS: 36TB RAID6
BMD Speed Editor
Offline

John Paines

  • Posts: 5820
  • Joined: Tue Jul 28, 2015 4:04 pm

Re: Can you delete a timeline from within the database?

PostTue Nov 30, 2021 11:08 pm

TheBloke wrote:I edited the XML to delete the "test" timeline from MediaPool/Master/MpFolder.xml..


Which xml file? And where is "MediaPool/Master/MpFolder.xml"?
Offline

joemart

  • Posts: 96
  • Joined: Wed Apr 14, 2021 3:16 pm
  • Real Name: Joseph Martire

Re: Can you delete a timeline from within the database?

PostTue Nov 30, 2021 11:39 pm

Thank you! I tested it and it's working great!

I was trying to do something with 3D shapes, at least from what I remember. Then after that, Davinci Resolve wasn't loading that project and it was within the timeline "test". It wasn't a complex thing that I was trying to do. I just remember opening a 3DShape node and I did something within it and it crashed.

I tried going into the Project.db file using SQLite to erase the timeline from there, but I was unsuccessful. Would you elaborate more on how exactly you fixed the issue, which XML file did you edit?

TheBloke wrote:Google drive link to fixed DRP.

This imports into Resolve and loads OK now. I edited the XML to delete the "test" timeline from MediaPool/Master/MpFolder.xml. I made no other changes, so can't be certain that there aren't any consistency issues. To try and guard against that I imported the edited DRP into Resolve, then re-exported a fresh DRP out of Resolve, which is the file uploaded above.

Give it a good test to be sure it's OK, and if you notice any weirdness you might want to export all the remaining timelines as DRTs and import into a fresh new project.

PS. I saw the same problem with the original DRP - it imported OK into Resolve, but then trying to load it would freeze Resolve at about 80%, requiring a force quit. Whatever was in the "Test" timeline was triggering some freeze in Resolve.
Offline
User avatar

TheBloke

  • Posts: 1905
  • Joined: Sat Nov 02, 2019 11:49 pm
  • Location: UK
  • Real Name: Tom Jobbins

Re: Can you delete a timeline from within the database?

PostWed Dec 01, 2021 7:28 am

Ah, so a Fusion bug. Figures. Had I known it was a Fusion issue, another possible way to fix it would be to find the offending Fusion comp and remove it from the XML. I've done that once before as an experiment

A DRP file is just a renamed ZIP file. So I unzipped it, searched it for "Test", which identified the file MediaPool/Master/MpFolder.xml, which I then opened in an text editor to delete the "Element" entry for the Test timeline.

Code: Select all
tomj@Eddie ~/Downloads/BrokenResolveProject/unzip $ unzip BrokenProject.drp
Archive:  BrokenProject.drp
  inflating: project.xml
  inflating: MediaPool/Master/000_Assets/MpFolder.xml
  inflating: MediaPool/Master/001_SFX/MpFolder.xml
  inflating: MediaPool/Master/002_Theme/MpFolder.xml
  inflating: MediaPool/Master/003_Intro/000_Assets/MpFolder.xml
  inflating: MediaPool/Master/003_Intro/MpFolder.xml
  inflating: MediaPool/Master/004_ImpGame2/000_Assets/MpFolder.xml
  inflating: MediaPool/Master/004_ImpGame2/001_SFX/MpFolder.xml
  inflating: MediaPool/Master/004_ImpGame2/002_Theme/MpFolder.xml
  inflating: MediaPool/Master/004_ImpGame2/003_ChatBoxes/MpFolder.xml
  inflating: MediaPool/Master/004_ImpGame2/MpFolder.xml
  inflating: MediaPool/Master/005_DBD/000_Thumbnail/MpFolder.xml
  inflating: MediaPool/Master/005_DBD/001_SFX/000_Song/MpFolder.xml
  inflating: MediaPool/Master/005_DBD/001_SFX/001_Memes/MpFolder.xml
  inflating: MediaPool/Master/005_DBD/001_SFX/MpFolder.xml
  inflating: MediaPool/Master/005_DBD/002_Images/000_Video/MpFolder.xml
  inflating: MediaPool/Master/005_DBD/002_Images/MpFolder.xml
  inflating: MediaPool/Master/005_DBD/003_Misc/MpFolder.xml
  inflating: MediaPool/Master/005_DBD/MpFolder.xml
  inflating: MediaPool/Master/MpFolder.xml
  inflating: SeqContainer/0f0eb08c-1265-40f7-be2d-8af68613b4fa.xml
  inflating: SeqContainer/141a0652-5e5a-4fbd-86e3-0d185020e756.xml
  inflating: SeqContainer/1bfad9e4-9d41-46e2-bdbc-d84eddb3ee4d.xml
  inflating: SeqContainer/237fdc3f-1413-4af3-8a40-63a0591f2357.xml
  inflating: SeqContainer/3d041a2d-70eb-4282-8fbe-d17950361782.xml
  inflating: SeqContainer/51c95671-a0cc-412f-b14f-e89e5e0be69f.xml
  inflating: SeqContainer/5d78276e-6ca6-4747-bc50-cef1e5274afe.xml
  inflating: SeqContainer/67616fc1-2d99-423f-b4dd-f17e7eb97cda.xml
  inflating: SeqContainer/69279178-2470-445d-a17a-f27785b8a893.xml
  inflating: SeqContainer/77cb719b-c35c-46d0-9197-7dcba6da34ee.xml
  inflating: SeqContainer/8341ccd0-159a-4c77-a398-52eb74099c04.xml
  inflating: SeqContainer/8bb93125-e383-434d-acbf-e1d29dfcb2c6.xml
  inflating: SeqContainer/a7ad1f49-c860-4da4-94a3-e8a25c373c0e.xml
  inflating: SeqContainer/ae6f9d91-ce4d-4d13-be05-38b3119fb66d.xml
  inflating: SeqContainer/cf30ec0b-df22-4a57-9428-655429e49739.xml
  inflating: Gallery.xml
Code: Select all
tomj@Eddie ~/Downloads/BrokenResolveProject/unzip $ ls -al
total 6152
drwxr-xr-x   7 tomj  staff   224B 30 Nov 20:57 .
drwxr-xr-x   5 tomj  staff   160B 30 Nov 20:57 ..
-rwxr--r--   1 tomj  staff   2.8M 30 Nov 20:57 BrokenProject.drp
-rw-rw-rw-   1 tomj  staff    12K 30 Nov 15:06 Gallery.xml
drwxr-xr-x   3 tomj  staff    96B 30 Nov 20:57 MediaPool
drwxr-xr-x  17 tomj  staff   544B 30 Nov 20:57 SeqContainer
-rw-rw-rw-   1 tomj  staff   220K 30 Nov 15:06 project.xml

tomj@Eddie ~/Downloads/BrokenResolveProject/unzip $ grep -ir test .
./MediaPool/Master/MpFolder.xml:    <Name>test</Name>
./MediaPool/Master/MpFolder.xml:      <Name>test</Name>

Image

joemart wrote:I tried going into the Project.db file using SQLite to erase the timeline from there, but I was unsuccessful.
Should be possible in the SQLite database also. Perhaps if you deleted the appropriate entry from table Sm2Timeline. I haven't tested doing it in the DB though.

The advantage of doing it in the XML is that you can easily search all the content as text, and once you've made your hacks, it goes through Resolve's import process. Which may act like a kind of filter, ie potentially avoiding data consistency issues.

Needless to say, this sort of manual editing is not recommended unless absolutely necessary.
Resolve Studio 17.4.3 and Fusion Studio 17.4.3 on macOS 11.6.1

Hackintosh:: X299, Intel i9-10980XE, 128GB DDR4, AMD 6900XT 16GB
Monitors: 1 x 3840x2160 & 3 x 1920x1200
Disk: 2TB NVMe + 4TB RAID0 NVMe; NAS: 36TB RAID6
BMD Speed Editor
Offline
User avatar

TheBloke

  • Posts: 1905
  • Joined: Sat Nov 02, 2019 11:49 pm
  • Location: UK
  • Real Name: Tom Jobbins

Re: Can you delete a timeline from within the database?

PostWed Dec 01, 2021 7:28 am

By the way, do you have Project Backups enabled? Having backups made every X minutes (I have it set to 10) would mean you could always revert to an earlier state if you get into an un-openable position. I'd highly recommend turning it on.

Image
Resolve Studio 17.4.3 and Fusion Studio 17.4.3 on macOS 11.6.1

Hackintosh:: X299, Intel i9-10980XE, 128GB DDR4, AMD 6900XT 16GB
Monitors: 1 x 3840x2160 & 3 x 1920x1200
Disk: 2TB NVMe + 4TB RAID0 NVMe; NAS: 36TB RAID6
BMD Speed Editor
Offline

joemart

  • Posts: 96
  • Joined: Wed Apr 14, 2021 3:16 pm
  • Real Name: Joseph Martire

Re: Can you delete a timeline from within the database?

PostWed Dec 01, 2021 3:10 pm

TheBloke wrote:Should be possible in the SQLite database also. Perhaps if you deleted the appropriate entry from table Sm2Timeline.


Yes, that is exactly the one that I was trying to edit, the Sm2Timeline. In my case, it was the 10th entry. I deleted the entry, but after trying to save it, I kept getting the error "FOREIGN KEY constraint failed". I also tried deleting the IDs that were linked to the entry, so I had to research on how to do that from SQLite, but I kept getting the same error.
Offline

joemart

  • Posts: 96
  • Joined: Wed Apr 14, 2021 3:16 pm
  • Real Name: Joseph Martire

Re: Can you delete a timeline from within the database?

PostWed Dec 01, 2021 3:12 pm

TheBloke wrote:By the way, do you have Project Backups enabled? Having backups made every X minutes (I have it set to 10) would mean you could always revert to an earlier state if you get into an un-openable position. I'd highly recommend turning it on.

Image



Yes, I figured I should do that, I could just revert to a previous state. But still, I wasn't doing anything complex with a 3D shape, I didn't expect it at all to crash.

Thank you for the help and insight!
Offline
User avatar

Sean Nelson

  • Posts: 758
  • Joined: Sun Feb 07, 2021 9:48 pm
  • Location: Vancouver, Canada
  • Real Name: Sean Nelson

Re: Can you delete a timeline from within the database?

PostWed Dec 01, 2021 4:59 pm

I've gotten into the habit of exporting my project to a DRP file each time I finish an editing session. The DRP file then gets backed up into a daily cycle along with the rest of my file system backups. This gives me the ability to recover to any previous day's work in case things get royally screwed up.
DR Studio 18.6.4 Build 6, Win10Pro x64 22H2/19045.3570
Asus C246 Pro Motherboard, Xeon E-2278G@3.4GHz, 64GB ECC RAM
GeForce 3060 12GB, "Studio" driver 512.15
OS,Library: 1TB NVMe SSD - Project,Cache: 1TB NVMe SSD
Offline
User avatar

TheBloke

  • Posts: 1905
  • Joined: Sat Nov 02, 2019 11:49 pm
  • Location: UK
  • Real Name: Tom Jobbins

Re: Can you delete a timeline from within the database?

PostWed Dec 01, 2021 5:05 pm

joemart wrote:Yes, that is exactly the one that I was trying to edit, the Sm2Timeline. In my case, it was the 10th entry. I deleted the entry, but after trying to save it, I kept getting the error "FOREIGN KEY constraint failed". I also tried deleting the IDs that were linked to the entry, so I had to research on how to do that from SQLite, but I kept getting the same error.
Yeah, that's exactly the sort of data consistency issue I was referring to.

With a few minutes spent analysing the schema it should be possible to work out what exactly needs to be deleted/updated to keep everything consistent. But so far I've found editing the XML of an unzipped DRP has worked OK, at least for these kind of simple edits. Possible that extra step of the Resolve project import is serving to sanitise the input, and only writing the data that's consistent.
Resolve Studio 17.4.3 and Fusion Studio 17.4.3 on macOS 11.6.1

Hackintosh:: X299, Intel i9-10980XE, 128GB DDR4, AMD 6900XT 16GB
Monitors: 1 x 3840x2160 & 3 x 1920x1200
Disk: 2TB NVMe + 4TB RAID0 NVMe; NAS: 36TB RAID6
BMD Speed Editor
Offline

sk2025

  • Posts: 1
  • Joined: Thu Dec 02, 2021 3:59 pm
  • Real Name: Stephen Kucher

Re: Can you delete a timeline from within the database?

PostThu Dec 02, 2021 4:11 pm

I'm so happy I found this thread and if someone could help me out it would be greatly appreciated!

I'm also trying to find a way to delete a timeline from a database as I accidentially made a timeline that was over 25,000 pixels wide. As soon as I made the timeline the project crashed and now Resolve crashes every time I try to open it.

I would typically resort to a project backup however I had just recently installed a fresh version of Resolve on this computer so that setting wasn't turned on yet (it is now tho :roll: )

I looked over this thread and saw mentions of going in though a text editor but I don't have enough knolwedge to do this quite yet. As I look into it myself I was hoping someone here could help me out and potentially remove the timeline.

Here is a link to the project: https://drive.google.com/drive/folders/ ... sp=sharing

Any assistance from you amazing people would be greatly appreciated.

Return to DaVinci Resolve

Who is online

Users browsing this forum: No registered users and 131 guests