AVTransform
public class AVTransform : Transform
Converts a video or audio to a different format, resolution, sample rate, etc.
-
Initializes an
AVTransformobject.Declaration
Swift
public init()
-
Adds the
presetoption.Declaration
Swift
@discardableResult func preset(_ value: String) -> SelfParameters
valueThe format to convert to. See (File Processing - Video Conversion)[https://www.filestack.com/docs/video-transformations] for more information about supported presets.
-
Adds the
forceoption.Declaration
Swift
@discardableResult func force(_ value: Bool) -> SelfParameters
valueRestarts completed or pending video encoding. If a transcoding fails, and you make the same request again, it will not restart the transcoding process unless this parameter is set to
true. -
Adds the
widthoption.Declaration
Swift
@discardableResult func width(_ value: Int) -> SelfParameters
valueSet the width in pixels of the video that is generated by the transcoding process.
-
Adds the
heightoption.Declaration
Swift
@discardableResult func height(_ value: Int) -> SelfParameters
valueSet the height in pixels of the video that is generated by the transcoding process.
-
Adds the
titleoption.Declaration
Swift
@discardableResult func title(_ value: String) -> SelfParameters
valueSet the title in the file metadata.
-
Adds the
extNameoption.Declaration
Swift
@discardableResult func extName(_ value: String) -> SelfParameters
valueSet the file extension for the video that is generated by the transcoding process.
-
Adds the
fileNameoption.Declaration
Swift
@discardableResult func fileName(_ value: String) -> SelfParameters
valueSet the filename of the video that is generated by the transcoding process.
-
Adds the
locationoption.Declaration
Swift
@discardableResult func location(_ value: StorageLocation) -> SelfParameters
valueAn
StorageLocationvalue. -
Adds the
pathoption.Declaration
Swift
@discardableResult func path(_ value: String) -> SelfParameters
valueThe path to store the file at within the specified file store. For S3, this is the key where the file will be stored at. By default, Filestack stores the file at the root at a unique id, followed by an underscore, followed by the filename, for example:
3AB239102DB_myvideo.mp4. -
Adds the
accessoption.Declaration
Swift
@discardableResult func access(_ value: StorageAccess) -> SelfParameters
valueAn
StorageAccessvalue. -
Adds the
containeroption.Declaration
Swift
@discardableResult func container(_ value: String) -> SelfParameters
valueThe bucket or container in the specified file store where the file should end up.
-
Adds the
upscaleoption.Declaration
Swift
@discardableResult func upscale(_ value: Bool) -> SelfParameters
valueUpscale the video resolution to match your profile. Defaults to
true. -
Adds the
aspectModeoption.Declaration
Swift
@discardableResult func aspectMode(_ value: TransformAspectMode) -> SelfParameters
valueAn
TransformAspectModevalue. -
Adds the
twoPassoption.Declaration
Swift
@discardableResult func twoPass(_ value: Bool) -> SelfParameters
valueSpecify that the transcoding process should do two passes to improve video quality. Defaults to
false. -
Adds the
videoBitRateoption.Declaration
Swift
@discardableResult func videoBitRate(_ value: Int) -> SelfParameters
valueSpecify the video bitrate for the video that is generated by the transcoding process. Valid range:
1...5000 -
Adds the
fpsoption.Declaration
Swift
@discardableResult func fps(_ value: Int) -> SelfParameters
valueSpecify the frames per second of the video that is generated by the transcoding process. Valid range:
1...300. If ommited, uses the original fps of the source file. -
Adds the
keyframeIntervaloption.Declaration
Swift
@discardableResult func keyframeInterval(_ value: Int) -> SelfParameters
valueAdds a key frame every
keyframeIntervalframes to the video that is generated by the transcoding process. Default is250. -
Adds the
audioBitRateoption.Declaration
Swift
@discardableResult func audioBitRate(_ value: Int) -> SelfParameters
valueSets the audio bitrate for the video that is generated by the transcoding process. Valid range:
0...999 -
Adds the
audioSampleRateoption.Declaration
Swift
@discardableResult func audioSampleRate(_ value: Int) -> SelfParameters
valueSet the audio sample rate for the video that is generated by the transcoding process. Valid range:
0...99999. Default is44100. -
Adds the
audioChannelsoption.Declaration
Swift
@discardableResult func audioChannels(_ value: Int) -> SelfParameters
valueSet the number of audio channels for the video that is generated by the transcoding process. Valid range:
1...12. Default is same as source video. -
Adds the
clipLengthoption.Declaration
Swift
@discardableResult func clipLength(_ value: String) -> SelfParameters
valueSet the length of the video that is generated by the transcoding process. Valid format should include hours, minutes and seconds.
-
Adds the
clipOffsetoption.Declaration
Swift
@discardableResult func clipOffset(_ value: String) -> SelfParameters
valueSet the point to begin the video clip from. For example,
00:00:10will start the video transcode 10 seconds into the source video. Valid format should include hours, minutes and seconds. -
Adds the
watermarkURLoption.Declaration
Swift
@discardableResult func watermarkURL(_ value: URL) -> SelfParameters
valueThe Filestack handle or URL of the image file to use as a watermark on the transcoded video.
-
Adds the
watermarkTopoption.Declaration
Swift
@discardableResult func watermarkTop(_ value: Int) -> SelfParameters
valueThe distance from the top of the video frame to place the watermark on the video. Valid range:
0...9999 -
Adds the
watermarkBottomoption.Declaration
Swift
@discardableResult func watermarkBottom(_ value: Int) -> SelfParameters
valueThe distance from the bottom of the video frame to place the watermark on the video. Valid range:
0...9999 -
Adds the
watermarkLeftoption.Declaration
Swift
@discardableResult func watermarkLeft(_ value: Int) -> SelfParameters
valueThe distance from the left of the video frame to place the watermark on the video. Valid range:
0...9999 -
Adds the
watermarkRightoption.Declaration
Swift
@discardableResult func watermarkRight(_ value: Int) -> SelfParameters
valueThe distance from the right of the video frame to place the watermark on the video. Valid range:
0...9999 -
Adds the
watermarkWidthoption.Declaration
Swift
@discardableResult func watermarkWidth(_ value: Int) -> SelfParameters
valueResize the width of the watermark.
-
Adds the
watermarkHeightoption.Declaration
Swift
@discardableResult func watermarkHeight(_ value: Int) -> SelfParameters
valueResize the height of the watermark.
View on GitHub
AVTransform Class Reference