我正在使用Simple Serverless Video On Demand template在AWS上部署VOD解决方案。我更新了代码,为所有无法在那里处理的视频添加了水印。视频正在被转码,但是水印仍然缺失,到目前为止,我已经尝试了两种方法:
但是似乎没有一个起作用。测试视频的尺寸为320×240,这是正在生成的作业请求的内容:
{
"Queue": "arn:aws:mediaconvert:us-east-1:account_id:queues/Default",
"UserMetadata": {},
"Role": "arn:aws:iam::account_id:role/project-profile-MediaConvertJobRole-HASH",
"Settings": {
"TimecodeConfig": {
"Source": "EMBEDDED"
},
"OutputGroups": [
{
"Name": "HLS",
"Outputs": [
{
"Preset": "Custom-Ott_Hls_Ts_Avc_Aac_16x9_480x270_15fps_400kbps",
"NameModifier": "/Custom-Ott_Hls_Ts_Avc_Aac_16x9_480x270_15fps_400kbps"
},
{
"Preset": "Custom-Ott_Hls_Ts_Avc_Aac_16x9_640x360_30fps_600kbps",
"NameModifier": "/Custom-Ott_Hls_Ts_Avc_Aac_16x9_640x360_30fps_600kbps"
},
{
"Preset": "Custom-Ott_Hls_Ts_Avc_Aac_16x9_640x360_30fps_1200kbps",
"NameModifier": "/Custom-Ott_Hls_Ts_Avc_Aac_16x9_640x360_30fps_1200kbps"
},
{
"Preset": "Custom-Ott_Hls_Ts_Avc_Aac_16x9_960x540_30fps_3500kbps",
"NameModifier": "/Custom-Ott_Hls_Ts_Avc_Aac_16x9_960x540_30fps_3500kbps"
},
{
"Preset": "Custom-Ott_Hls_Ts_Avc_Aac_16x9_1280x720_30fps_5000kbps",
"NameModifier": "/Custom-Ott_Hls_Ts_Avc_Aac_16x9_1280x720_30fps_5000kbps"
},
{
"Preset": "Custom-Ott_Hls_Ts_Avc_Aac_16x9_1920x1080_30fps_8500kbps",
"NameModifier": "/Custom-Ott_Hls_Ts_Avc_Aac_16x9_1920x1080_30fps_8500kbps"
}
],
"OutputGroupSettings": {
"Type": "HLS_GROUP_SETTINGS",
"HlsGroupSettings": {
"ManifestDurationFormat": "INTEGER",
"SegmentLength": 4,
"TimedMetadataId3Period": 10,
"CaptionLanguageSetting": "OMIT",
"Destination": "s3://project-profile-account_id-us-east-1/output/hls/samplebunny",
"TimedMetadataId3Frame": "PRIV",
"CodecSpecification": "RFC_4281",
"OutputSelection": "MANIFESTS_AND_SEGMENTS",
"ProgramDateTimePeriod": 600,
"MinSegmentLength": 0,
"DirectoryStructure": "SINGLE_DIRECTORY",
"ProgramDateTime": "EXCLUDE",
"SegmentControl": "SEGMENTED_FILES",
"ManifestCompression": "NONE",
"ClientCache": "ENABLED",
"StreamInfResolution": "INCLUDE"
}
}
},
{
"Name": "DASH ISO",
"Outputs": [
{
"Preset": "Custom-Ott_Dash_Mp4_Avc_Aac_16x9_480x270_15fps_400kbps",
"NameModifier": "/Custom-Ott_Dash_Mp4_Avc_Aac_16x9_480x270_15fps_400kbps"
},
{
"Preset": "Custom-Ott_Dash_Mp4_Avc_Aac_16x9_640x360_30fps_600kbps",
"NameModifier": "/Custom-Ott_Dash_Mp4_Avc_Aac_16x9_640x360_30fps_600kbps"
},
{
"Preset": "Custom-Ott_Dash_Mp4_Avc_Aac_16x9_640x360_30fps_1200kbps",
"NameModifier": "/Custom-Ott_Dash_Mp4_Avc_Aac_16x9_640x360_30fps_1200kbps"
},
{
"Preset": "Custom-Ott_Dash_Mp4_Avc_Aac_16x9_960x540_30fps_3500kbps",
"NameModifier": "/Custom-Ott_Dash_Mp4_Avc_Aac_16x9_960x540_30fps_3500kbps"
},
{
"Preset": "Custom-Ott_Dash_Mp4_Avc_Aac_16x9_1280x720_30fps_5000kbps",
"NameModifier": "/Custom-Ott_Dash_Mp4_Avc_Aac_16x9_1280x720_30fps_5000kbps"
},
{
"Preset": "Custom-Ott_Dash_Mp4_Avc_Aac_16x9_1920x1080_30fps_8500kbps",
"NameModifier": "/Custom-Ott_Dash_Mp4_Avc_Aac_16x9_1920x1080_30fps_8500kbps"
},
{
"Preset": "System-Ott_Dash_Mp4_Aac_He_96Kbps",
"NameModifier": "/preset-0_Ott_Dash_Mp4_Aac_He_96Kbps"
}
],
"OutputGroupSettings": {
"Type": "DASH_ISO_GROUP_SETTINGS",
"DashIsoGroupSettings": {
"SegmentLength": 4,
"Destination": "s3://project-profile-account_id-us-east-1/output/dash/samplebunny",
"FragmentLength": 2,
"SegmentControl": "SEGMENTED_FILES",
"HbbtvCompliance": "NONE"
}
}
}
],
"AdAvailOffset": 0,
"Inputs": [
{
"AudioSelectors": {
"Audio Selector 1": {
"Tracks": [
1
],
"Offset": 0,
"DefaultSelection": "NOT_DEFAULT",
"SelectorType": "TRACK",
"ProgramSelection": 1
}
},
"VideoSelector": {
"ColorSpace": "FOLLOW"
},
"FilterEnable": "AUTO",
"PsiControl": "USE_PSI",
"FilterStrength": 0,
"DeblockFilter": "DISABLED",
"DenoiseFilter": "DISABLED",
"TimecodeSource": "EMBEDDED",
"ImageInserter": {
"InsertableImages": [
{
"Width": 100,
"Height": 31,
"ImageX": 0,
"ImageY": 0,
"Layer": 20,
"ImageInserterInput": "s3://project-profile-account_id-us-east-1/watermark.png",
"StartTime": "00:00:00:00",
"Opacity": 100
}
]
},
"FileInput": "s3://project-profile-account_id-us-east-1/input/samplebunny.mp4"
}
]
},
"AccelerationSettings": {
"Mode": "DISABLED"
},
"StatusUpdateInterval": "SECONDS_60",
"Priority": 0
}
这是生成的输出预设之一:
{
"Description": "Custom-Ott_Dash_Mp4_Avc_Aac_16x9_1280x720_30fps_5000kbps",
"Category": "OTT-DASH",
"Name": "Custom-Ott_Dash_Mp4_Avc_Aac_16x9_1280x720_30fps_5000kbps",
"Settings": {
"VideoDescription": {
"Width": 1280,
"ScalingBehavior": "DEFAULT",
"Height": 720,
"VideoPreprocessors": {
"ImageInserter": {
"InsertableImages": [
{
"Width": 100,
"Height": 31,
"ImageX": 0,
"ImageY": 0,
"Layer": 20,
"ImageInserterInput": "s3://project-profile-account_id-us-east-1/watermark.png",
"StartTime": "00:00:00:00",
"Opacity": 50
}
]
}
},
"TimecodeInsertion": "DISABLED",
"AntiAlias": "ENABLED",
"Sharpness": 50,
"CodecSettings": {
"Codec": "H_264",
"H264Settings": {
"InterlaceMode": "PROGRESSIVE",
"ParNumerator": 1,
"NumberReferenceFrames": 3,
"Syntax": "DEFAULT",
"FramerateDenominator": 1001,
"GopClosedCadence": 1,
"HrdBufferInitialFillPercentage": 90,
"GopSize": 90,
"Slices": 1,
"GopBReference": "ENABLED",
"HrdBufferSize": 10000000,
"SlowPal": "DISABLED",
"ParDenominator": 1,
"SpatialAdaptiveQuantization": "ENABLED",
"TemporalAdaptiveQuantization": "ENABLED",
"FlickerAdaptiveQuantization": "ENABLED",
"EntropyEncoding": "CABAC",
"Bitrate": 5000000,
"FramerateControl": "SPECIFIED",
"RateControlMode": "CBR",
"CodecProfile": "HIGH",
"Telecine": "NONE",
"FramerateNumerator": 30000,
"MinIInterval": 0,
"AdaptiveQuantization": "HIGH",
"CodecLevel": "LEVEL_4",
"FieldEncoding": "PAFF",
"SceneChangeDetect": "ENABLED",
"QualityTuningLevel": "MULTI_PASS_HQ",
"FramerateConversionAlgorithm": "DUPLICATE_DROP",
"UnregisteredSeiTimecode": "DISABLED",
"GopSizeUnits": "FRAMES",
"ParControl": "SPECIFIED",
"NumberBFramesBetweenReferenceFrames": 3,
"RepeatPps": "DISABLED"
}
},
"AfdSignaling": "NONE",
"DropFrameTimecode": "ENABLED",
"RespondToAfd": "NONE",
"ColorMetadata": "INSERT"
},
"ContainerSettings": {
"Container": "MPD"
}
}
}
任何输入将不胜感激。
答案 0 :(得分:0)
我看到您已将TimecodeConfig和TimecodeSource设置为EMBEDDED。我还注意到您的图片插入器均从00:00:00:00开始。
MediaConvert将在视频的SEI标头中查找基于嵌入式时间码的时间码。您可以查看mp4文件,看看它是否确实嵌入了时间码。或尝试使用和重新运行您的工作流程,并将TimecodeConfig和TimecodeSource切换为ZEROBASED。这将告诉服务从0开始并打勾。
请注意,MP4和MOV文件可能包含一个tcmd框(原子)。但是,诸如MediaInfo之类的普通阅读器会将其视为时间码,并显示为单独的音轨。