Exported video is completely BLACK if you don't give it a unique filename

I’ve read of several users experiencing that their exported videos are coming out completely black. User “TheNotSoLone Wanderer” alluded to the fact that this could happen if you overwrite the previous version of the file when exporting, in a previous post HERE..

I just spent a little time investigating this, and found it to be true for me. I actually made a little tutorial video about this problem - using SC with subtitles. (Part of my reason to make this video was to experiment with subtitles using transparent pngs made in Inkpen and importing/resizing in Shotcut).

So, here’s my video - I hope it helps someone. I presume it’s a bug?

I do not understand what leads people to believe Shotcut can write to the same file it needs to read from! Yes, it is a bug, and some day I have to add a code to prevent users from attempting to do that.

:grinning:[quote=“shotcut, post:2, topic:3007”]
I do not understand what leads people to believe Shotcut can write to the same file it needs to read from!
[/quote]

Hi Dan,
I’m probably missing something here, but isn’t “writing to the same file it needs to read from” the same as opening a file, editing it, then exporting it so it overwrites the original? I do this frequently in all sorts of applications, in fact I just did it in Audacity - opened an mp3, trimmed the start and end points, hit “export”. The standard “would you like to replace…” warning appears and it works fine.

Anyway, who am I to argue with the lead developer of this great software!!! :grinning: :grinning: I’m probably missing something. Thanks for creating SC, Dan, looking forward to future versions…
All the best,
Jon

Odd this is a problem for Shotcut though, Dan. Other video editors happily overwrite the source in the same circumstance.

For video apps, source files are not loaded entirely into memory. That would consume way too much memory. You might think one could write to a temp file and then rename it to the target name. However, the original file may still registered in the app’s memory because the project is, more often than not, still loaded (even if not saved as a project file)! The new version 17.11 prevents it with an error dialog, and I have no plans to change that.

Thank you Dan for addressing this. I had a brief go at exporting a file (after editing) and using the same file name (ie overwriting it) and it seemed to work fine - I didn’t get the error message I was expecting even. Should this post then be marked as “solved in 17.11”? I’m not sure how to do this on this forum so any help would be appreciated. Thanks Dan for addressing this issue.
Jon

Can someone please explain this in a simpler way, I am a new to Shotcut and I have been experiencing the same problem and I don’t know how to fix it.