Bug 435147 - Video stabilization doesn't work.
Summary: Video stabilization doesn't work.
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Video Effects & Transitions (show other bugs)
Version: 20.12.3
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Julius Künzel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-30 13:12 UTC by kaushik.dhar
Modified: 2021-04-03 11:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Stabilization dialog in 20.08 (38.69 KB, image/png)
2021-04-01 07:41 UTC, kaushik.dhar
Details
Stabilization dialog in 20.12.3 (32.98 KB, image/png)
2021-04-01 07:43 UTC, kaushik.dhar
Details
*.mp4.mlt (5.21 KB, application/xml)
2021-04-01 07:45 UTC, kaushik.dhar
Details
*.mp4.mlt.trf (3.38 MB, application/octet-stream)
2021-04-01 07:46 UTC, kaushik.dhar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kaushik.dhar 2021-03-30 13:12:57 UTC
Kdenlive freezes when the stabilized .mlt file is dragged on to Timeline and recovers after a couple of minutes. Freezes again if the Timeline playhead is dragged from one position to another. Besides, the stabilized clip didn't look stabilized at all so I'm not sure if stabilization itself is working.
Comment 1 Julius Künzel 2021-03-31 12:02:23 UTC
Thanks for your report! I can not reproduce your problem with 20.12.3. Can you please give us more information:
1) What packaging type do you use (appimage, flatpak, ppa,…)?
2) Do you have the problem with all videos or only with a certain file or file type (*.mp4,…)?
4) Do you have the same problem with other *.mlt clips (try e.g. the generators menu Project > Generators)
3) Can you please attache your destination files *.mlt and *.mlt.trf here to the bug report?
4) Do you have experience with clip stabilization in previous kdenlive versions (which versions?)? Does it work with these versions?
Comment 2 kaushik.dhar 2021-04-01 07:41:39 UTC
Created attachment 137224 [details]
Stabilization dialog in 20.08
Comment 3 kaushik.dhar 2021-04-01 07:43:24 UTC
Created attachment 137225 [details]
Stabilization dialog in 20.12.3
Comment 4 kaushik.dhar 2021-04-01 07:45:51 UTC
Created attachment 137226 [details]
*.mp4.mlt
Comment 5 kaushik.dhar 2021-04-01 07:46:44 UTC
Created attachment 137227 [details]
*.mp4.mlt.trf
Comment 6 kaushik.dhar 2021-04-01 07:47:20 UTC
Hello Julius, thank you for your response. Here's the info you needed:

1. Appimage - kdenlive-20.12.3a-x86_64.appimage

2. I have tested this with several .mp4 videos and found the same problem. However, all these .mp4 videos could be successfully stabilized with versions 20.08.

Additional details - When I check the 'stabilized' folder after a clip is stabilized, the stabilized clip still shows a progress bar at bottom and status shows 1 job in queue and the computer freezes. I have to either restart Kdenlive or my computer. This happened with all clips I tried to stabilize except one rare case when I was able to stabilize a clip. However even with this rare case it was a very slow process - after dragging the stabilized .mlt file on the Timeline I needed to wait for about 5-7 mins and only then the project monitor was able to play the clip.

By the way, the vidstab dialog box looks slightly different in versions 20.08 vs 20.12.3. Just found this interesting and thought of sharing in case this helps (see attachment).

3. Yes I faced the same with the generator .mlt clip as well. While the stabilization process finally completed without having to restart Kdenlive but it was a very long process (took about 3 minutes to stabilize a 5 second generator clip, and then after dragging the stabilized .mlt file on the Timeline I needed to wait for about 5-7 mins and only then the project monitor was able to play the clip). 

4. I have attached the destination files *.mlt and *.mlt.trf for the only one clip that I was able to successfully stabilize because on other occasions I had to restart Kdenlive / computer and therefore do not have the *.mlt.trf files.

5. Yes, I do. I have successfully stabilized clips in versions 20.08 and 20.04.
Comment 7 Julius Künzel 2021-04-01 17:58:50 UTC
Thanks for your answer. For 3. maybe I was not clear: I meant if you have the same problem if you simply use a generator clip (without stabilization). I want to test this way if it is maybe not a issue with stabilization but with *.mlt clips in general.

The fact that you see the progress bar (1 job) for the clip inside the "stabilized" folder seems as if the stabilization it self works, but there are problems with the stabilized *.mlt clip. Can you maybe try to stabilize a clip with a previous version and import the *.mlt file to 20.12 and the other way around?

I think the UI difference comes from a Qt or KDE Frameworks update
Comment 8 Julius Künzel 2021-04-01 18:28:24 UTC
Okay. It seems there is an issue with the decoding of the *.mlt.trf file. In older appimage versions it is human readable with a text editor. With appimage 20.12.3 not. The 20.12.3 flatpak works fine (can you confirm?) So I guess this is a upstream issue with vidstab introduced with a recent change (because the vidstab is build from master branch for the appimage).

I will do some investigations and maybe update the dependencies. This can take some days and I will come back to you as soon as I have something to test…
Comment 9 kaushik.dhar 2021-04-02 06:54:29 UTC
Thanks Julius. As to no. 3, a generator clip without stabilization works fine, so the issue isn't with *.mlt clips in general.

As to your other point, the *.mlt file of clip stabilized via 20.08 doesn't work with 20.12. When I drag the *.mlt file on to the Timeline of 20.12, the project monitor doesn't play the clip.
Comment 10 Julius Künzel 2021-04-02 17:24:28 UTC
I created a test appimage. Can you please try https://files.kde.org/kdenlive/unstable/kdenlive-21.07.70-b4d2c85-vidstabtest1-x86_64.appimage ?
Comment 11 kaushik.dhar 2021-04-03 05:38:09 UTC
(In reply to Julius Künzel from comment #10)
> I created a test appimage. Can you please try
> https://files.kde.org/kdenlive/unstable/kdenlive-21.07.70-b4d2c85-
> vidstabtest1-x86_64.appimage ?

Hi Julius, I tested this and this one seems to be working fine.
Comment 12 Julius Künzel 2021-04-03 11:00:50 UTC
Git commit 68e559ec556f0498a906445eca91485375f28de0 by Julius Künzel.
Committed on 03/04/2021 at 11:00.
Pushed by jlskuz into branch 'release/21.04'.

Appimage dependencies: Freeze vidstab version

M  +1    -0    packaging/appimage/3rdparty/ext_vidstab/CMakeLists.txt

https://invent.kde.org/multimedia/kdenlive/commit/68e559ec556f0498a906445eca91485375f28de0