Bug 408235 - Crop effect over proxied clip not rendering like in project
Summary: Crop effect over proxied clip not rendering like in project
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Video Display & Export (show other bugs)
Version: Appimage - Refactoring
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
: 411040 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-06-03 07:33 UTC by Rafael Linux User
Modified: 2021-09-11 15:37 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
fritzibaby: Brainstorm+


Attachments
Video rendered vs project window monitor (395.18 KB, image/png)
2019-06-03 16:20 UTC, Rafael Linux User
Details
demo (1.05 MB, image/png)
2019-06-04 20:12 UTC, thompson
Details
Clip proxied: Not showed correctly in screen (245.25 KB, image/png)
2019-06-05 16:16 UTC, Rafael Linux User
Details
Clip not proxied: Showed correctly in screen (243.92 KB, image/png)
2019-06-05 16:17 UTC, Rafael Linux User
Details
Demo project with short "video" (5 seconds per frame) demonstrating the problem. (282.94 KB, application/zip)
2019-08-25 19:33 UTC, Alexander
Details
Reproducing the problem with the latest git version (13.76 KB, application/x-kdenlive)
2019-08-25 20:27 UTC, Alexander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Linux User 2019-06-03 07:33:04 UTC
SUMMARY
Crop effects not rendering as is project.

STEPS TO REPRODUCE
1. Select a video clip and apply "Crop, scale and tilt" or "Edge crop"
2. Crop by all sides till get the same aspect ratio, taking by yourself references of the cropped area
3. Render the project

OBSERVED RESULT
The cropped area is not exactly the same you cropped in project.

EXPECTED RESULT
The cropped area in rendered result should be the same used in the project composition

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 
KDE Plasma Version: 5.12.8
KDE Frameworks Version:  5.45.0
Qt Version: 5.9.4

ADDITIONAL INFORMATION
kdenlive-19.04.1c-x86_64.appimage
Comment 1 Rafael Linux User 2019-06-03 16:20:00 UTC
Created attachment 120529 [details]
Video rendered vs project window monitor

Compared side by side, at the left, playing the rendered video in SMPlayer. On the right, KDEnlive (kdenlive-19.04.2-e782377-x86_64.appimage) as it was composed in project window.
Comment 2 Rafael Linux User 2019-06-03 16:21:56 UTC
It happens in various cropped videos ("Edge crop" effect)
Comment 3 thompson 2019-06-04 20:12:13 UTC
Created attachment 120579 [details]
demo

I don't know man looks fine to me.

19.04 1c appimage
Comment 4 Rafael Linux User 2019-06-05 16:15:49 UTC
I keep trying different way to replicate the issue, without success. However, when I was just creating a little version of my projecto to send here, I thoght that could be related to the automatic proxy. And that is!!!! The problem happens after KDEnlive had quietly proxied the clip. If I uncheck in "Clip properties" the "Proxy clip" option (or click on "Delete proxy file" button, the clip is cropped and correctly aligned in monitor. If enable again "Proxy clip" for this clip, the problem appears again, showing in screen a different crop than the real that will be done (see attached files). 
On the other hand, I don't understand why the control box to enable/disable the "Proxy clip" in "Clip properties" some times looks like "half filled" and when I enable it manually, it looks like "Full filled".
Comment 5 Rafael Linux User 2019-06-05 16:16:56 UTC
Created attachment 120601 [details]
Clip proxied: Not showed correctly in screen
Comment 6 Rafael Linux User 2019-06-05 16:17:29 UTC
Created attachment 120602 [details]
Clip not proxied: Showed correctly in screen
Comment 7 Rafael Linux User 2019-06-08 20:16:43 UTC
Still present in kdenlive-19.04.2c-x86_64.appimage
Comment 8 Rafael Linux User 2019-07-09 12:53:41 UTC
No one can confirm this issue? I continue seeing the problem in latest AppImages. The only workaround is to disable proxy for cropped videos.
Comment 9 Alexander 2019-08-25 19:17:27 UTC
I have the exact same problem. Steps to reproduce:

1. start kdenlive-19.08.0a-x86_64.appimage on Debian testing
2. add a 720p video clip and drag it into the timeline
3. add an "edge crop" effect, set "top" so some value
4. enable / disable proxy clip for the video

Result: https://imgur.com/a/sypYT7T
Comment 10 Alexander 2019-08-25 19:33:31 UTC
Created attachment 122357 [details]
Demo project with short "video" (5 seconds per frame) demonstrating the problem.

The tool "extract frame" shows the same behaviour, the crop effect changes when proxy clip is enabled / disabled.

I took screenshots from the title clip and compared them to the extracted frames and I found out that while the project (and the original video) has 720p resolution the proxy clip has a lower resolution (721x406) but the crop is applied without taking the scale factor into account, in my example both the proxy and the original clip gets the top 120px removed.
Comment 11 Rafael Linux User 2019-08-25 20:19:11 UTC
Thank you Alexander. I don't understand why developers can't reproduce the problem.
Comment 12 Alexander 2019-08-25 20:27:44 UTC
Created attachment 122358 [details]
Reproducing the problem with the latest git version

I was able to reproduce the problem using the latest git version (3a2cce33f1d74e11b46c7578a53ff697b9e7233a). I made a debug build using qtcreator and ran kdenlive in debug mode.
Comment 13 Alexander 2019-08-25 21:09:16 UTC
(In reply to Rafael Linux User from comment #11)
> Thank you Alexander. I don't understand why developers can't reproduce the
> problem.

The bug doesn't show when the original clip has a low enough resolution.

I did the following test:

1. Copy the proxy clip from ~/.cache/kdenlive/proxy/...........mkv to my video directory and rename it proxy.mkv
2. Create a new session and use this video file.
3. Apply the crop.
4. The bug does not show, the proxy clip for the proxy clip has exactly the same resolution as the "original proxy clip".
Comment 14 Rafael Linux User 2019-08-26 09:32:53 UTC
When I detected the issue, I was using FHD videos. I didn't try with lower video resolutions.
Comment 15 Alexander 2019-08-28 15:09:41 UTC
*** Bug 411040 has been marked as a duplicate of this bug. ***
Comment 16 Alexander 2019-08-28 15:38:08 UTC
I made more tests and found that

a) The problem disappears when I check "use project resolution"
b) The problem does not affect the effect "Crop, scale and tilt"
Comment 17 FormulaRon 2019-08-28 16:02:20 UTC
Just tried that and workaround a) works for me.

