Shotcut desyncs masks, etc; and, border on effects

I have been at this for a month. Thus, there has been no lack of effort on my part. It is time I seek some help with this.

I am using the most current version of Shotcut, I believe. Shotcut has had a lot of errors, but I have managed to compensate for most of them. This one, not so.

If I stack two identical videos, and match them up perfectly, and then put masks and different effects in both, what I seem to often get is a mysterious desyncing. These effects are less that 1 second long, and maybe less than 1/30 of a second long. There will be a moment in the beginning where there is an image but no filter effects. Or at the end it will lag a moment longer than it should. Yet, according to the timeline, even at closest zoom, they are perfectly lined up. This is seriously destroying some of the immersion of my video.

Similarly, for some effects, such as sketch, a border appears around the image, when it shouldn’t. Coupled with inverse color, it throws off the effect by creating an unwanted white frame.

The first peoblem is the huge issue, but I would appreciate help with the second one too.

This sounds like the engine is not able to seek perfectly frame-accurate on this file(s). You should use the Properties menu to convert it to an edit-friendly format and try again.

That is an unfortunate side effect of this effect. I am not sure I will get around to fixing that soon as it is not high priority. You can add Rotate and Scale and set Scale to something like 100.5% to trim the edges.

For the second point, that sound interesting. Would it have any noticeable effect on the video? I am currently using a combination (off the top of my head) of mask and brightness/vignette to create a black border that blends in. Setting the line width and height to 1 takes it away as well. But both of these alters the look somewhat. Does your solution not alter it (essentially)?

For the first point, all of the numerous video files, when I imported, I did convert, using the highest “lossless” setting. So would your solution still be the same given that?

The workaround slightly scales the image such that the edges fall just outside the active frame and get cropped. The image will very slightly softened due to scaling, but the image is already distorted enough by the effect of Sketch that it will likely not even matter.

No. I can try to reproduce it. What is a filter you use in conjunction with Mask? I can use anything, but it will be better to use something you experienced the problem with.

This has happened for multiple things. But if you are asking about the issue of the desyncing, I will give you an example.

Two duplicate videos stacked on top of each other. Both have audio gain of 12.0 dB. An audio file runs beneath. Basically, I cleverly used two elliptical masks to create an eyeball on the screen with the center having inverse color, from which the viewer sees the scene.

My Shotcut just crashed again, so it is taking me a while to get more specific details. Hopefully that helped.

Bear in mind different effects are on at different moments.
Top video:
Mask
Invert Colors
Vignette
Mute

Bottom:
Mask
Gain/Volume

It might help to share your mlt file.
You can just drag & drop into the reply window.

What do you mean exactly? Using Keyframes to trim the filters?

It depends what scene. As I said, this happens in multiple cases. The instance I gave you is one of the simpler ones, thus helping to eliminate unlikely variables.

It may almost be paranoia, but I think I see, at times, 1 file like 1 mm longer than the other. So I have tried deleting one file and copying and pasting, etc. So that is probably not it.

An excellent idea. But for the moment my laptop has the files, and I am typing on my phone. I could transfer the mlt file, but would I need all the videos, etc?

OK, I’ve tried reproducing using the information provided and not seeing a problem yet. You said “1mm” longer, but I think you mean something like 1 frame different between upper and lower videos, right? That is what I am looking for as far as “desync” when using the typical Mask use case of same video on top of the other.

Just the mlt file. The file contains the xml code which may explain what’s going on.

Source file info would also help, which is displayed in the properties panel/window.

Well, bear in mind the difference is less than the minimum the timeline notes. And it seems to be something that comes back even if I delete and copy and paste something. I could be wrong about that. Anyway, “frame” may be a better word than “mm”, yes.

Murderer ASMR (alternate version).mlt (365.8 KB)

So, here is the mlt. I have been editing it to make some corrections to errors I saw when I previously exported it.

As for the source info … there are multiple scenes with an issue. Any specific data you are after?

According to the mlt file, the Video Mode is set to Automatic, and it’s showing 1920x1080, 30fps.
The multiple scenes where there is an issue, are those source files a different frame rate?

Line 127: <property name="resource">ASMR/ASMR Raw Footage/20180725_033346 (Murderer ASMR, repeating 'I').mp4</property>

I’m wondering if the ’ or the ( ) in the file name would mess with Shotcut’s program. Guess I’m from the old school where I don’t use special characters in my file names.

That “I” is muted, invisible, etc. Decided not to use it. The problem happens with things that don’t have quotes. Everything has parentheses though. Would that cause this?

As for the other point: everything that has two tracks at once is a duplicate video, but different filters. So I assume they are identical.

Do you want me to upload anything else?

Upon careful review of the file properties, although I always agreed to replace the files I imported with edit-friendly versions, it seems Shotcut doesn’t automatically replaced what you imported with them. I would suggest that be made an feature in a future upgrade.

I have tried taking a segment and converting it, but it seems what results is a conversion of the entire, unchopped source video. I can’t go back and meticulously find my place in everything. Would it be possible to just edit the XML to say that the source file is the edit-friendly version? It would be less time-consuming to do this, and Notepad+ has a “replace all” feature. I might suggest the ability to see and edit code be added as a new UI feature.

But, can I just edit the file’s code? Is that going to cause any issues? Just want to check in advance.

I implemented the changes in my file. Programming knowledge is a great thing.

I’m going to play with file names this weekend in Shotcut.

With how large your project is, I hope you’re running off an SSD and not a HDD (Hard Disk Drive).
What are your computer specs?

Yes, that is correct, and it is planned to do that.

Yes, but line like the following might need to be changed or simply remove the lines (your values may vary).

    <property name="audio_index">1</property>
    <property name="video_index">0</property>