Bug 357806 - git master: keyframe table control for keyframeable effect is broken: changes affect wrong row, timeline slider doesn't have correct begin and end points (probably due to wrong row)
Summary: git master: keyframe table control for keyframeable effect is broken: changes...
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Rendering & Export (other bugs)
Version First Reported In: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-10 18:06 UTC by Anton Gubarkov
Modified: 2016-08-08 16:05 UTC (History)
1 user (show)

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


Attachments
corners effect applied (1.89 MB, image/png)
2016-01-10 18:07 UTC, Anton Gubarkov
Details
no corners effect applied (1.65 MB, image/png)
2016-01-10 18:08 UTC, Anton Gubarkov
Details
corners frame is 16:9 (2.00 MB, image/png)
2016-01-11 10:13 UTC, Anton Gubarkov
Details
screenshot of the corners UI (2.00 MB, image/png)
2016-01-18 13:12 UTC, Anton Gubarkov
Details
corner effect with ratio bars (63.91 KB, image/png)
2016-01-18 20:46 UTC, Jean-Baptiste Mardelle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Gubarkov 2016-01-10 18:06:45 UTC
I'm trying to fit a video I was projecting on the screen via an overhead projector in a live show into  another footage I shot during the show.
The overhead video is 4:3, while the camera (and the project) is 16:9.

When Corners effect is not applied to an overhead video clip, it is composited over the camera footage correctly (i.e. opaque 4:3 video fit to the height of the project).  See the attachment no-corners.png.  

When I apply Corners to the overhead video, the clip immediately becomes 16:9 by adding black opaque bars to the right and to the left. When I transform, the clip retains the black opaque bars. See attachment corners.png.



Reproducible: Always


Actual Results:  
The clip transformed by Corners is converted to the project aspect ratio by adding black opaque bars

Expected Results:  
The clip transformed by Corners should retain its own dimentions.
Comment 1 Anton Gubarkov 2016-01-10 18:07:35 UTC
Created attachment 96569 [details]
corners effect applied
Comment 2 Anton Gubarkov 2016-01-10 18:08:27 UTC
Created attachment 96570 [details]
no corners effect applied
Comment 3 Jean-Baptiste Mardelle 2016-01-10 19:58:11 UTC
I can make it work by adjusting the corners effects parameters.
Try setting the "Alpha Operation" to "Minimum", and leave the "Transparent Backgroud" option checked.
Comment 4 Anton Gubarkov 2016-01-11 10:13:20 UTC
Created attachment 96582 [details]
corners frame is 16:9

Your trick works for me too. Thanks.
However the red control frame is still 16:9 (i.e. project aspect) which makes it difficult to adjust to fit the screen exactly. 
See one more attachment alpha-minimum.png
Comment 5 Anton Gubarkov 2016-01-18 13:12:35 UTC
Created attachment 96709 [details]
screenshot of the corners UI
Comment 6 Jean-Baptiste Mardelle 2016-01-18 20:46:53 UTC
Created attachment 96719 [details]
corner effect with ratio bars

I am preparing a patch adding lines to better indicate the real frame size (see attached screenshot). However, the control points for the effect are still at the full frame border, but in my opinion it solves the problem. Would that be ok for you?
Comment 7 Jean-Baptiste Mardelle 2016-01-19 00:32:48 UTC
Git commit 4405fa492ec6914c517103f3e314bc9e0f89b807 by Jean-Baptiste Mardelle.
Committed on 19/01/2016 at 00:28.
Pushed by mardelle into branch 'master'.

Various fixes for on monitor qml (pan/zoom + corners widget) when working with profile where sar!=1
improvements to corner effect: live preview, add lines to indicate source aspect ratio

