Timeline and video ?

0 favourites
  • 12 posts
From the Asset Store
Add SubRip (SRT) subtitles to your videos in Construct 3
  • In my project, I have a video and a sprite.

    I need to make the sprite follow an item on the video when it is playing.

    In After Effects, I would use a tracking tool to record the item coordinates as the video plays.

    Obviously there is no tracking tool in Construct so I thought about pasting the video as an animation track of the Timeline, move the playhead to play the video image after image and record keyframes for my sprite.

    But I don't see how to play the video frame by frame with the animation timeline.

    How can I do that ?

  • That feature does not exist.

    Do you mean something like the audio tracks, but for video instead?

  • This is what I have so far in my timeline

  • I see, at the moment you can only use a timeline to control the position, size and opacity of a video instance. There is still no way to preview the contents of the video in the editor, using timelines or otherwise.

    We will consider this feature for the future.

  • Oh,

    I get it.

    thank you, yes, that will be a very useful addition to create augmented videos !

  • Maybe you can help me with this :

    I try to make a little tool to manually record movement of an item on video. Here how it works :

    - video is playing

    - When user touches the video, current time code, touch.X and Touch.Y are recorded in an array.

    - Press Spacebar restarts video and clears array

    - press P at the end of the video restarts the video and allow to check if movement has been correctly recorded. Item position is represented by a red dot.

    So far, recording works (debugger shows that array is growing when video is touched).

    But replay doesn't work. to recover values, I'm checking the array index where recorded value matches current video playback.time.

    Any idea what is wrong here ?

    thanks !

    File is here

    dropbox.com/s/z72iqcugb52zsa1/RecordVideoSprite.c3p

  • dropbox.com/s/nltil8lv1qck1ka/RecordVideoSprite.c3p

    I changed a couple of small things, and I think it is working how you want it to.

    The first was rounding the value of PlaybackTime to two decimal places, using roundToDp. This is to make sure to save values that will be able to be found out later on. PlaybackTime is not really guaranteed to always hit the same values each time you play the video.

    The second thing was to add a check before setting the position of the dot, so that it only changes, if something was found for the recorded playback time.

    construct.net/en/make-games/manuals/construct-3/plugin-reference/array

    IndexOf always return -1 if nothing was found.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi Diego,

    Wow ! Thank you !

    I also came to the conclusion playbacktime had to be rounded and also choosed to make the sprite invisible if no value was found at a given playback time :)

    You're approach is more elegant than mine :)

    I'm now looking a way to download the array as a csv :)

  • Done

  • Hi DiegoM

    I'm still on the project and try to make sprite position more accurate.

    I tried many ways to forward the video by adding 0.02 second to the playbacktime. It works when the video runs but I also would like to pause the video and forward it from still image to still image. Are there limitations that prevent this ? Do you have a solution ?

  • I am not very familiar with the inner workings of the video plugin, so I can't say for sure. It seems that setting the playback time to seek to that position and then pausing the video in the same action so the video stays there... doesn't do what I would expect.

    It might be a limitation or maybe it's just a bug that can be fixed, I'll ask Ashley about it.

  • Thanks DiegoM, that would be great to add this and also have complete video control from timeline, including preview

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)