MediaConvert Job throws exception on video clipping(trimming) start time more than 24 hrs

0

Hi, I have 48 hours long video as input .mp4. I was trying to trim(clip) 2 hours video from input using AWS mediaconvert.

"InputClippings": [ { "EndTimecode": "35:00:00:00", "StartTimecode": "33:00:00:00" } ],

I am getting the below exception while creating the MediaConvert job.

endTimecode: Should match the pattern: /^([01][0-9]|2[0-4]):[0-5][0-9]:[0-5][0-9][:;][0-9]{2}$/"

Note: I am using AWS SDK- php

Sid
asked a year ago405 views
2 Answers
0

The error message you're seeing indicates that the endTimecode and startTimecode values you provided do not match the expected pattern for timecodes in AWS MediaConvert.

The regular expression provided in the error message (/^([01][0-9]|2[0-4]):[0-5][0-9]:[0-5][0-9][:;][0-9]{2}$/) suggests that AWS MediaConvert expects timecodes in the format HH:MM:SS:FF, where:

  • HH is hours (00 to 24)
  • MM is minutes (00 to 59)
  • SS is seconds (00 to 59)
  • FF is frames (00 to whatever the frame rate is, typically 24, 25, or 30)

From the error message, it seems that AWS MediaConvert does not support timecodes where the hour value is greater than 24. This is a limitation of the service.

Solution:

  • Split the Video: If you have control over the input video, consider splitting the 48-hour video into smaller chunks, each less than or equal to 24 hours in length. Then, you can use MediaConvert to trim the desired segment from the appropriate chunk.
  • Use Another Service: If splitting the video is not an option, you might need to look into other video processing services or tools that don't have this 24-hour limitation.
  • Custom Solution: If you're comfortable with video processing, you can use tools like FFmpeg to trim videos. FFmpeg is a powerful multimedia framework that can handle videos of any length. Here's a basic command to trim a video using FFmpeg:
ffmpeg -i input.mp4 -ss 33:00:00 -to 35:00:00 -c copy output.mp4

This command will trim the video from 33:00:00 to 35:00:00.

profile picture
answered a year ago
profile pictureAWS
EXPERT
reviewed a year ago
0

Hi, MediaConvert limits timecodes to a 24h-format as per https://docs.aws.amazon.com/mediaconvert/latest/ug/timecode-jobconfig.html

If you use an editing platform that relies on an anchor timecode, use Anchor timecode 
to specify a point at which the input and output frames have the same timecode. 
Use the following 24-hour format with a frame number: HH:MM:SS:FF. 
This setting ignores frame rate conversion.

So, split your video as suggested and convert the different parts.

Best,

Didier

profile pictureAWS
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions