Saving a project moves the split points on macOS

What is your operating system?
Mac OS X Sonoma 14.2.1

What is your Shotcut version (see Help > About Shotcut)?
24.1.28

Can you repeat the problem? If so, what are the steps?

  1. open mlt file (attached). click “ok” that the source movie is not found
  2. save the file
    result - certain split points have been moved ahead 1 frame, while other have not

I first noticed this bug when I used split points to remove a bit of a movie; the exported movie still had 1 frame (the last frame) of the removed section. OK, I thought I had been sloppy, so I cut that 1 frame, and re-exported. But the stray frame was still in the export. Then I noticed that saving the project has the same result - my split point at the end of the removed scene gets moved 1 frame earlier every time I save. I can’t get rid of that frame. I’m also losing 1 frame from before the removed scene.

Here is the mlt file you can see for yourself.
test.mlt (24.6 KB)
When you save, the times of some of the split points get moved forward, but others don’t. Here is the part of the file that shows this change when all you do is open the project and save, nothing more.
Before:
entry producer=“chain0” in=“00:00:00.000” out=“00:09:59.993”/>
entry producer=“chain1” in=“00:10:00.000” out=“00:19:59.993”/>
entry producer=“chain2” in=“00:20:00.000” out=“00:24:59.993”/>
entry producer=“chain3” in=“00:25:00.000” out=“00:25:00.901”/>
entry producer=“chain4” in=“00:25:00.934” out=“00:25:16.083”/>
entry producer=“chain5” in=“00:25:16.116” out=“00:27:29.997”/>
entry producer=“chain6” in=“00:27:30.030” out=“00:28:09.977”/>
entry producer=“chain7” in=“00:28:10.010” out=“00:28:18.886”/>
After:
entry producer=“chain0” in=“00:00:00.000” out=“00:09:59.993”/>
entry producer=“chain1” in=“00:10:00.000” out=“00:19:59.993”/>
entry producer=“chain2” in=“00:20:00.000” out=“00:24:59.993”/>
entry producer=“chain3” in=“00:24:59.993” out=“00:25:00.868”/>
entry producer=“chain4” in=“00:25:00.901” out=“00:25:16.049”/>
entry producer=“chain5” in=“00:25:16.083” out=“00:27:29.997”/>
entry producer=“chain6” in=“00:27:30.030” out=“00:28:09.977”/>
entry producer=“chain7” in=“00:28:10.010” out=“00:28:18.886”/>

The same thing happens with the other Shotcut versions I have (21.8 and 22.12)

This might be due to the frame rate in your project:
frame_rate_num="2997" frame_rate_den="100"
29.97 is an approximation of the more proper NTSC frame rate of 30000/1001. If you use a better video mode Settngs > Video Mode > Non-broadcast > “854x480 16:9 NTSC” or similar then I think it will avoid this problem. I see your project is 86x48 resolution. Why is that? If you make a custom video mode Settings > Video Mode > Custom, then you will find in the drop down menu next to Frames/sec a preset for the more proper 29.970030. When Shotcut sees that it converts it into 30000/1001 but not for 29.97.

I opened your project in Linux, and followed your steps except using Save As. Then, I compared the two files using the diff program, and they are the same. This might be another area where macOS differs because the compiler used on it seems to have different behavior with aggressive optimizations in a release build. I will try a slightly relaxed release build on macOS to see if it helps.

I confirmed this. I will change it for the next version.

I also confirmed that on macOS if you change the Video Mode (using Timeline > Output > Edit) Frames/sec to 29.970030 the problem goes away. This is the equivalent of Settings > Video Mode > Custom for an existing project. I did that on your test.mlt, saved it as test2.mlt, opened test2.mlt, and saved it as test3.mlt. diff -u test2.mlt test3.mlt shows no changes.

I made a new build for macOS for the 24.01 release with this fix (and other unidentified, weird problems on macOS related to calculations).
https://github.com/mltframework/shotcut/releases/download/v24.01.28/shotcut-macos-240131.dmg