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.

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

urlrequired
Video URL.
Note: you can specify same video URL in different video-objects in order to stitch clips from the same video.
start_timeoptional
Specifies the time (in seconds) from where to begin transcoding your input file. Used for video clips.
durationoptional
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://your-server.com/video1.mp4", 
 "https://your-server.com/video2.mkv",
 {
    "url":"https://your-server.com/video3.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
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.