Bug 416811 - Copying fade out effect will add 1 frame
Summary: Copying fade out effect will add 1 frame
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Video Effects & Transitions (show other bugs)
Version: 19.12.1
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Vincent PINON
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-27 00:16 UTC by CzAndrew
Modified: 2020-02-26 16:04 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description CzAndrew 2020-01-27 00:16:07 UTC
SUMMARY
If you copy the fade out effect from one clip to another in the timeline, the copyed effect will be longer by 1 frame.

STEPS TO REPRODUCE
1. Add at least 2 clips to the project bin, then timeline.
2. Add fade out effect on one of the clips (modify the duration if you wish).
3. Right click on the clip -> copy, then right click -> paste effects on the other clip.

OBSERVED RESULT
The pasted effect will be one frame longer. For example if I copied a 5 frame long fade out effect, the pasted effect will be 6 frames. 
Strangely, if I copy the pasted effect, then it will be the correct size after I paste it.

EXPECTED RESULT
The copied effects should have the same duration.

SOFTWARE/OS VERSIONS
Windows: Win10
Kdenlive: 19.12.1

ADDITIONAL INFORMATION
Comment 1 emohr 2020-02-23 17:25:37 UTC
How do you just paste the effect on another clip?

I tested on the Kdenlive master: Paste the whole clip keeps the fade length.
Comment 2 CzAndrew 2020-02-23 18:31:02 UTC
"right click -> paste effects"
Paste only the effect not the clip. 
If you paste only the effect, the effect length will increase by one frame.
Comment 3 emohr 2020-02-23 19:01:43 UTC
I tested with version 19.12.2. The pasted fade effect has the same length. Please test with 19.12.2
Comment 4 CzAndrew 2020-02-24 13:00:30 UTC
Hello!
I have just tested on two computers. Both are Win10 (current), region settings were US on one of them, and HU on the other. I tested the effect with a videoclip, and a title clip also: the copying of the effect is not working in all of the cases.
The kdenlive is a fresh 19.12.2 installation.
I made a video of the problem, here it is:
https://drive.google.com/open?id=1Sbr1U5qzMOzAgUm74fy55AwncbLGRDXO
Comment 5 emohr 2020-02-24 17:44:12 UTC
I see in the video that your project must be 1080p 59.94fps. So I create a new project in 19.12.2 with 1080p 59.94fps and do as shown in your video. 

I don't get this additional frame after past effect. 

Then I set my local decimal from point to coma and tried again. Still, I get no additional frame after pasting the effect. 

Please goto help -> reset configuration. 
Or delete the kdenliverc file -> see here https://userbase.kde.org/Kdenlive/Manual/Windows_Issues#Cannot_open_projects_made_with_previous_version.2C_timeline_snaps_back.2C_cannot_import_clip. 

Try again. It seems to be a tricky bug.
Comment 6 CzAndrew 2020-02-24 18:54:47 UTC
Tried this after reseting kdenlive configuration, but the bug is still exists (for me). (renaming kdenliverc, deleting the kdenlive folder)
Also, tried with different fps value, and the bug is still there.

I'm using the standalone kdenlive (no-install)... do you use this one also?
Comment 7 emohr 2020-02-24 19:47:38 UTC
Confirmed. I can reproduce. 

After copy the effect to another clip the 1 frame longer fade-out happens only when you add the fade-in and fade-out from the effect panel. 

It doesn't, happen after copy to another clip, when you create the fade-in fade-in fade-out by drag in the upper left (blue) and right (red) point at the top of the clip.
Comment 8 Jean-Baptiste Mardelle 2020-02-25 08:11:01 UTC
Git commit 963e191868841acf30e567c155020cfa76d05a6f by Jean-Baptiste Mardelle.
Committed on 25/02/2020 at 08:10.
Pushed by mardelle into branch 'master'.

Fix 1 frame offset in fade out

M  +1    -1    src/assets/model/assetparametermodel.cpp
M  +3    -3    src/assets/view/widgets/positioneditwidget.cpp
M  +1    -1    src/bin/bin.cpp
M  +3    -3    src/bin/projectclip.cpp
M  +4    -4    src/bin/projectitemmodel.cpp
M  +1    -1    src/bin/projectsubclip.cpp
M  +2    -3    src/effects/effectstack/model/effectstackmodel.cpp
M  +1    -1    src/jobs/cachejob.cpp
M  +1    -1    src/jobs/cachejob.hpp
M  +1    -1    src/jobs/thumbjob.cpp
M  +1    -1    src/jobs/thumbjob.hpp
M  +1    -4    src/timeline2/view/qml/Clip.qml

https://invent.kde.org/kde/kdenlive/commit/963e191868841acf30e567c155020cfa76d05a6f
Comment 9 emohr 2020-02-25 17:07:04 UTC
Thank you for reporting. Fixed in master. Try tommorow with the Windows_Nightly_Build
https://binary-factory.kde.org/job/Kdenlive_Nightly_mingw64/lastSuccessfulBuild/artifact/

Maybe we can backport to 19.12.3.

We close this bug. If it still appears in the latest version, please feel free to re-open it and update the affected version number.
Comment 10 Jean-Baptiste Mardelle 2020-02-26 09:14:16 UTC
Git commit 9fa9218c6a437527a50caa0415fd2a94035adf3d by Jean-Baptiste Mardelle.
Committed on 26/02/2020 at 09:13.
Pushed by mardelle into branch 'release/19.12'.

Fix 1 frame offset in fade out

M  +1    -1    src/assets/model/assetparametermodel.cpp
M  +3    -3    src/assets/view/widgets/positioneditwidget.cpp
M  +1    -1    src/bin/bin.cpp
M  +3    -3    src/bin/projectclip.cpp
M  +4    -4    src/bin/projectitemmodel.cpp
M  +1    -1    src/bin/projectsubclip.cpp
M  +8    -4    src/doc/kthumb.cpp
M  +1    -1    src/doc/kthumb.h
M  +2    -3    src/effects/effectstack/model/effectstackmodel.cpp
M  +7    -6    src/jobs/cachejob.cpp
M  +3    -2    src/jobs/cachejob.hpp
M  +7    -6    src/jobs/thumbjob.cpp
M  +3    -2    src/jobs/thumbjob.hpp
M  +1    -4    src/timeline2/view/qml/Clip.qml
M  +5    -15   src/timeline2/view/qmltypes/thumbnailprovider.cpp

https://invent.kde.org/kde/kdenlive/commit/9fa9218c6a437527a50caa0415fd2a94035adf3d