I wanna overlay a movie (.mov) on top of another movie (.mp4), using AWS Elemental MediaConvert.
I uploaded one .mov file and one .mp4 to S3, both have similar dimensions.
In AWS Elemental MediaConvert, I created a job:
- Input: .mp4 file
- Motion image inserter: .mov file
- Output file will be an mp4 file
Result: the job is failed, error message:
MGILoaderMOV [s3://test/overlay.mov] file contains unsupported pixel format.
The .mov file is working fine because I can play it from my laptop, IAM includes Full access to your Amazon S3 resources.
Any suggestion is appreciated
***** More detail *****
@Tiziano Coroneo, I got a new overlay.mov (converted from FFmpeg, dimension (450x450)). I set up the output as below:
- Preprocessors: Input cropping rectangle X(100), Y(100), Width(450), Height(450)
The job is executed successfully, but the output doesn't include the overlay.
{
"Queue": "arn:aws:mediaconvert:yyyyyyy:xxxxxxxx:queues/Default",
"UserMetadata": {},
"Role": "arn:aws:iam::xxxxxxxxxxxxx:role/my_media_role",
"Settings": {
"OutputGroups": [
{
"Name": "File Group",
"Outputs": [
{
"ContainerSettings": {
"Container": "MP4",
"Mp4Settings": {
"CslgAtom": "INCLUDE",
"FreeSpaceBox": "EXCLUDE",
"MoovPlacement": "PROGRESSIVE_DOWNLOAD"
}
},
"VideoDescription": {
"ScalingBehavior": "DEFAULT",
"Crop": {
"Height": 450,
"Width": 450,
"X": 100,
"Y": 100
},
"TimecodeInsertion": "DISABLED",
"AntiAlias": "ENABLED",
"Sharpness": 50,
"CodecSettings": {
"Codec": "H_264",
"H264Settings": {
"InterlaceMode": "PROGRESSIVE",
"NumberReferenceFrames": 3,
"Syntax": "DEFAULT",
"Softness": 0,
"GopClosedCadence": 1,
"GopSize": 90,
"Slices": 1,
"GopBReference": "DISABLED",
"SlowPal": "DISABLED",
"SpatialAdaptiveQuantization": "ENABLED",
"TemporalAdaptiveQuantization": "ENABLED",
"FlickerAdaptiveQuantization": "DISABLED",
"EntropyEncoding": "CABAC",
"Bitrate": 1000000,
"FramerateControl": "INITIALIZE_FROM_SOURCE",
"RateControlMode": "CBR",
"CodecProfile": "MAIN",
"Telecine": "NONE",
"MinIInterval": 0,
"AdaptiveQuantization": "HIGH",
"CodecLevel": "AUTO",
"FieldEncoding": "PAFF",
"SceneChangeDetect": "ENABLED",
"QualityTuningLevel": "SINGLE_PASS",
"FramerateConversionAlgorithm": "DUPLICATE_DROP",
"UnregisteredSeiTimecode": "DISABLED",
"GopSizeUnits": "FRAMES",
"ParControl": "INITIALIZE_FROM_SOURCE",
"NumberBFramesBetweenReferenceFrames": 2,
"RepeatPps": "DISABLED",
"DynamicSubGop": "STATIC"
}
},
"AfdSignaling": "NONE",
"DropFrameTimecode": "ENABLED",
"RespondToAfd": "NONE",
"ColorMetadata": "INSERT"
},
"Extension": ".mp4",
"NameModifier": "overlay_video"
}
],
"OutputGroupSettings": {
"Type": "FILE_GROUP_SETTINGS",
"FileGroupSettings": {
"Destination": "s3://XXXXXXX/files/"
}
}
}
],
"AdAvailOffset": 0,
"MotionImageInserter": {
"InsertionMode": "MOV",
"Input": "s3://XXXXXXX/converted_overlay.mov",
"Offset": {
"ImageX": 0,
"ImageY": 0
},
"Playback": "ONCE"
},
"Inputs": [
{
"FilterEnable": "AUTO",
"PsiControl": "USE_PSI",
"FilterStrength": 0,
"DeblockFilter": "DISABLED",
"DenoiseFilter": "DISABLED",
"TimecodeSource": "EMBEDDED",
"FileInput": "s3://XXXXXXX/sample_video.mp4"
}
]
},
"StatusUpdateInterval": "SECONDS_60"
}
After some trial and error, I found out that there is a requirement for the motion graphic overlay file to be in pixel format
argb
.The error message here tells you that you mov file has a different pixel format. If you have
ffmpeg
installed on your machine, you can run the following command to convert your file to the right format:-i
is to specify the input file,-sn
removes any subtitle track-dn
removes any data track-an
removes any audio track-vcodec qtrle
sets "Quicktime Animation" as the codec-pix_fmt argb
setsargb
as the pixel data format-f mov
setsmov
as the output file container type.Good luck!