1

I'm using the Simple Serverless Video On Demand template to deploy a VOD solution on AWS. I updated the code to add a watermark to all the videos ill be processing there. videos are being transcoded but the watermark still missing, so far I have tried two approaches:

  • Add the watermark inside the output presets.
  • Add the watermark as part of the process input.

But none seems to work. the dimensions of test video are 320 × 240, and this is the content of the job request that is being generated:

{
  "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
}

And this is one of the generated output presets:

{
  "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"
    }
  }
}

Any input would be appreciated.

moscoquera
  • 278
  • 2
  • 16

1 Answers1

0

I see you have your TimecodeConfig and TimecodeSource set to EMBEDDED. I also noticed that your image inserters all start from 00:00:00:00.

MediaConvert will look for timecode in the SEI headers of the video essense for embedded based timecode. Can you review your mp4 file and see if it actually has embedded timecode. Or try to re-run your workflow using the and switching TimecodeConfig and TimecodeSource to ZEROBASED. This will tell the service to start at 0 and tick up.

Note that MP4 and MOV files may contain a tcmd box (atom).. however common readers such as MediaInfo will see it as timecode and display it out as a seperate track.

jjohn
  • 233
  • 1
  • 3