问题
I am using Amazon S3 for uploading and transcoding of video files. For creating a job I used 1351620000001-000001
as the preset from the existing ones for mp4 format from Amazon Elastic Transcoder. But I get the following error:
"Uncaught Aws\ElasticTranscoder\Exception\ValidationException: AWS Error Code: ValidationException, Status Code: 400, AWS Request ID: dbf2833a-5375-11e4-a2d3-bb1da889e1d8, AWS Error Type: client, AWS Error Message: SegmentDuration '10' is not a valid option for preset 1351620000001-000001, because the container is not ts or fmp4."
Can anyone please help me sort out the issue?
回答1:
You have chosen to create an mp4 output, and specified also specified a segment duration. These options cannot be specified together. MP4 always outputs the entire movie into one file. Segments are used in adaptive bit rate formats where the movie is broken up into many (perhaps thousands) of small files, each containing a few seconds of video. In that case, the segment size specifies how many seconds of video to put in each file.
Examples of adaptive bit rate outputs include HLS (which writes each segment in a ts file), and Smooth Streaming (which writes each segment in a fmp4 file). HLS is used by iOS devices and newer Android phones. Smooth Streaming is used by televisions and desktop computers, most famously to stream Netflix content.
Your choice, mp4, is the most common format used when you want to download the entire file, though playback can begin before the download completes. This was commonly used by iTunes, YouTube, and Facebook.
来源:https://stackoverflow.com/questions/26355421/amazon-elastic-transcoder-segmentduration-for-creating-jobs