Class Mp4Settings

    • Method Detail

      • audioDuration

        public final CmfcAudioDuration audioDuration()
        Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration. In all other cases, keep the default value, Default codec duration. When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.

        If the service returns an enum value that is not available in the current SDK version, audioDuration will return CmfcAudioDuration.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from audioDurationAsString().

        Returns:
        Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration. In all other cases, keep the default value, Default codec duration. When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
        See Also:
        CmfcAudioDuration
      • audioDurationAsString

        public final String audioDurationAsString()
        Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration. In all other cases, keep the default value, Default codec duration. When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.

        If the service returns an enum value that is not available in the current SDK version, audioDuration will return CmfcAudioDuration.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from audioDurationAsString().

        Returns:
        Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration. In all other cases, keep the default value, Default codec duration. When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
        See Also:
        CmfcAudioDuration
      • cslgAtom

        public final Mp4CslgAtom cslgAtom()
        When enabled, file composition times will start at zero, composition times in the 'ctts' (composition time to sample) box for B-frames will be negative, and a 'cslg' (composition shift least greatest) box will be included per 14496-1 amendment 1. This improves compatibility with Apple players and tools.

        If the service returns an enum value that is not available in the current SDK version, cslgAtom will return Mp4CslgAtom.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from cslgAtomAsString().

        Returns:
        When enabled, file composition times will start at zero, composition times in the 'ctts' (composition time to sample) box for B-frames will be negative, and a 'cslg' (composition shift least greatest) box will be included per 14496-1 amendment 1. This improves compatibility with Apple players and tools.
        See Also:
        Mp4CslgAtom
      • cslgAtomAsString

        public final String cslgAtomAsString()
        When enabled, file composition times will start at zero, composition times in the 'ctts' (composition time to sample) box for B-frames will be negative, and a 'cslg' (composition shift least greatest) box will be included per 14496-1 amendment 1. This improves compatibility with Apple players and tools.

        If the service returns an enum value that is not available in the current SDK version, cslgAtom will return Mp4CslgAtom.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from cslgAtomAsString().

        Returns:
        When enabled, file composition times will start at zero, composition times in the 'ctts' (composition time to sample) box for B-frames will be negative, and a 'cslg' (composition shift least greatest) box will be included per 14496-1 amendment 1. This improves compatibility with Apple players and tools.
        See Also:
        Mp4CslgAtom
      • cttsVersion

        public final Integer cttsVersion()
        Ignore this setting unless compliance to the CTTS box version specification matters in your workflow. Specify a value of 1 to set your CTTS box version to 1 and make your output compliant with the specification. When you specify a value of 1, you must also set CSLG atom to the value INCLUDE. Keep the default value 0 to set your CTTS box version to 0. This can provide backward compatibility for some players and packagers.
        Returns:
        Ignore this setting unless compliance to the CTTS box version specification matters in your workflow. Specify a value of 1 to set your CTTS box version to 1 and make your output compliant with the specification. When you specify a value of 1, you must also set CSLG atom to the value INCLUDE. Keep the default value 0 to set your CTTS box version to 0. This can provide backward compatibility for some players and packagers.
      • freeSpaceBoxAsString

        public final String freeSpaceBoxAsString()
        Inserts a free-space box immediately after the moov box.

        If the service returns an enum value that is not available in the current SDK version, freeSpaceBox will return Mp4FreeSpaceBox.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from freeSpaceBoxAsString().

        Returns:
        Inserts a free-space box immediately after the moov box.
        See Also:
        Mp4FreeSpaceBox
      • moovPlacement

        public final Mp4MoovPlacement moovPlacement()
        To place the MOOV atom at the beginning of your output, which is useful for progressive downloading: Leave blank or choose Progressive download. To place the MOOV at the end of your output: Choose Normal.

        If the service returns an enum value that is not available in the current SDK version, moovPlacement will return Mp4MoovPlacement.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from moovPlacementAsString().

        Returns:
        To place the MOOV atom at the beginning of your output, which is useful for progressive downloading: Leave blank or choose Progressive download. To place the MOOV at the end of your output: Choose Normal.
        See Also:
        Mp4MoovPlacement
      • moovPlacementAsString

        public final String moovPlacementAsString()
        To place the MOOV atom at the beginning of your output, which is useful for progressive downloading: Leave blank or choose Progressive download. To place the MOOV at the end of your output: Choose Normal.

        If the service returns an enum value that is not available in the current SDK version, moovPlacement will return Mp4MoovPlacement.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from moovPlacementAsString().

        Returns:
        To place the MOOV atom at the beginning of your output, which is useful for progressive downloading: Leave blank or choose Progressive download. To place the MOOV at the end of your output: Choose Normal.
        See Also:
        Mp4MoovPlacement
      • mp4MajorBrand

        public final String mp4MajorBrand()
        Overrides the "Major Brand" field in the output file. Usually not necessary to specify.
        Returns:
        Overrides the "Major Brand" field in the output file. Usually not necessary to specify.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)