M  +4    -3    data/kdenliveclipmonitor.qml
M  +4    -3    data/kdenlivemonitor.qml
M  +22   -23   data/kdenlivemonitorcornerscene.qml
M  +26   -24   data/kdenlivemonitoreffectscene.qml
M  +0    -1    data/kdenlivemonitorsplit.qml
M  +1    -1    src/effectstack/collapsibleeffect.cpp
M  +2    -1    src/effectstack/effectstackview2.cpp
M  +0    -1    src/effectstack/keyframeedit.cpp
M  +1    -0    src/effectstack/parametercontainer.cpp
M  +1    -0    src/effectstack/parametercontainer.h
M  +13   -0    src/effectstack/widgets/cornerswidget.cpp
M  +1    -0    src/effectstack/widgets/cornerswidget.h
M  +15   -5    src/monitor/glwidget.cpp
M  +0    -1    src/monitor/glwidget.h
M  +11   -1    src/monitor/monitor.cpp
M  +4    -0    src/monitor/monitor.h
M  +11   -6    src/monitor/qmlmanager.cpp
M  +1    -1    src/monitor/qmlmanager.h

http://commits.kde.org/kdenlive/4405fa492ec6914c517103f3e314bc9e0f89b807
Comment 8 Anton Gubarkov 2016-01-22 20:57:55 UTC
Well, on my Haswell i7-4900MQ the preview is not really live :-(
When I move the corners, the video image transformation follows approx 1 frame per second (even on nearest neighbour). And I can't see the lines indicating the source aspect ratio. I think, if you could make   the image being transformed a semi-stransparent, it would be much more convenient. As an alternative, make a wireframe (w/o live update of the image) and allow it to be really live.
Comment 9 Jean-Baptiste Mardelle 2016-01-22 21:39:18 UTC
Well, "live preview" was maybe a bit optimistic, but I still get 2-3 frames/second when moving.
I guess I can make the behavior configurable to either trigger an image refresh on moving corners, or only when mouse button is released.
Strange that you don't see the aspect ratio lines. Can you try the following command in a terminal:

melt clip.avi -consumer xml

(replace clip.avi whith the path to the 4:3 clip you are using for the corner effect), and paste the output here...
Comment 10 Anton Gubarkov 2016-01-23 08:01:03 UTC
anton@r9-008cln /mnt/windows7/Users/anton/Documents/2016 Рождество $ melt -consumer xml 5D.avi 
<?xml version="1.0"?>
<mlt LC_NUMERIC="ru_RU.utf8" version="0.9.9" title="5D.avi">
  <profile description="automatic" width="720" height="576" progressive="0" sample_aspect_num="16" sample_aspect_den="15" display_aspect_num="768" display_aspect_den="576" frame_rate_num="25" frame_rate_den="1" colorspace="601"/>
  <producer id="producer0" in="0" out="3393">
    <property name="mlt_type">producer</property>
    <property name="length">3394</property>
    <property name="eof">pause</property>
    <property name="resource">5D.avi</property>
    <property name="meta.media.nb_streams">2</property>
    <property name="meta.media.0.stream.type">video</property>
    <property name="meta.media.0.stream.frame_rate">25</property>
    <property name="meta.media.0.stream.sample_aspect_ratio">0</property>
    <property name="meta.media.0.codec.width">720</property>
    <property name="meta.media.0.codec.height">576</property>
    <property name="meta.media.0.codec.rotate">0</property>
    <property name="meta.media.0.codec.frame_rate">25</property>
    <property name="meta.media.0.codec.pix_fmt">yuv420p</property>
    <property name="meta.media.0.codec.sample_aspect_ratio">1,06667</property>
    <property name="meta.media.0.codec.colorspace">601</property>
    <property name="meta.media.0.codec.name">dvvideo</property>
    <property name="meta.media.0.codec.long_name">DV (Digital Video)</property>
    <property name="meta.media.0.codec.bit_rate">28808488</property>
    <property name="meta.media.1.stream.type">audio</property>
    <property name="meta.media.1.codec.sample_fmt">s16</property>
    <property name="meta.media.1.codec.sample_rate">48000</property>
    <property name="meta.media.1.codec.channels">2</property>
    <property name="meta.media.1.codec.name">pcm_s16le</property>
    <property name="meta.media.1.codec.long_name">PCM signed 16-bit little-endian</property>
    <property name="meta.media.1.codec.bit_rate">1536000</property>
    <property name="seekable">1</property>
    <property name="meta.media.sample_aspect_num">16</property>
    <property name="meta.media.sample_aspect_den">15</property>
    <property name="aspect_ratio">1,06667</property>
    <property name="audio_index">1</property>
    <property name="video_index">0</property>
    <property name="mute_on_pause">1</property>
    <property name="mlt_service">avformat</property>
  </producer>
  <playlist id="playlist0">
    <entry producer="producer0" in="0" out="3393"/>
  </playlist>
  <tractor id="tractor0" title="5D.avi" global_feed="1" in="0" out="3393">
    <track producer="playlist0"/>
  </tractor>
</mlt>
Comment 11 Jean-Baptiste Mardelle 2016-01-23 14:29:05 UTC
Git commit eded2c09fc9980ce3dcf12c760d177ebdc72bf3a by Jean-Baptiste Mardelle.
Committed on 23/01/2016 at 14:28.
Pushed by mardelle into branch 'master'.

Fix several bugs in corner effect (adding keyframes, ratio bars not shown, ...)

M  +97   -57   data/kdenlivemonitorcornerscene.qml
M  +5    -0    src/effectstack/collapsibleeffect.cpp
M  +2    -0    src/effectstack/collapsibleeffect.h
M  +31   -12   src/effectstack/effectstackview2.cpp
M  +2    -0    src/effectstack/effectstackview2.h
M  +61   -30   src/effectstack/keyframeedit.cpp
M  +3    -1    src/effectstack/keyframeedit.h
M  +7    -3    src/effectstack/parametercontainer.cpp
M  +3    -0    src/effectstack/parametercontainer.h
M  +32   -29   src/effectstack/widgets/cornerswidget.cpp
M  +4    -2    src/effectstack/widgets/cornerswidget.h
M  +1    -1    src/monitor/qmlmanager.cpp

http://commits.kde.org/kdenlive/eded2c09fc9980ce3dcf12c760d177ebdc72bf3a
Comment 12 Anton Gubarkov 2016-01-25 10:19:40 UTC
This works great now. I have the original aspect frame visible and can adjust my corners with precision. Thanks.

As a side note, I can disable video in the track to remove the sluggish "real-time preview" and leave only the frame. Once I get my corners right, I can enable the video back before rendering.
Comment 13 Anton Gubarkov 2016-01-25 11:01:30 UTC
The keyframe logic has bugs for corners:
selecting a keyframe doesn't move the playhead into the position, regardless of the switch button.
keyframe is added to the middle of the keyframe interval rather than to the current playhead position. 
Manipulating the effect parameters affects another keyframe (not the one that is selected).
Comment 14 Wegwerf 2016-08-05 18:29:36 UTC
The broken keyframe table logic also affects other effects, such as the blurr effect. This has bitten me now in several projects and makes some parts a real pain to create or edit. I would really like to see the general keyframe table regression to be gone!
Comment 15 Wegwerf 2016-08-05 18:31:35 UTC
I'm updating the report title to properly reflect the bug.
Comment 16 Jean-Baptiste Mardelle 2016-08-06 21:26:44 UTC
Git commit 063f412c525515d12dbeeab9f441aa74c419ebe6 by Jean-Baptiste Mardelle.
Committed on 06/08/2016 at 20:39.
Pushed by mardelle into branch 'Applications/16.08'.

Fix clicking in row header not updating correct row

M  +4    -3    src/effectstack/keyframeedit.cpp
M  +1    -1    src/effectstack/keyframeedit.h

http://commits.kde.org/kdenlive/063f412c525515d12dbeeab9f441aa74c419ebe6
Comment 17 Wegwerf 2016-08-08 16:05:14 UTC
Jean-Baptiste, thank you very much for fixing this! Works like a charm, I've toyed around with the blur effect and the slider and row selection now works as expected.