0

I have mediaconvert jobs encoding mp3 uploads into various formats. I'd like to also create a 30 second "preview" of an mp3 file by trimming the file to start at 10 seconds and end at 40 seconds.

I have tried setting "input clippings" by adding timecode references as below, but it seems to get ignored completely and encodes the whole file. Perhaps this is because mp3 files don't strictly have Timecode? These settings are in my Input json (PHP SDK):

 "Inputs": [
      {
        "AudioSelectors": {
          "Audio Selector 1": {
            "Offset": 0,
            "DefaultSelection": "DEFAULT",
            "SelectorType": "TRACK",
            "ProgramSelection": 1
          }
        },
        "FilterEnable": "AUTO",
        "PsiControl": "USE_PSI",
        "FilterStrength": 0,
        "DeblockFilter": "DISABLED",
        "DenoiseFilter": "DISABLED",
        "TimecodeSource": "EMBEDDED",
        "FileInput": "'$file'",
        "InputClippings": [
          {
            "EndTimecode": "00:00:45:00",
            "StartTimecode": "00:00:20:00"
          }
        ]
      }
    ]

I have also tried adding the inputclipping in this format :

"inputs": [
  {
    "inputClippings": [
      {
        "endTimecode": "00:00:40:00",
        "startTimecode": "00:00:10:00"
      }
    ],
    "audioSelectors": {
    },
Leon
  • 1,851
  • 3
  • 21
  • 44
  • 1
    I haven't used AWS MediaConvert, but it is certainly possible using the Amazon Elastic Transcoding Service. For an example of creating a new video by [Clip Stitching](https://docs.aws.amazon.com/elastictranscoder/latest/developerguide/clip-stitching.html), see: [Automated video editing with YOU as the star! | AWS Machine Learning Blog](https://aws.amazon.com/blogs/machine-learning/automated-video-editing-with-you-as-the-star/) – John Rotenstein May 31 '20 at 23:27

2 Answers2

1

I think this parameter is case sensitive. I do input clipping in MediaConvert occasionally and it works for me. Maybe try this:

"Inputs": [
  {
    "InputClippings": [
      {
        "EndTimecode": "00:00:40:00",
        "StartTimecode": "00:00:10:00"
      }
    ],
    "AudioSelectors": {
          "Audio Selector 1": {
            "DefaultSelection": "DEFAULT",
            "ProgramSelection": 1
          }
        },
        "FileInput": "s3://my-bucket/abc.mp4"
    }
  ]
trvchn
  • 11
  • 1
1

The InputClippings feature is not currently supported for audio-only inputs. MediaConvert silently ignores this parameter rather than returning a warning or error for audio-only inputs.

Resource: https://docs.aws.amazon.com/mediaconvert/latest/ug/feature-limitations-for-audio-only.html