Thank you!
Comment 18 emohr 2020-09-12 18:25:51 UTC
Is the issue still there with the current Kdenlive AppImage version 20.08.1?
Comment 19 Rafael Linux User 2020-09-14 00:01:34 UTC
Yes, as anyone can check trying with demo attached by Alexander in comment https://bugs.kde.org/show_bug.cgi?id=408235#c10 , issue is not solved at all.
As he wrote, as soon as project is loaded you can test:
- Disable video proxy
- Move project monitor play pointer and watch image in project monitor ("edge crop" effect is not applied)
- Enable video proxy
- Move project monitor play pointer and watch image in project monitor ("edge crop" effect is applied)

Checked with last version
Comment 20 Bug Janitor Service 2020-09-29 04:33:11 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 21 Alexander 2020-09-29 11:05:58 UTC
The behaviour is still present.

As mentioned before the issue does not appear when checking "use project resolution". I think it would be nice if that was checked by default.
Comment 22 Rafael Linux User 2020-09-29 20:10:24 UTC
I agree with Alexander, that could be a workaround.

Obviously, "Bug Janitor" is not considering my Comment #19, cause I checked (and anyone can do it) that bug is still not fixed.
Comment 23 Natalia Portillo 2021-09-09 00:50:41 UTC
I can confirm the bug still happens in 21.08.1 from ArchLinux with MLT 7.01, followed steps (original video 1080p H264, proxied) and what I see is not what I get, remove proxy and what I see is what I get.
Comment 24 emohr 2021-09-09 15:20:47 UTC
Yes, I can confirm this issue with 21.08.1. Put a 1080p50 clip into the timeline; add "Edge Crop", move bottom slider. 

Enable proxy: on that clip: Crop bottom get doubled. 

Disable proxy: crop get back to the initial value.
Comment 25 Jean-Baptiste Mardelle 2021-09-10 14:38:21 UTC
Can you try checking the "Use project resolution" option in the Edge crop effect ? It should fix inconsistencies between proxy and full resolution clips. Maybe we should check it by default...
Comment 26 emohr 2021-09-11 08:35:10 UTC
Enabling "Use project resolution" solves the problem. Enabling/disabling proxy, the crop keeps the size. 

Enable "Use project resolution" by default would solve the problem.
Comment 27 Jean-Baptiste Mardelle 2021-09-11 14:30:01 UTC
Git commit dcb71b2dd8d54bf82e883640c4c7c846f9cc4cab by Jean-Baptiste Mardelle.
Committed on 11/09/2021 at 14:29.
Pushed by mardelle into branch 'master'.

Crop effect: use project resolution by default(solves proxy issue).

M  +1    -1    data/effects/crop.xml

https://invent.kde.org/multimedia/kdenlive/commit/dcb71b2dd8d54bf82e883640c4c7c846f9cc4cab
Comment 28 Jean-Baptiste Mardelle 2021-09-11 15:37:35 UTC
Git commit 8aff4a1469c50ad1a127a15ead3b74494ae6d9a1 by Jean-Baptiste Mardelle.
Committed on 11/09/2021 at 15:37.
Pushed by mardelle into branch 'release/21.08'.

Crop effect: use project resolution by default(solves proxy issue).

M  +1    -1    data/effects/crop.xml

https://invent.kde.org/multimedia/kdenlive/commit/8aff4a1469c50ad1a127a15ead3b74494ae6d9a1