Search code examples
amazon-web-servicesaws-media-convert

MediaConvert negative InputClips


TLDR; Instead of extracting clips from the source video, is it possible for segments to be removed from the source video.

Eg: Imagine I have a source video file that is 59 seconds long. I want to clip (extract into a new file) a range in the middle of the video, eg: 00:00:20;00 to 00:00:30;00. I can currently accomplish this by creating an InputClip for this range.

However, now imagine I want to remove 2 ranges from the input file: 00:00:00;00 to 00:00:10;00 and 00:00:30;00 to 00:00:59;00. The resulting video would theoretically be identical except my input to the operation is different. I.e: timecode ranges to remove, instead of ranges to keep.

FFMPEG supports this with the -vf select='not(between(t,0,10)+between(t,30,59))' operation. Can I do something like this on MediaConvert?


Solution

  • Unfortunately, at this time input clipping with MediaConvert is only range inclusive.

    The only way to do this into the service today would be to clip around the sections that are not wanted.

    Using your example, this is what the clipping region would be like below. You would get seconds 10 to 30

     "InputClippings": [
              {
                "StartTimecode": "00:00:10;00",
                "EndTimecode": "00:00:30;00"
              }
            ]