Looping Video Without Lag?

I have a video that is exactly 3 seconds long, I need to extend it to become 8 times longer, so I added 8 clips of the same video hoping for a perfect loop but each time the video would loop, there is a lag ruining the whole thing.

This is the result: https://shotstack-api-stage-output.s3-ap-southeast-2.amazonaws.com/xkphkx43ac/13c54878-ca58-4b3f-9e64-ad863d5766c7.mp4

Is there a way to achieve the perfect loop with shotstack?

This is my code:

{
    "timeline": {
        "background": "#000000",
        "tracks": [
            {
                "clips": [
                    {
                        "asset": {
                            "type": "video",
                            "src": "https://s3.amazonaws.com/appforest_uf/f1679280737369x968962145952092000/infinit_zoom.mp4",
                            "volume": 0,
                            "trim": 0
                        },
                        "start": 0,
                        "fit": "cover",
                        "scale": 0,
                        "length": 3
                    },
                    {
                        "asset": {
                            "type": "video",
                            "src": "https://s3.amazonaws.com/appforest_uf/f1679280737369x968962145952092000/infinit_zoom.mp4",
                            "volume": 0,
                            "trim": 0
                        },
                        "start": 3,
                        "fit": "cover",
                        "scale": 0,
                        "length": 3
                    },
                    {
                        "asset": {
                            "type": "video",
                            "src": "https://s3.amazonaws.com/appforest_uf/f1679280737369x968962145952092000/infinit_zoom.mp4",
                            "volume": 0,
                            "trim": 0
                        },
                        "start": 6,
                        "fit": "cover",
                        "scale": 0,
                        "length": 3
                    },
                    {
                        "asset": {
                            "type": "video",
                            "src": "https://s3.amazonaws.com/appforest_uf/f1679280737369x968962145952092000/infinit_zoom.mp4",
                            "volume": 0,
                            "trim": 0
                        },
                        "start": 9,
                        "fit": "cover",
                        "scale": 0,
                        "length": 3
                    },
                    {
                        "asset": {
                            "type": "video",
                            "src": "https://s3.amazonaws.com/appforest_uf/f1679280737369x968962145952092000/infinit_zoom.mp4",
                            "volume": 0,
                            "trim": 0
                        },
                        "start": 12,
                        "fit": "cover",
                        "scale": 0,
                        "length": 3
                    },
                    {
                        "asset": {
                            "type": "video",
                            "src": "https://s3.amazonaws.com/appforest_uf/f1679280737369x968962145952092000/infinit_zoom.mp4",
                            "volume": 0,
                            "trim": 0
                        },
                        "start": 15,
                        "fit": "cover",
                        "scale": 0,
                        "length": 3
                    },
                    {
                        "asset": {
                            "type": "video",
                            "src": "https://s3.amazonaws.com/appforest_uf/f1679280737369x968962145952092000/infinit_zoom.mp4",
                            "volume": 0,
                            "trim": 0
                        },
                        "start": 18,
                        "fit": "cover",
                        "scale": 0,
                        "length": 3
                    },
                    {
                        "asset": {
                            "type": "video",
                            "src": "https://s3.amazonaws.com/appforest_uf/f1679280737369x968962145952092000/infinit_zoom.mp4",
                            "volume": 0,
                            "trim": 0
                        },
                        "start": 21,
                        "fit": "cover",
                        "scale": 0,
                        "length": 3
                    }
                ]
            }
        ]
    },
    "output": {
        "format": "mp4",
        "aspectRatio": "9:16",
        "resolution": "hd"
    },
    "callback": "https://myurl.cc/dd"
}

@dazzatron ??? Any ideas about making this work?

It looks like this file has expired or been removed:
https://s3.amazonaws.com/appforest_uf/f1679280737369x968962145952092000/infinit_zoom.mp4. Please can you share it at a permanent location so we can run some tests on it. I was able to test it earlier and noticed the frame rate was 20fps, which is not a standard frame rate which we support. That might be the issue, but if you can provide the source file I will take another look.

How is this source video created? Is it possible to repeat the last frame for about 1 second or are you not able to edit it?

Not able to edit unfortunately :frowning:

Any progress on this? @lucas.spielberg

Your video is just over 3 seconds long. 3.05 to be exact. If you start the video a frame earlier you can achieve this effect quite nicely across two tracks.

{
    "timeline": {
        "background": "#000000",
        "tracks": [
            {
                "clips": [
                    {
                        "asset": {
                            "type": "video",
                            "src": "https://shotstack-ingest-api-v1-sources.s3.ap-southeast-2.amazonaws.com/wzr6y0wtti/zzy9xtkp-3h0r-ee1w-ukki-17byia1kgu4x/source.mp4",
                            "volume": 1
                        },
                        "start": 0,
                        "length": 3.05,
                        "offset": {
                            "x": 0,
                            "y": 0
                        },
                        "position": "center"
                    },
                    {
                        "asset": {
                            "type": "video",
                            "src": "https://shotstack-ingest-api-v1-sources.s3.ap-southeast-2.amazonaws.com/wzr6y0wtti/zzy9xtkp-3h0r-ee1w-ukki-17byia1kgu4x/source.mp4",
                            "volume": 1
                        },
                        "start": 6,
                        "length": 3.05,
                        "offset": {
                            "x": 0,
                            "y": 0
                        },
                        "position": "center"
                    }
                ]
            },
            {
                "clips": [
                    {
                        "asset": {
                            "type": "video",
                            "src": "https://shotstack-ingest-api-v1-sources.s3.ap-southeast-2.amazonaws.com/wzr6y0wtti/zzy9xtkp-3h0r-ee1w-ukki-17byia1kgu4x/source.mp4",
                            "volume": 1
                        },
                        "start": 3,
                        "length": 3.05
                    }
                ]
            }
        ]
    },
    "output": {
        "size": {
            "width": 1024,
            "height": 576
        },
        "format": "mp4"
    }
}
1 Like