I know I’m not the first to post about this, but I’ve never seen a satisfying answer as to why this happens or how to prevent it … but here is how to FIX it.
I am using version 21.12.24 on an old CPU (w Win 10) - so Proxies are a godsend. My projects occasionally crash (usually when I move clips between tracks).
After a week worth of editing with several crashes - leading to several auto recover & “repaired” versions of my mlt, I create a render to check something … and while it renders in 1080p as set, the quality is - for the most part - 360p.
Obviously I suspect proxies, but I am confused as to why this happened. I turn off proxies and render again - same difference.
So I look at the xml (mlt file) and sure enough, a majority - not all mind you - of the files were pointing to the respective proxy: Where at some previous point it said
“video/MVI_2022.MP4”, it now says
“proxies/79574e0295d115d11671c038c7892ea0.mp4”
(my proxy folder is in the project folder)
Because I don’t work of a single mtl, but “save as” after every scene, I had a previous version to fall back on to now manually edit the mlt (of course I made a copy first).
Here is what I did:
- Opened both mtl files in notepad side by side
- Went down the entire file by searching for “resource”
- Then copy and paste good to bad
Shotcut save information in blocks, so a bad one would look like this:
<chain id="chain62" out="00:01:16.583">
<property name="length">00:01:16.617</property>
<property name="eof">pause</property>
<property name="resource">proxies/9d60075cac512f3dc288e6e420d5e5bf.mp4</property>
<property name="mlt_service">avformat</property>
<property name="seekable">1</property>
<property name="audio_index">1</property>
<property name="video_index">0</property>
<property name="mute_on_pause">1</property>
<property name="video_delay">0</property>
<property name="shotcut:hash">9d60075cac512f3dc288e6e420d5e5bf</property>
<property name="shotcut:caption">MVI_7610.MP4</property>
<property name="xml">was here</property>
</chain>
The only thing “corrupted" is the “resource" line (3rd property line) … so I replace that one with (in my case)
<property name="resource">video/MVI_7610.MP4</property>
.
If I don’t have a know good entry (because the good file I am using is several edits back), I can still figure out what the good source is because of the caption (2nd lot last) line. (and if that is not there, I can open the proxy file and match it against to original - tedious, but is rarely necessary)
Not all the blocks look like this (there a time-warps, etc. - but all will have the “resource” as the key element that needs fixing. In the end, it shouldn’t refer to a proxy destination anywhere in the mtl, so if it does, it needs correcting.
So my final step is to search for “prox” in the mlt I am repairing - it the search comes up empty, I’m done.
It took me about 2 hrs for a file w 5600 lines … mind you I was going slow and careful (as you always should when doing “brain surgery”)
This works perfectly. Everything is found, renders in full quality and after turning Proxy back on, everything is as it should be … and yes, 2 hrs wasted is no fun - but better than having to re-edit about a weeks worth of content.
The thing I don’t get though is: How does this happen, and how can I prevent it in the future? (or is it a bug?)
Either way - hope this helps someone else out there … cheers everyone.