Stitch Videos together

Stitching is a process of combining two or more video clips together to create single output video. You can use this to create a video filled with scenes from different videos, or even a compilation of clips from the same video.

Warning
Warning:
This feature is currently only available for Encoder Version 1

To stitch videos together, use the stitch attribute of query object to create JSON list of strings containing the video URLs (or video-objects) defined using the following structure:

Video Object Description

ATTRIBUTES

url

required
Video URL.
Note: you can specify same video URL in different video-objects in order to stitch clips from the same video.

start_time

optional
Specifies the time (in seconds) from where to begin transcoding your input file. Used for video clips.

duration

optional
Specifies how much of the video to transcode (in seconds) after start_time. Used for video clips.

See the example of a stitch value below (the syntax is the same both for Preset and Custom jobs):

[
 "https://nyc3.s3.qencode.com/qencode/bbb_30s.mp4", 
 "https://nyc3.s3.qencode.com/qencode/bbb_60s.mp4",
 {
    "url":"https://nyc3.s3.qencode.com/qencode/bbb_90s.mp4", 
    "start_time":"100.0", 
    "duration":"60.0"
 }
]

If you are developing using the Qencode SDKs,you can add videos to your stitch job as instances of the StitchVideoItem class.

Warning
Warning:
It is recommended to explicitly specify bitrate (or CRF), framerate and keyframe interval params for each of the stitch jobs.

Input videos can have different settings making it hard to predict the result you want for your output videos.

If your input videos have different framerates, and framerate is not explicitly specified for your output, the output framerate will be taken from the first video in the list.