All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.elastictranscoder.model.JobInput Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Elastic Transcoder module holds the client classes that are used for communicating with Amazon Elastic Transcoder Service

There is a newer version: 2.29.17
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.elastictranscoder.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Information about the file that you're transcoding. *

*/ @Generated("software.amazon.awssdk:codegen") public final class JobInput implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField KEY_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Key") .getter(getter(JobInput::key)).setter(setter(Builder::key)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Key").build()).build(); private static final SdkField FRAME_RATE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("FrameRate").getter(getter(JobInput::frameRate)).setter(setter(Builder::frameRate)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FrameRate").build()).build(); private static final SdkField RESOLUTION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("Resolution").getter(getter(JobInput::resolution)).setter(setter(Builder::resolution)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Resolution").build()).build(); private static final SdkField ASPECT_RATIO_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("AspectRatio").getter(getter(JobInput::aspectRatio)).setter(setter(Builder::aspectRatio)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AspectRatio").build()).build(); private static final SdkField INTERLACED_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("Interlaced").getter(getter(JobInput::interlaced)).setter(setter(Builder::interlaced)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Interlaced").build()).build(); private static final SdkField CONTAINER_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("Container").getter(getter(JobInput::container)).setter(setter(Builder::container)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Container").build()).build(); private static final SdkField ENCRYPTION_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("Encryption").getter(getter(JobInput::encryption)).setter(setter(Builder::encryption)) .constructor(Encryption::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Encryption").build()).build(); private static final SdkField TIME_SPAN_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("TimeSpan").getter(getter(JobInput::timeSpan)).setter(setter(Builder::timeSpan)) .constructor(TimeSpan::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TimeSpan").build()).build(); private static final SdkField INPUT_CAPTIONS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("InputCaptions") .getter(getter(JobInput::inputCaptions)).setter(setter(Builder::inputCaptions)).constructor(InputCaptions::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InputCaptions").build()).build(); private static final SdkField DETECTED_PROPERTIES_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("DetectedProperties") .getter(getter(JobInput::detectedProperties)).setter(setter(Builder::detectedProperties)) .constructor(DetectedProperties::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DetectedProperties").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(KEY_FIELD, FRAME_RATE_FIELD, RESOLUTION_FIELD, ASPECT_RATIO_FIELD, INTERLACED_FIELD, CONTAINER_FIELD, ENCRYPTION_FIELD, TIME_SPAN_FIELD, INPUT_CAPTIONS_FIELD, DETECTED_PROPERTIES_FIELD)); private static final long serialVersionUID = 1L; private final String key; private final String frameRate; private final String resolution; private final String aspectRatio; private final String interlaced; private final String container; private final Encryption encryption; private final TimeSpan timeSpan; private final InputCaptions inputCaptions; private final DetectedProperties detectedProperties; private JobInput(BuilderImpl builder) { this.key = builder.key; this.frameRate = builder.frameRate; this.resolution = builder.resolution; this.aspectRatio = builder.aspectRatio; this.interlaced = builder.interlaced; this.container = builder.container; this.encryption = builder.encryption; this.timeSpan = builder.timeSpan; this.inputCaptions = builder.inputCaptions; this.detectedProperties = builder.detectedProperties; } /** *

* The name of the file to transcode. Elsewhere in the body of the JSON block is the the ID of the pipeline to use * for processing the job. The InputBucket object in that pipeline tells Elastic Transcoder which * Amazon S3 bucket to get the file from. *

*

* If the file name includes a prefix, such as cooking/lasagna.mpg, include the prefix in the key. If * the file isn't in the specified bucket, Elastic Transcoder returns an error. *

* * @return The name of the file to transcode. Elsewhere in the body of the JSON block is the the ID of the pipeline * to use for processing the job. The InputBucket object in that pipeline tells Elastic * Transcoder which Amazon S3 bucket to get the file from.

*

* If the file name includes a prefix, such as cooking/lasagna.mpg, include the prefix in the * key. If the file isn't in the specified bucket, Elastic Transcoder returns an error. */ public final String key() { return key; } /** *

* The frame rate of the input file. If you want Elastic Transcoder to automatically detect the frame rate of the * input file, specify auto. If you want to specify the frame rate for the input file, enter one of the * following values: *

*

* 10, 15, 23.97, 24, 25, 29.97, * 30, 60 *

*

* If you specify a value other than auto, Elastic Transcoder disables automatic detection of the frame * rate. *

* * @return The frame rate of the input file. If you want Elastic Transcoder to automatically detect the frame rate * of the input file, specify auto. If you want to specify the frame rate for the input file, * enter one of the following values:

*

* 10, 15, 23.97, 24, 25, * 29.97, 30, 60 *

*

* If you specify a value other than auto, Elastic Transcoder disables automatic detection of * the frame rate. */ public final String frameRate() { return frameRate; } /** *

* This value must be auto, which causes Elastic Transcoder to automatically detect the resolution of * the input file. *

* * @return This value must be auto, which causes Elastic Transcoder to automatically detect the * resolution of the input file. */ public final String resolution() { return resolution; } /** *

* The aspect ratio of the input file. If you want Elastic Transcoder to automatically detect the aspect ratio of * the input file, specify auto. If you want to specify the aspect ratio for the output file, enter one * of the following values: *

*

* 1:1, 4:3, 3:2, 16:9 *

*

* If you specify a value other than auto, Elastic Transcoder disables automatic detection of the * aspect ratio. *

* * @return The aspect ratio of the input file. If you want Elastic Transcoder to automatically detect the aspect * ratio of the input file, specify auto. If you want to specify the aspect ratio for the * output file, enter one of the following values:

*

* 1:1, 4:3, 3:2, 16:9 *

*

* If you specify a value other than auto, Elastic Transcoder disables automatic detection of * the aspect ratio. */ public final String aspectRatio() { return aspectRatio; } /** *

* Whether the input file is interlaced. If you want Elastic Transcoder to automatically detect whether the input * file is interlaced, specify auto. If you want to specify whether the input file is interlaced, enter * one of the following values: *

*

* true, false *

*

* If you specify a value other than auto, Elastic Transcoder disables automatic detection of * interlacing. *

* * @return Whether the input file is interlaced. If you want Elastic Transcoder to automatically detect whether the * input file is interlaced, specify auto. If you want to specify whether the input file is * interlaced, enter one of the following values:

*

* true, false *

*

* If you specify a value other than auto, Elastic Transcoder disables automatic detection of * interlacing. */ public final String interlaced() { return interlaced; } /** *

* The container type for the input file. If you want Elastic Transcoder to automatically detect the container type * of the input file, specify auto. If you want to specify the container type for the input file, enter * one of the following values: *

*

* 3gp, aac, asf, avi, divx, flv, * m4a, mkv, mov, mp3, mp4, mpeg, * mpeg-ps, mpeg-ts, mxf, ogg, vob, * wav, webm *

* * @return The container type for the input file. If you want Elastic Transcoder to automatically detect the * container type of the input file, specify auto. If you want to specify the container type * for the input file, enter one of the following values:

*

* 3gp, aac, asf, avi, divx, * flv, m4a, mkv, mov, mp3, * mp4, mpeg, mpeg-ps, mpeg-ts, mxf, * ogg, vob, wav, webm */ public final String container() { return container; } /** *

* The encryption settings, if any, that are used for decrypting your input files. If your input file is encrypted, * you must specify the mode that Elastic Transcoder uses to decrypt your file. *

* * @return The encryption settings, if any, that are used for decrypting your input files. If your input file is * encrypted, you must specify the mode that Elastic Transcoder uses to decrypt your file. */ public final Encryption encryption() { return encryption; } /** *

* Settings for clipping an input. Each input can have different clip settings. *

* * @return Settings for clipping an input. Each input can have different clip settings. */ public final TimeSpan timeSpan() { return timeSpan; } /** *

* You can configure Elastic Transcoder to transcode captions, or subtitles, from one format to another. All * captions must be in UTF-8. Elastic Transcoder supports two types of captions: *

*
    *
  • *

    * Embedded: Embedded captions are included in the same file as the audio and video. Elastic Transcoder * supports only one embedded caption per language, to a maximum of 300 embedded captions per file. *

    *

    * Valid input values include: CEA-608 (EIA-608, first non-empty channel only), * CEA-708 (EIA-708, first non-empty channel only), and mov-text *

    *

    * Valid outputs include: mov-text *

    *

    * Elastic Transcoder supports a maximum of one embedded format per output. *

    *
  • *
  • *

    * Sidecar: Sidecar captions are kept in a separate metadata file from the audio and video data. Sidecar * captions require a player that is capable of understanding the relationship between the video file and the * sidecar file. Elastic Transcoder supports only one sidecar caption per language, to a maximum of 20 sidecar * captions per file. *

    *

    * Valid input values include: dfxp (first div element only), ebu-tt, scc, * smpt, srt, ttml (first div element only), and webvtt *

    *

    * Valid outputs include: dfxp (first div element only), scc, srt, and * webvtt. *

    *
  • *
*

* If you want ttml or smpte-tt compatible captions, specify dfxp as your output format. *

*

* Elastic Transcoder does not support OCR (Optical Character Recognition), does not accept pictures as a valid * input for captions, and is not available for audio-only transcoding. Elastic Transcoder does not preserve text * formatting (for example, italics) during the transcoding process. *

*

* To remove captions or leave the captions empty, set Captions to null. To pass through existing * captions unchanged, set the MergePolicy to MergeRetain, and pass in a null * CaptionSources array. *

*

* For more information on embedded files, see the Subtitles Wikipedia page. *

*

* For more information on sidecar files, see the Extensible Metadata Platform and Sidecar file Wikipedia pages. *

* * @return You can configure Elastic Transcoder to transcode captions, or subtitles, from one format to another. All * captions must be in UTF-8. Elastic Transcoder supports two types of captions:

*
    *
  • *

    * Embedded: Embedded captions are included in the same file as the audio and video. Elastic * Transcoder supports only one embedded caption per language, to a maximum of 300 embedded captions per * file. *

    *

    * Valid input values include: CEA-608 (EIA-608, first non-empty channel only), * CEA-708 (EIA-708, first non-empty channel only), and mov-text *

    *

    * Valid outputs include: mov-text *

    *

    * Elastic Transcoder supports a maximum of one embedded format per output. *

    *
  • *
  • *

    * Sidecar: Sidecar captions are kept in a separate metadata file from the audio and video data. * Sidecar captions require a player that is capable of understanding the relationship between the video * file and the sidecar file. Elastic Transcoder supports only one sidecar caption per language, to a * maximum of 20 sidecar captions per file. *

    *

    * Valid input values include: dfxp (first div element only), ebu-tt, * scc, smpt, srt, ttml (first div element only), and * webvtt *

    *

    * Valid outputs include: dfxp (first div element only), scc, srt, * and webvtt. *

    *
  • *
*

* If you want ttml or smpte-tt compatible captions, specify dfxp as your output format. *

*

* Elastic Transcoder does not support OCR (Optical Character Recognition), does not accept pictures as a * valid input for captions, and is not available for audio-only transcoding. Elastic Transcoder does not * preserve text formatting (for example, italics) during the transcoding process. *

*

* To remove captions or leave the captions empty, set Captions to null. To pass through * existing captions unchanged, set the MergePolicy to MergeRetain, and pass in a * null CaptionSources array. *

*

* For more information on embedded files, see the Subtitles Wikipedia page. *

*

* For more information on sidecar files, see the Extensible Metadata Platform and Sidecar file Wikipedia * pages. */ public final InputCaptions inputCaptions() { return inputCaptions; } /** *

* The detected properties of the input file. *

* * @return The detected properties of the input file. */ public final DetectedProperties detectedProperties() { return detectedProperties; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(key()); hashCode = 31 * hashCode + Objects.hashCode(frameRate()); hashCode = 31 * hashCode + Objects.hashCode(resolution()); hashCode = 31 * hashCode + Objects.hashCode(aspectRatio()); hashCode = 31 * hashCode + Objects.hashCode(interlaced()); hashCode = 31 * hashCode + Objects.hashCode(container()); hashCode = 31 * hashCode + Objects.hashCode(encryption()); hashCode = 31 * hashCode + Objects.hashCode(timeSpan()); hashCode = 31 * hashCode + Objects.hashCode(inputCaptions()); hashCode = 31 * hashCode + Objects.hashCode(detectedProperties()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof JobInput)) { return false; } JobInput other = (JobInput) obj; return Objects.equals(key(), other.key()) && Objects.equals(frameRate(), other.frameRate()) && Objects.equals(resolution(), other.resolution()) && Objects.equals(aspectRatio(), other.aspectRatio()) && Objects.equals(interlaced(), other.interlaced()) && Objects.equals(container(), other.container()) && Objects.equals(encryption(), other.encryption()) && Objects.equals(timeSpan(), other.timeSpan()) && Objects.equals(inputCaptions(), other.inputCaptions()) && Objects.equals(detectedProperties(), other.detectedProperties()); } /** * 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. */ @Override public final String toString() { return ToString.builder("JobInput").add("Key", key()).add("FrameRate", frameRate()).add("Resolution", resolution()) .add("AspectRatio", aspectRatio()).add("Interlaced", interlaced()).add("Container", container()) .add("Encryption", encryption()).add("TimeSpan", timeSpan()).add("InputCaptions", inputCaptions()) .add("DetectedProperties", detectedProperties()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Key": return Optional.ofNullable(clazz.cast(key())); case "FrameRate": return Optional.ofNullable(clazz.cast(frameRate())); case "Resolution": return Optional.ofNullable(clazz.cast(resolution())); case "AspectRatio": return Optional.ofNullable(clazz.cast(aspectRatio())); case "Interlaced": return Optional.ofNullable(clazz.cast(interlaced())); case "Container": return Optional.ofNullable(clazz.cast(container())); case "Encryption": return Optional.ofNullable(clazz.cast(encryption())); case "TimeSpan": return Optional.ofNullable(clazz.cast(timeSpan())); case "InputCaptions": return Optional.ofNullable(clazz.cast(inputCaptions())); case "DetectedProperties": return Optional.ofNullable(clazz.cast(detectedProperties())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((JobInput) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The name of the file to transcode. Elsewhere in the body of the JSON block is the the ID of the pipeline to * use for processing the job. The InputBucket object in that pipeline tells Elastic Transcoder * which Amazon S3 bucket to get the file from. *

*

* If the file name includes a prefix, such as cooking/lasagna.mpg, include the prefix in the key. * If the file isn't in the specified bucket, Elastic Transcoder returns an error. *

* * @param key * The name of the file to transcode. Elsewhere in the body of the JSON block is the the ID of the * pipeline to use for processing the job. The InputBucket object in that pipeline tells * Elastic Transcoder which Amazon S3 bucket to get the file from.

*

* If the file name includes a prefix, such as cooking/lasagna.mpg, include the prefix in * the key. If the file isn't in the specified bucket, Elastic Transcoder returns an error. * @return Returns a reference to this object so that method calls can be chained together. */ Builder key(String key); /** *

* The frame rate of the input file. If you want Elastic Transcoder to automatically detect the frame rate of * the input file, specify auto. If you want to specify the frame rate for the input file, enter * one of the following values: *

*

* 10, 15, 23.97, 24, 25, 29.97, * 30, 60 *

*

* If you specify a value other than auto, Elastic Transcoder disables automatic detection of the * frame rate. *

* * @param frameRate * The frame rate of the input file. If you want Elastic Transcoder to automatically detect the frame * rate of the input file, specify auto. If you want to specify the frame rate for the input * file, enter one of the following values:

*

* 10, 15, 23.97, 24, 25, * 29.97, 30, 60 *

*

* If you specify a value other than auto, Elastic Transcoder disables automatic detection * of the frame rate. * @return Returns a reference to this object so that method calls can be chained together. */ Builder frameRate(String frameRate); /** *

* This value must be auto, which causes Elastic Transcoder to automatically detect the resolution * of the input file. *

* * @param resolution * This value must be auto, which causes Elastic Transcoder to automatically detect the * resolution of the input file. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resolution(String resolution); /** *

* The aspect ratio of the input file. If you want Elastic Transcoder to automatically detect the aspect ratio * of the input file, specify auto. If you want to specify the aspect ratio for the output file, * enter one of the following values: *

*

* 1:1, 4:3, 3:2, 16:9 *

*

* If you specify a value other than auto, Elastic Transcoder disables automatic detection of the * aspect ratio. *

* * @param aspectRatio * The aspect ratio of the input file. If you want Elastic Transcoder to automatically detect the aspect * ratio of the input file, specify auto. If you want to specify the aspect ratio for the * output file, enter one of the following values:

*

* 1:1, 4:3, 3:2, 16:9 *

*

* If you specify a value other than auto, Elastic Transcoder disables automatic detection * of the aspect ratio. * @return Returns a reference to this object so that method calls can be chained together. */ Builder aspectRatio(String aspectRatio); /** *

* Whether the input file is interlaced. If you want Elastic Transcoder to automatically detect whether the * input file is interlaced, specify auto. If you want to specify whether the input file is * interlaced, enter one of the following values: *

*

* true, false *

*

* If you specify a value other than auto, Elastic Transcoder disables automatic detection of * interlacing. *

* * @param interlaced * Whether the input file is interlaced. If you want Elastic Transcoder to automatically detect whether * the input file is interlaced, specify auto. If you want to specify whether the input file * is interlaced, enter one of the following values:

*

* true, false *

*

* If you specify a value other than auto, Elastic Transcoder disables automatic detection * of interlacing. * @return Returns a reference to this object so that method calls can be chained together. */ Builder interlaced(String interlaced); /** *

* The container type for the input file. If you want Elastic Transcoder to automatically detect the container * type of the input file, specify auto. If you want to specify the container type for the input * file, enter one of the following values: *

*

* 3gp, aac, asf, avi, divx, flv, * m4a, mkv, mov, mp3, mp4, mpeg, * mpeg-ps, mpeg-ts, mxf, ogg, vob, * wav, webm *

* * @param container * The container type for the input file. If you want Elastic Transcoder to automatically detect the * container type of the input file, specify auto. If you want to specify the container type * for the input file, enter one of the following values:

*

* 3gp, aac, asf, avi, divx, * flv, m4a, mkv, mov, mp3, * mp4, mpeg, mpeg-ps, mpeg-ts, mxf, * ogg, vob, wav, webm * @return Returns a reference to this object so that method calls can be chained together. */ Builder container(String container); /** *

* The encryption settings, if any, that are used for decrypting your input files. If your input file is * encrypted, you must specify the mode that Elastic Transcoder uses to decrypt your file. *

* * @param encryption * The encryption settings, if any, that are used for decrypting your input files. If your input file is * encrypted, you must specify the mode that Elastic Transcoder uses to decrypt your file. * @return Returns a reference to this object so that method calls can be chained together. */ Builder encryption(Encryption encryption); /** *

* The encryption settings, if any, that are used for decrypting your input files. If your input file is * encrypted, you must specify the mode that Elastic Transcoder uses to decrypt your file. *

* This is a convenience method that creates an instance of the {@link Encryption.Builder} avoiding the need to * create one manually via {@link Encryption#builder()}. * *

* When the {@link Consumer} completes, {@link Encryption.Builder#build()} is called immediately and its result * is passed to {@link #encryption(Encryption)}. * * @param encryption * a consumer that will call methods on {@link Encryption.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #encryption(Encryption) */ default Builder encryption(Consumer encryption) { return encryption(Encryption.builder().applyMutation(encryption).build()); } /** *

* Settings for clipping an input. Each input can have different clip settings. *

* * @param timeSpan * Settings for clipping an input. Each input can have different clip settings. * @return Returns a reference to this object so that method calls can be chained together. */ Builder timeSpan(TimeSpan timeSpan); /** *

* Settings for clipping an input. Each input can have different clip settings. *

* This is a convenience method that creates an instance of the {@link TimeSpan.Builder} avoiding the need to * create one manually via {@link TimeSpan#builder()}. * *

* When the {@link Consumer} completes, {@link TimeSpan.Builder#build()} is called immediately and its result is * passed to {@link #timeSpan(TimeSpan)}. * * @param timeSpan * a consumer that will call methods on {@link TimeSpan.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #timeSpan(TimeSpan) */ default Builder timeSpan(Consumer timeSpan) { return timeSpan(TimeSpan.builder().applyMutation(timeSpan).build()); } /** *

* You can configure Elastic Transcoder to transcode captions, or subtitles, from one format to another. All * captions must be in UTF-8. Elastic Transcoder supports two types of captions: *

*
    *
  • *

    * Embedded: Embedded captions are included in the same file as the audio and video. Elastic Transcoder * supports only one embedded caption per language, to a maximum of 300 embedded captions per file. *

    *

    * Valid input values include: CEA-608 (EIA-608, first non-empty channel only), * CEA-708 (EIA-708, first non-empty channel only), and mov-text *

    *

    * Valid outputs include: mov-text *

    *

    * Elastic Transcoder supports a maximum of one embedded format per output. *

    *
  • *
  • *

    * Sidecar: Sidecar captions are kept in a separate metadata file from the audio and video data. Sidecar * captions require a player that is capable of understanding the relationship between the video file and the * sidecar file. Elastic Transcoder supports only one sidecar caption per language, to a maximum of 20 sidecar * captions per file. *

    *

    * Valid input values include: dfxp (first div element only), ebu-tt, scc, smpt, srt, ttml (first div element only), and webvtt *

    *

    * Valid outputs include: dfxp (first div element only), scc, srt, and * webvtt. *

    *
  • *
*

* If you want ttml or smpte-tt compatible captions, specify dfxp as your output format. *

*

* Elastic Transcoder does not support OCR (Optical Character Recognition), does not accept pictures as a valid * input for captions, and is not available for audio-only transcoding. Elastic Transcoder does not preserve * text formatting (for example, italics) during the transcoding process. *

*

* To remove captions or leave the captions empty, set Captions to null. To pass through existing * captions unchanged, set the MergePolicy to MergeRetain, and pass in a null * CaptionSources array. *

*

* For more information on embedded files, see the Subtitles Wikipedia page. *

*

* For more information on sidecar files, see the Extensible Metadata Platform and Sidecar file Wikipedia pages. *

* * @param inputCaptions * You can configure Elastic Transcoder to transcode captions, or subtitles, from one format to another. * All captions must be in UTF-8. Elastic Transcoder supports two types of captions:

*
    *
  • *

    * Embedded: Embedded captions are included in the same file as the audio and video. Elastic * Transcoder supports only one embedded caption per language, to a maximum of 300 embedded captions per * file. *

    *

    * Valid input values include: CEA-608 (EIA-608, first non-empty channel only), * CEA-708 (EIA-708, first non-empty channel only), and mov-text *

    *

    * Valid outputs include: mov-text *

    *

    * Elastic Transcoder supports a maximum of one embedded format per output. *

    *
  • *
  • *

    * Sidecar: Sidecar captions are kept in a separate metadata file from the audio and video data. * Sidecar captions require a player that is capable of understanding the relationship between the video * file and the sidecar file. Elastic Transcoder supports only one sidecar caption per language, to a * maximum of 20 sidecar captions per file. *

    *

    * Valid input values include: dfxp (first div element only), ebu-tt, * scc, smpt, srt, ttml (first div element only), and * webvtt *

    *

    * Valid outputs include: dfxp (first div element only), scc, srt, * and webvtt. *

    *
  • *
*

* If you want ttml or smpte-tt compatible captions, specify dfxp as your output format. *

*

* Elastic Transcoder does not support OCR (Optical Character Recognition), does not accept pictures as a * valid input for captions, and is not available for audio-only transcoding. Elastic Transcoder does not * preserve text formatting (for example, italics) during the transcoding process. *

*

* To remove captions or leave the captions empty, set Captions to null. To pass through * existing captions unchanged, set the MergePolicy to MergeRetain, and pass in * a null CaptionSources array. *

*

* For more information on embedded files, see the Subtitles Wikipedia page. *

*

* For more information on sidecar files, see the Extensible Metadata Platform and Sidecar file Wikipedia * pages. * @return Returns a reference to this object so that method calls can be chained together. */ Builder inputCaptions(InputCaptions inputCaptions); /** *

* You can configure Elastic Transcoder to transcode captions, or subtitles, from one format to another. All * captions must be in UTF-8. Elastic Transcoder supports two types of captions: *

*
    *
  • *

    * Embedded: Embedded captions are included in the same file as the audio and video. Elastic Transcoder * supports only one embedded caption per language, to a maximum of 300 embedded captions per file. *

    *

    * Valid input values include: CEA-608 (EIA-608, first non-empty channel only), * CEA-708 (EIA-708, first non-empty channel only), and mov-text *

    *

    * Valid outputs include: mov-text *

    *

    * Elastic Transcoder supports a maximum of one embedded format per output. *

    *
  • *
  • *

    * Sidecar: Sidecar captions are kept in a separate metadata file from the audio and video data. Sidecar * captions require a player that is capable of understanding the relationship between the video file and the * sidecar file. Elastic Transcoder supports only one sidecar caption per language, to a maximum of 20 sidecar * captions per file. *

    *

    * Valid input values include: dfxp (first div element only), ebu-tt, scc, smpt, srt, ttml (first div element only), and webvtt *

    *

    * Valid outputs include: dfxp (first div element only), scc, srt, and * webvtt. *

    *
  • *
*

* If you want ttml or smpte-tt compatible captions, specify dfxp as your output format. *

*

* Elastic Transcoder does not support OCR (Optical Character Recognition), does not accept pictures as a valid * input for captions, and is not available for audio-only transcoding. Elastic Transcoder does not preserve * text formatting (for example, italics) during the transcoding process. *

*

* To remove captions or leave the captions empty, set Captions to null. To pass through existing * captions unchanged, set the MergePolicy to MergeRetain, and pass in a null * CaptionSources array. *

*

* For more information on embedded files, see the Subtitles Wikipedia page. *

*

* For more information on sidecar files, see the Extensible Metadata Platform and Sidecar file Wikipedia pages. *

* This is a convenience method that creates an instance of the {@link InputCaptions.Builder} avoiding the need * to create one manually via {@link InputCaptions#builder()}. * *

* When the {@link Consumer} completes, {@link InputCaptions.Builder#build()} is called immediately and its * result is passed to {@link #inputCaptions(InputCaptions)}. * * @param inputCaptions * a consumer that will call methods on {@link InputCaptions.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #inputCaptions(InputCaptions) */ default Builder inputCaptions(Consumer inputCaptions) { return inputCaptions(InputCaptions.builder().applyMutation(inputCaptions).build()); } /** *

* The detected properties of the input file. *

* * @param detectedProperties * The detected properties of the input file. * @return Returns a reference to this object so that method calls can be chained together. */ Builder detectedProperties(DetectedProperties detectedProperties); /** *

* The detected properties of the input file. *

* This is a convenience method that creates an instance of the {@link DetectedProperties.Builder} avoiding the * need to create one manually via {@link DetectedProperties#builder()}. * *

* When the {@link Consumer} completes, {@link DetectedProperties.Builder#build()} is called immediately and its * result is passed to {@link #detectedProperties(DetectedProperties)}. * * @param detectedProperties * a consumer that will call methods on {@link DetectedProperties.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #detectedProperties(DetectedProperties) */ default Builder detectedProperties(Consumer detectedProperties) { return detectedProperties(DetectedProperties.builder().applyMutation(detectedProperties).build()); } } static final class BuilderImpl implements Builder { private String key; private String frameRate; private String resolution; private String aspectRatio; private String interlaced; private String container; private Encryption encryption; private TimeSpan timeSpan; private InputCaptions inputCaptions; private DetectedProperties detectedProperties; private BuilderImpl() { } private BuilderImpl(JobInput model) { key(model.key); frameRate(model.frameRate); resolution(model.resolution); aspectRatio(model.aspectRatio); interlaced(model.interlaced); container(model.container); encryption(model.encryption); timeSpan(model.timeSpan); inputCaptions(model.inputCaptions); detectedProperties(model.detectedProperties); } public final String getKey() { return key; } public final void setKey(String key) { this.key = key; } @Override public final Builder key(String key) { this.key = key; return this; } public final String getFrameRate() { return frameRate; } public final void setFrameRate(String frameRate) { this.frameRate = frameRate; } @Override public final Builder frameRate(String frameRate) { this.frameRate = frameRate; return this; } public final String getResolution() { return resolution; } public final void setResolution(String resolution) { this.resolution = resolution; } @Override public final Builder resolution(String resolution) { this.resolution = resolution; return this; } public final String getAspectRatio() { return aspectRatio; } public final void setAspectRatio(String aspectRatio) { this.aspectRatio = aspectRatio; } @Override public final Builder aspectRatio(String aspectRatio) { this.aspectRatio = aspectRatio; return this; } public final String getInterlaced() { return interlaced; } public final void setInterlaced(String interlaced) { this.interlaced = interlaced; } @Override public final Builder interlaced(String interlaced) { this.interlaced = interlaced; return this; } public final String getContainer() { return container; } public final void setContainer(String container) { this.container = container; } @Override public final Builder container(String container) { this.container = container; return this; } public final Encryption.Builder getEncryption() { return encryption != null ? encryption.toBuilder() : null; } public final void setEncryption(Encryption.BuilderImpl encryption) { this.encryption = encryption != null ? encryption.build() : null; } @Override public final Builder encryption(Encryption encryption) { this.encryption = encryption; return this; } public final TimeSpan.Builder getTimeSpan() { return timeSpan != null ? timeSpan.toBuilder() : null; } public final void setTimeSpan(TimeSpan.BuilderImpl timeSpan) { this.timeSpan = timeSpan != null ? timeSpan.build() : null; } @Override public final Builder timeSpan(TimeSpan timeSpan) { this.timeSpan = timeSpan; return this; } public final InputCaptions.Builder getInputCaptions() { return inputCaptions != null ? inputCaptions.toBuilder() : null; } public final void setInputCaptions(InputCaptions.BuilderImpl inputCaptions) { this.inputCaptions = inputCaptions != null ? inputCaptions.build() : null; } @Override public final Builder inputCaptions(InputCaptions inputCaptions) { this.inputCaptions = inputCaptions; return this; } public final DetectedProperties.Builder getDetectedProperties() { return detectedProperties != null ? detectedProperties.toBuilder() : null; } public final void setDetectedProperties(DetectedProperties.BuilderImpl detectedProperties) { this.detectedProperties = detectedProperties != null ? detectedProperties.build() : null; } @Override public final Builder detectedProperties(DetectedProperties detectedProperties) { this.detectedProperties = detectedProperties; return this; } @Override public JobInput build() { return new JobInput(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy