Hello, I’m trying to make a 60 seconds horizontal bar transition that has a sharp edge but is smootly animated. However the my attempt results in a “laggy” animation, where every 3-4 frames, the bar moves by 2-3 pixels (this is at 1080p30fps).
Does anybody know a solution for this?
When I tried to achieve a horizontal bar transition (wipe) in Kdenlive, the laggy-ness was even worse - https://forum.kde.org/viewtopic.php?f=270&t=136664 - and also looking at the XML files of both Kdenlive and Shotcut revealed quite some differences, so I thought maybe shotcut uses a different feature of MLT.
I realize transitions are not expected to be longer than a few seconds, I’m trying to figure out other solutions, suggestions are welcome of course!
The only solution is to rewrite the MLT luma transition. Currently, it uses yuv422 pixel format with no interpolation, which may have similar limitations to the MLT composite transition (which Shotcut does not use) such that precision is limited to 2 pixels! I suspect the GPU version of this transition may be smoother since it operates in RGB with sub-pixel precision.
I tried shotcut both with and without --gpu flag to render the same .mlt project and didn’t see a difference. Could GPU support have been disabled without me noticing or would shotcut just not have launched if GPU support didn’t work when using the flag?
I used the same .mlt file, I think during non-gpu mode. Do I have to re-create the project while in --gpu mode for it to have an effect or will the transition automatically chose the method based on whether or not --gpu was provided to the running instance of shotcut?
Yes, you need to recreate the project in GPU mode. You should use and check the Settings menu toggle for GPU mode. The project file will have mlt_services that begin with “movit” if you made it in GPU mode. If you use the Horizontal Bar wipe that comes with Shotcut, then it is a 16 bit pgm. The 16 bits does provide a greater precision when determining the current position of the wipe edge. Maybe in Kdenlive, the wipe file is 8 bit, which may explain the more jerky motion.
If I understand correctly, Kdenlive effectively uses a 256-step horizontal gradient (because of 8 bits) and shotcut uses a 720 step one (because of resolution)
I made a 4K gradient and tested it in both kdenlive and shotcut, both seem to have better results.
I’m not sure whether I managed to create “fair”, comparable projects - especially with kdenlive’s transitions requiring two layers - but if I did, then it looks like shotcut’s lumina wipe bar transition is much more effective:
kdenlive 11m 10s
shotcut 3m 45s
Rendered 1 minute transition between two 4K pngs, on AMD Phenom 9550 4 x 2200 MHz, 64-bit. Both in CPU mode.
I have yet to test very long transitions, which should cause the “it takes multiple frames for 1px jump rather than interpolation”. But I’m happy there was such a simple solution to enhance the wipe.