Inconsistent Behavior from Start Offset

willj
willj Member Posts: 1
edited July 31 in Developer APIs

Hello - I'm experiencing inconsistent behavior with Start Offset and would appreciate any guidance!

My understanding is that applying a start offset to an overlay directly (eg /l_video:overlay/so_3/fl_layer_apply) cuts off the first 3 seconds of the overlay, while applying the start offset to the layer placement (eg /l_video:overlay/fl_layer_apply,so_3) would play the full uncut overlay, beginning 3 seconds after the base layer video begins.

In my specific instance, my goal is to add “transition1alphastan” as an overlay on the last 1 second of the base video “teeshotsample1” (a 9-second video). I'm doing this by adding so_8 to the fl_layer_apply.

However, I'm noticing that the highlighted URL snippet in the attached image is applying the start offset to BOTH the overlay and the base video rather than just to the overlay: the first 8 seconds of the base video are being cut, and the overlay is being placed 8 seconds after the base layer begins. Perplexingly, essentially identical snippets elsewhere in the link (e.g. first two lines) correctly apply the offset only to place the overlay.

In other words, when executed, the base video is experiencing a start offset beginning 8 seconds into the video as if I had applied a /so_8/ to the base layer rather than to the overlay's placement with the fl_layer_apply.

If anyone has an idea what I may be doing wrong, I'd really appreciate the help! Thank you!!

Tagged:

Answers

  • Wissam
    Wissam Member, Cloudinary Staff Posts: 103

    Hi there,

    When applying a start offset to an overlay, you’re correct that it should affect only the overlay itself. 
    Here is an example where the overlay video "dog" will start 8 seconds after the base video "sea-turtle" begins.
    https://res.cloudinary.com/demo/video/upload/l_video:dog/fl_layer_apply,so_8/samples/sea-turtle.mp4

    Remember that the order of transformations matters. If you apply the start offset to the base video before the overlay, it will affect both. By placing the start offset within the fl_layer_applytransformation, you’ll achieve the desired result.

    I see that you have raised the same ticket in our Support portal.
    If there are some special examples in your account, I will address them in your ticket.

    Best Regards,

    Wissam