Search code examples
aws-media-convert

MediaConvert split audio into multiple output chunks


I would like to create three audio chunks / segments from a 30-minute-long audio file using AWS MediaConvert. Is it possible to do this with MediaConvert and if so how?

Here is an example using ffmpeg

ffmpeg -i 30min_audio.wav -c copy -f segment -segment_times 0,600,1200 output%d.wav

Solution

  • Unfortunately, there isn't a way to do this in the service currently. The service does not support input clipping for audio only inputs [1].

    A creative way (if you don't care about the output format as much) would be to use a adapative bitrate (ABR) packaging type, such as Apple HLS, set the segment length. Note this will give you consistent segmenting (except for the last segment).

    One thing to point out is that in your ffmpeg command you are using the -c copy filter. This will perform a transmux. MediaConvert is a transcoding service, so an encode will be performed if you process jobs in the service.

    I like to think of it as some bits in, new bits out.

    Resources:

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