Ken burns effect
Closed, ResolvedPublic

Description

The Ken Burns effect is a type of panning and zooming effect used in video production from still imagery.

In Clip tab > Transformation, the X, Y properties which specify the placement could be keyframed as a group, and similarly the Width, Height properties which specify the size could be keyframed as a group. Currently the values remain the same through the entire clip. If they are keyframed it will be possible to drag the overlay UI in the viewer to change the placement of the image or its size at the position of the playhead.

For example you set the initial placement of the image, then enable keyframed transformation, seek at the end of the clip, set a new placement; now you can play and see how the image transitions from the first to the second position.

aleb created this task.Feb 18 2016, 12:19 PM
aleb updated the task description. (Show Details)
aleb raised the priority of this task from to Enhancement.
aleb added a project: Pitivi.
aleb added a subscriber: aleb.

I have already started implementing that and it is not complex.

I did not merge it because it was still too buggy and I wanted to get the transfo merged for 1.0, keyframes should be for after.

aleb updated the task description. (Show Details)Nov 22 2016, 3:06 AM
aleb edited projects, added Pitivi tasks for newcomers; removed Pitivi.
aleb moved this task from Small to Large on the Pitivi tasks for newcomers board.
stefanzzz set git URI to https://github.com/stefanzzz22/pitivi/tree/7340-Ken-Burns.May 28 2017, 7:43 PM
stefanzzz changed git URI from https://github.com/stefanzzz22/pitivi/tree/7340-Ken-Burns to https://github.com/stefanzzz22/pitivi.git#wip/phab/T7340-Ken-Burns.
aleb added a comment.Jul 21 2017, 8:49 AM

I tested the branch and I keep seeing this in the console:

Traceback (most recent call last):
  File "/home/aleb/dev/pitivi/pitivi/pitivi/viewer/overlay_stack.py", line 56, in __on_size_allocate
    overlay.update_from_source()
  File "/home/aleb/dev/pitivi/pitivi/pitivi/viewer/move_scale_overlay.py", line 542, in update_from_source
    self.__set_size(self.__get_source_size() / self.project_size)
  File "/home/aleb/dev/pitivi/pitivi/pitivi/viewer/move_scale_overlay.py", line 373, in __get_source_size
    res_x, x = self.__get_source_property("width")
  File "/home/aleb/dev/pitivi/pitivi/pitivi/viewer/move_scale_overlay.py", line 337, in __get_source_property
    value = binding.get_value(source_timestamp)
OverflowError: can't convert negative int to unsigned
In T7340#95018, @aleb wrote:

I tested the branch and I keep seeing this in the console:

Traceback (most recent call last):
  File "/home/aleb/dev/pitivi/pitivi/pitivi/viewer/overlay_stack.py", line 56, in __on_size_allocate
    overlay.update_from_source()
  File "/home/aleb/dev/pitivi/pitivi/pitivi/viewer/move_scale_overlay.py", line 542, in update_from_source
    self.__set_size(self.__get_source_size() / self.project_size)
  File "/home/aleb/dev/pitivi/pitivi/pitivi/viewer/move_scale_overlay.py", line 373, in __get_source_size
    res_x, x = self.__get_source_property("width")
  File "/home/aleb/dev/pitivi/pitivi/pitivi/viewer/move_scale_overlay.py", line 337, in __get_source_property
    value = binding.get_value(source_timestamp)
OverflowError: can't convert negative int to unsigned

Should be fixed with the last diff.

aleb added a comment.Jul 24 2017, 10:43 PM

One problem which should be fixed before merging is that when the brush button is clicked, the viewer does not update.

aleb added a comment.Jul 24 2017, 11:25 PM

While at it, you could easily fix TimelineContainer._keyframe_cb to wrap the actions in an undo transaction.

aleb added a comment.Jul 24 2017, 11:43 PM

