Bug 436804 - Proxy clips are not properly generated from stabilized vidoes
Summary: Proxy clips are not properly generated from stabilized vidoes
Status: CONFIRMED
Alias: None
Product: kdenlive
Classification: Applications
Component: Rendering & Export (show other bugs)
Version: 21.04.0
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2021-05-09 00:33 UTC by Pozsgay Máté
Modified: 2024-10-26 13:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
fritzibaby: Brainstorm+


Attachments
Proxy with black strips (30.39 KB, image/png)
2021-05-19 15:33 UTC, Pozsgay Máté
Details
No proxy without black strips (30.39 KB, image/png)
2021-05-19 15:34 UTC, Pozsgay Máté
Details
Proxy with black strips (the real one) (23.52 KB, image/png)
2021-05-19 15:35 UTC, Pozsgay Máté
Details
Proxy_Clip.png (33.01 KB, image/png)
2021-05-19 17:36 UTC, emohr
Details
Windows_crash_Hungary_Vidstab.png (11.28 KB, image/png)
2021-05-19 19:30 UTC, emohr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pozsgay Máté 2021-05-09 00:33:54 UTC
SUMMARY
Multiple issues of proxy clips generated from stabilized clips.

STEPS TO REPRODUCE
1. Import a clip
2. Stabilize the clip
3. Add the stabilized mlt to the clip bin (or let the kdenlive do it for you)
4. Generate a proxy clip from the stabilized clip

OBSERVED RESULT
The proxy clip is generated, however the quality is much worst than expected, blank strips are added to te top and bottom, and the length of the proxy clip is also incorrect (about the double of the original).

EXPECTED RESULT
The proxy clip shouldn't have the two black strips, this might improve the quality as well, the length of the proxy clip should be the same as the original.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu 20.04.2
KDE Plasma Version: 
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Comment 1 Pozsgay Máté 2021-05-09 00:47:21 UTC
Might be related to: https://invent.kde.org/multimedia/kdenlive/-/issues/1053
Comment 2 emohr 2021-05-18 16:45:16 UTC
Please try with the nightly AppImage. With the new task manager this should be solved.
Comment 3 Pozsgay Máté 2021-05-18 21:04:34 UTC
The issue is partially solved in nightly (21.07.70).
The length of the proxy video is the same as the source, however the black strips are still added. This is probably two separate issue, but one of them looks like to got solved.
Comment 4 emohr 2021-05-19 14:47:52 UTC
I cannot reproduce the black strips on top and bottom of the clip (tested with 1080p50 clip). 
What type of clip and project settings do you have? 
Can you upload a test clip so I can check?
Comment 5 Pozsgay Máté 2021-05-19 15:33:48 UTC
Created attachment 138567 [details]
Proxy with black strips
Comment 6 Pozsgay Máté 2021-05-19 15:34:12 UTC
Created attachment 138568 [details]
No proxy without black strips
Comment 7 Pozsgay Máté 2021-05-19 15:35:30 UTC
Created attachment 138569 [details]
Proxy with black strips (the real one)

Please ignore previous upload, accidentally uploaded the same image twice
Comment 8 Pozsgay Máté 2021-05-19 15:36:11 UTC
The black strips are present on all videos I tried, but only if I generate proxy videos from stabilized MLT clips (on normal clips, proxy videos are fine). Even the thumbnail picture in the project bin shows the black strips. (See attachments)

I tested on this one as well: https://samplelib.com/lib/download/mp4/sample-30s.mp4
Comment 9 emohr 2021-05-19 17:36:04 UTC
Created attachment 138572 [details]
Proxy_Clip.png

Hmm, I cannot reproduce the black stripes neither on Windows nor with the AppImage (nightly). Even with strange project settings. 

Is your project set to 1080p30? 
Do you have set any special settings in project -> project settings -> proxy 
or in settings -> configure Kdenlive -> proxy clips?
Comment 10 Pozsgay Máté 2021-05-19 18:42:37 UTC
Good news!

I was able to narrow down the source of the problem. I found a thread in the mltframework gitlab. (https://github.com/mltframework/shotcut/issues/416) They had similar problems, so I started kdenlive with an unset LANG variable (was set to hu_HU.UTF-8) and now the proxy clips are generated without the black bars on stabilized videos as well!

There is probably some problem with the decimal point format ("." vs ",").
Comment 11 emohr 2021-05-19 19:21:27 UTC
Very good. I thought as well about language settings.
Comment 12 emohr 2021-05-19 19:30:00 UTC
Created attachment 138574 [details]
Windows_crash_Hungary_Vidstab.png

Yes this looks definitely about the comma/point issue in Hungarian language. I get a crash on Windows set to Hungarian and use vidstab.
Comment 13 Jean-Baptiste Mardelle 2021-05-21 14:18:58 UTC
I cannot reproduce in 21.04.1 or git master. Can you tell me which project format you use (1920x1080 30 fps?) and what is the resolution of your source clips ?
Comment 14 Jean-Baptiste Mardelle 2021-05-21 15:30:19 UTC
Ok I managed to reproduce, working on it, no more info required, thanks
Comment 15 Pozsgay Máté 2021-05-21 20:31:27 UTC
Just one more addition. I am able to reproduce the crash on Linux as well:

1. Open kdenlive with unset LANG
2. Generate the mlt file using vidstab
3. Close kdenlive and restart LANG set to "hu_HU.UTF-8"
4. Add the generated mlt file to the clip bin
5. Enable proxy clips
6. The proxy generation starts, and kdenlive almost instantly crashes.

The same happens if I load the "hungarian" version of mlt to the "english" version of kdenlive, so it looks like the generated files are also locale-dependent.

I can spot two difference between the files:
- In the mlt file the value of LC_NUMERIC is "C" vs. "hu_HU.UTF-8"
- In the trf file decimal point indeed different "." vs. ","

Thank you!