Currently the transformation widgets can happen to show outdated values:

  • Create a new project
  • Add tears_of_steel.webm to the timeline at the beginning
  • Click it, enable transformation keyframes
  • Add a keyframe in the middle, click the <left> button to select the 1st (out of 3) keyframe, set X to -480
  • Click Play, notice the value in the X widget does not go to 0, but stays at -160 or other values. If you click go-to-start and then click Play and leave it playing only for short periods of time, you notice the X value in the widget updating fine until it gets to ~-160, then it stays like that until the end. Seeking with the mouse to the right of the middle keyframe does update the widget which now correctly shows 0.
In T7340#95191, @aleb wrote:

While at it, you could easily fix TimelineContainer._keyframe_cb to wrap the actions in an undo transaction.

I'll open a new task for that one.

aleb added a comment.Jul 25 2017, 1:20 PM

I'll open a new task for that one.

Ok, thanks!

I noticed that the transformation widget on top of the video viewer lags when playing and at the end of the timeline it remains behind. We could hide it when playing the project, to fix this. See also T7472 targeted for 1.0.

All the problems you noticed should be solved now.

aleb moved this task from Backlog to 2.0 on the Pitivi board.
aleb edited projects, added Pitivi (2.0); removed Pitivi.
aleb moved this task from Backlog to Needs review on the Pitivi (2.0) board.Aug 8 2017, 12:22 PM
aleb added a comment.Aug 14 2017, 12:46 AM

This introduces a bug, could you please add a unittest for it and see which commit introduces it (not sure if you tried git bisect before, ping me if you want some assistance):
Steps to reproduce:

  • Create a new project, add tears, create one clip
  • Select the clip, seek in the middle, press S to split
  • Undo, notice traceback:
<GES.UriClipAsset object at 0x7f51b80e21b0 (GESUriClipAsset at 0x3e805b0)> <GstPbutils.EncodingContainerProfile object at 0x7f51bf4f03a8 (GstEncodingContainerProfile at 0x2e0c000)>
Traceback (most recent call last):
  File "/home/aleb/dev/pitivi/pitivi/pitivi/application.py", line 351, in _undoCb
    self.action_log.undo()
  File "/home/aleb/dev/pitivi/pitivi/pitivi/undo/undo.py", line 309, in undo
    self._run(stack.undo)
  File "/home/aleb/dev/pitivi/pitivi/pitivi/undo/undo.py", line 342, in _run
    operation()
  File "/home/aleb/dev/pitivi/pitivi/pitivi/undo/undo.py", line 154, in undo
    self._run_action(self.done_actions[::-1], "undo")
  File "/home/aleb/dev/pitivi/pitivi/pitivi/undo/undo.py", line 147, in _run_action
    method()
  File "/home/aleb/dev/pitivi/pitivi/pitivi/undo/timeline.py", line 602, in undo
    assert self.track_element.remove_control_binding(self.property_name)
AssertionError
aleb added a comment.Aug 14 2017, 7:20 PM

There is a bug when dragging keyframes I can't reproduce on master. Steps to reproduce:

  • Crete a new project, add tears, create one clip
  • Select the clip, drag the left audio keyframe down until the mouse cursor leaves the clip, release, notice traceback:
Traceback (most recent call last):
  File "/app/lib/python3.5/site-packages/matplotlib/backends/backend_gtk3.py", line 242, in button_release_event
    FigureCanvasBase.button_release_event(self, x, y, event.button, guiEvent=event)
  File "/app/lib/python3.5/site-packages/matplotlib/backend_bases.py", line 1932, in button_release_event
    self.callbacks.process(s, event)
  File "/app/lib/python3.5/site-packages/matplotlib/cbook.py", line 549, in process
    proxy(*args, **kwargs)
  File "/app/lib/python3.5/site-packages/matplotlib/cbook.py", line 416, in __call__
    return mtd(*args, **kwargs)
  File "/home/aleb/dev/pitivi/pitivi/pitivi/timeline/elements.py", line 383, in _mpl_button_release_event_cb
    ydata = max(self.__ylim_min, min(event.ydata, self.__ylim_max))
TypeError: unorderable types: float() < NoneType()
aleb moved this task from Needs review to Done on the Pitivi (2.0) board.Aug 28 2017, 10:08 PM

GitLab Migration Automatic Message

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pitivi/issues/1750.