Class AVAssetWriter

  • All Implemented Interfaces:
    NSObject

    public class AVAssetWriter
    extends NSObject
    AVAssetWriter AVAssetWriter provides services for writing media data to a new file, Instances of AVAssetWriter can write media to new files in formats such as the QuickTime movie file format or the MPEG-4 file format. AVAssetWriter has support for automatic interleaving of media data for multiple concurrent tracks. Source media data can be obtained from instances of AVAssetReader for one or more assets or from other sources outside of AVFoundation. Instances of AVAssetWriter can re-encode media samples as they are written. Instances of AVAssetWriter can also optionally write metadata collections to the output file. A single instance of AVAssetWriter can be used once to write to a single file. Clients that wish to write to files multiple times must use a new instance of AVAssetWriter each time.
    • Constructor Detail

      • AVAssetWriter

        protected AVAssetWriter​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • assetWriterWithURLFileTypeError

        public static AVAssetWriter assetWriterWithURLFileTypeError​(NSURL outputURL,
                                                                    java.lang.String outputFileType,
                                                                    org.moe.natj.general.ptr.Ptr<NSError> outError)
        assetWriterWithURL:fileType:error: Returns an instance of AVAssetWriter configured to write to a file in a specified container format. Writing will fail if a file already exists at the specified URL. UTIs for container formats that can be written are declared in AVMediaFormat.h.
        Parameters:
        URL - The location of the file to be written. The URL must be a file URL.
        fileType - A UTI indicating the format of the file to be written.
        outError - On return, if initialization of the AVAssetWriter fails, points to an NSError describing the nature of the failure.
        Returns:
        An instance of AVAssetWriter.
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • addInput

        public void addInput​(AVAssetWriterInput input)
        addInput: Adds an input to the receiver. Inputs are created with a media type and output settings. These both must be compatible with the receiver. Inputs cannot be added after writing has started.
        Parameters:
        input - The AVAssetWriterInput object to be added.
      • addInputGroup

        public void addInputGroup​(AVAssetWriterInputGroup inputGroup)
        addInputGroup: Adds an instance of AVAssetWriterInputGroup to the AVAssetWriter. The AVAssetWriter will mark the tracks associated with grouped inputs as mutually exclusive to each other for playback or other processing, if the output container format supports mutually exlusive relationships among tracks. When an input group is added to an AVAssetWriter, the value of marksOutputTrackAsEnabled will automatically be set to YES for the default input and set to NO for all of the other inputs in the group. Input groups cannot be added after writing has started.
        Parameters:
        inputGroup - The collection of AVAssetWriterInputs to be grouped together.
      • availableMediaTypes

        public NSArray<java.lang.String> availableMediaTypes()
        [@property] availableMediaTypes The media types for which inputs can be added to the receiver. Some media types may not be accepted within the file format with which an AVAssetWriter was initialized.
      • canAddInput

        public boolean canAddInput​(AVAssetWriterInput input)
        canAddInput: Tests whether an input can be added to the receiver. An input that accepts media data of a type that is not compatible with the receiver, or with output settings that are not compatible with the receiver, cannot be added.
        Parameters:
        input - The AVAssetWriterInput object to be tested.
        Returns:
        A BOOL indicating whether the input can be added to the receiver.
      • canAddInputGroup

        public boolean canAddInputGroup​(AVAssetWriterInputGroup inputGroup)
        canAddInputGroup: Tests whether an input group can be added to the receiver. If outputFileType specifies a container format that does not support mutually exclusive relationships among tracks, or if the specified instance of AVAssetWriterInputGroup contains inputs with media types that cannot be related, the group cannot be added to the AVAssetWriter.
        Parameters:
        inputGroup - The AVAssetWriterInputGroup object to be tested.
        Returns:
        A BOOL indicating whether the input group can be added to the receiver.
      • canApplyOutputSettingsForMediaType

        public boolean canApplyOutputSettingsForMediaType​(NSDictionary<java.lang.String,​?> outputSettings,
                                                          java.lang.String mediaType)
        canApplyOutputSettings:forMediaType: Tests whether output settings for a specific media type are supported by the receiver's file format. This method determines whether the output settings for the specified media type can be used with the receiver's file format. For example, video compression settings that specify H.264 compression are not compatible with file formats that cannot contain H.264-compressed video. Attempting to add an input with output settings and a media type for which this method returns NO will cause an exception to be thrown.
        Parameters:
        outputSettings - The output settings that are to be tested.
        mediaType - The media type for which the output settings are to be tested. Media types are defined in AVMediaFormat.h.
        Returns:
        A BOOL indicating whether the given output settings can be used for the given media type.
      • cancelWriting

        public void cancelWriting()
        cancelWriting Cancels the creation of the output file. If the status of the receiver is "failed" or "completed," -cancelWriting is a no-op. Otherwise, this method will block until writing is canceled. If an output file was created by the receiver during the writing process, -cancelWriting will delete the file. This method should not be called concurrently with -[AVAssetWriterInput appendSampleBuffer:] or -[AVAssetWriterInputPixelBufferAdaptor appendPixelBuffer:withPresentationTime:].
      • directoryForTemporaryFiles

        public NSURL directoryForTemporaryFiles()
        [@property] directoryForTemporaryFiles Specifies a directory that is suitable for containing temporary files generated during the process of writing an asset. AVAssetWriter may need to write temporary files when configured in certain ways, such as when performsMultiPassEncodingIfSupported is set to YES on one or more of its inputs. This property can be used to control where in the filesystem those temporary files are created. All temporary files will be deleted when asset writing is completed, is canceled, or fails. When the value of this property is nil, the asset writer will choose a suitable location when writing temporary files. The default value is nil. This property cannot be set after writing has started. The asset writer will fail if a file cannot be created in this directory (for example, due to insufficient permissions).
      • endSessionAtSourceTime

        public void endSessionAtSourceTime​(CMTime endTime)
        endSessionAtSourceTime: Concludes a sample-writing session. Call this method to complete a session started with -startSessionAtSourceTime:. The endTime defines the moment on the timeline of source samples at which the session ends. In the case of the QuickTime movie file format, each sample-writing session's startTime...endTime pair corresponds to a period of movie time into which the session's samples are inserted. Samples with timestamps that are later than the session end time will still be added to the written file but will be edited out (i.e. not presented during playback). So if the first session has duration D1 = endTime - startTime, it will be inserted into the written file at time 0 through D1; the second session would be inserted into the written file at time D1 through D1+D2, etc. It is legal to have a session with no samples; this will cause creation of an empty edit of the prescribed duration. It is not mandatory to call -endSessionAtSourceTime:; if -finishWritingWithCompletionHandler: is called without first invoking -endSessionAtSourceTime:, the session's effective end time will be the latest end timestamp of the session's appended samples (i.e. no samples will be edited out at the end). It is an error to append samples outside of a sample-writing session. To append more samples after invoking -endSessionAtSourceTime:, you must first start a new session using -startSessionAtSourceTime:. NOTE: Multiple sample-writing sessions are currently not supported. It is an error to call -startSessionAtSourceTime: a second time after calling -endSessionAtSourceTime:.
        Parameters:
        endTime - The ending asset time for the sample-writing session, in the timeline of the source samples.
      • error

        public NSError error()
        [@property] error If the receiver's status is AVAssetWriterStatusFailed, this describes the error that caused the failure. The value of this property is an NSError that describes what caused the receiver to no longer be able to write to its output file. If the receiver's status is not AVAssetWriterStatusFailed, the value of this property is nil. This property is thread safe.
      • finishWriting

        @Deprecated
        public boolean finishWriting()
        Deprecated.
        finishWriting Completes the writing of the output file. This method is deprecated. Use finishWritingWithCompletionHandler: instead. This method will block until writing is finished. When this method returns successfully, the file being written by the receiver is complete and ready to use. Because this method is blocking and can take a long time to execute (especially with shouldOptimizeForNetworkUse set to YES), it should not be called from the main thread. Doing so can cause the finishWriting operation to fail. If writing cannot be finished, this method returns NO. Clients can check the values of the status and error properties for more information on why writing could not be finished. This method should not be called concurrently with -[AVAssetWriterInput appendSampleBuffer:] or -[AVAssetWriterInputPixelBufferAdaptor appendPixelBuffer:withPresentationTime:].
        Returns:
        A BOOL indicating whether writing successfully finished.
      • finishWritingWithCompletionHandler

        public void finishWritingWithCompletionHandler​(AVAssetWriter.Block_finishWritingWithCompletionHandler handler)
        finishWritingWithCompletionHandler: Marks all unfinished inputs as finished and completes the writing of the output file. This method returns immediately and causes its work to be performed asynchronously. When the writing of the output file is finished, or if a failure or a cancellation occurs in the meantime, the specified handler will be invoked to indicate completion of the operation. To determine whether the operation succeeded, your handler can check the value of AVAssetWriter.status. If the status is AVAssetWriterStatusFailed, AVAsset.error will contain an instance of NSError that describes the failure. To guarantee that all sample buffers are successfully written, ensure all calls to -[AVAssetWriterInput appendSampleBuffer:] or -[AVAssetWriterInputPixelBufferAdaptor appendPixelBuffer:withPresentationTime:] have returned before invoking this method.
      • initWithURLFileTypeError

        public AVAssetWriter initWithURLFileTypeError​(NSURL outputURL,
                                                      java.lang.String outputFileType,
                                                      org.moe.natj.general.ptr.Ptr<NSError> outError)
        initWithURL:fileType:error: Creates an instance of AVAssetWriter configured to write to a file in a specified container format. Writing will fail if a file already exists at the specified URL. UTIs for container formats that can be written are declared in AVMediaFormat.h.
        Parameters:
        URL - The location of the file to be written. The URL must be a file URL.
        fileType - A UTI indicating the format of the file to be written.
        outError - On return, if initialization of the AVAssetWriter fails, points to an NSError describing the nature of the failure.
        Returns:
        An instance of AVAssetWriter.
      • inputGroups

        public NSArray<? extends AVAssetWriterInputGroup> inputGroups()
        [@property] inputGroups The instances of AVAssetWriterInputGroup that have been added to the AVAssetWriter. The value of this property is an NSArray containing concrete instances of AVAssetWriterInputGroup. Input groups can be added to the receiver using the addInputGroup: method.
      • inputs

        public NSArray<? extends AVAssetWriterInput> inputs()
        [@property] inputs The inputs from which the asset writer receives media data. The value of this property is an NSArray containing concrete instances of AVAssetWriterInput. Inputs can be added to the receiver using the addInput: method.
      • metadata

        public NSArray<? extends AVMetadataItem> metadata()
        [@property] metadata A collection of metadata to be written to the receiver's output file. The value of this property is an array of AVMetadataItem objects representing the collection of top-level metadata to be written in the output file. This property cannot be set after writing has started.
      • movieFragmentInterval

        public CMTime movieFragmentInterval()
        [@property] movieFragmentInterval For file types that support movie fragments, specifies the frequency at which movie fragments should be written. When movie fragments are used, a partially written asset whose writing is unexpectedly interrupted can be successfully opened and played up to multiples of the specified time interval. The default value of this property is kCMTimeInvalid, which indicates that movie fragments should not be used. This property cannot be set after writing has started.
      • movieTimeScale

        public int movieTimeScale()
        [@property] movieTimeScale For file types that contain a 'moov' atom, such as QuickTime Movie files, specifies the asset-level time scale to be used. The default value is 0, which indicates that the receiver should choose a convenient value, if applicable. This property cannot be set after writing has started.
      • outputFileType

        public java.lang.String outputFileType()
        [@property] outputFileType The UTI of the file format of the file for which the instance of AVAssetWriter was initialized for writing.
      • outputURL

        public NSURL outputURL()
        [@property] outputURL The location of the file for which the instance of AVAssetWriter was initialized for writing. You may use UTTypeCopyPreferredTagWithClass(outputFileType, kUTTagClassFilenameExtension) to obtain an appropriate path extension for the outputFileType you have specified. For more information about UTTypeCopyPreferredTagWithClass and kUTTagClassFilenameExtension, on iOS see and on Mac OS X see .
      • overallDurationHint

        public CMTime overallDurationHint()
        [@property] overallDurationHint For file types that support movie fragments, provides a hint of the final duration of the file to be written The value of this property must be a nonnegative, numeric CMTime. Alternatively, if the value of this property is an invalid CMTime (e.g. kCMTimeInvalid), no overall duration hint will be written to the file. The default value is kCMTimeInvalid. This property is currently ignored if movie fragments are not being written. Use the movieFragmentInterval property to enable movie fragments. This property cannot be set after writing has started.
      • setDirectoryForTemporaryFiles

        public void setDirectoryForTemporaryFiles​(NSURL value)
        [@property] directoryForTemporaryFiles Specifies a directory that is suitable for containing temporary files generated during the process of writing an asset. AVAssetWriter may need to write temporary files when configured in certain ways, such as when performsMultiPassEncodingIfSupported is set to YES on one or more of its inputs. This property can be used to control where in the filesystem those temporary files are created. All temporary files will be deleted when asset writing is completed, is canceled, or fails. When the value of this property is nil, the asset writer will choose a suitable location when writing temporary files. The default value is nil. This property cannot be set after writing has started. The asset writer will fail if a file cannot be created in this directory (for example, due to insufficient permissions).
      • setMetadata

        public void setMetadata​(NSArray<? extends AVMetadataItem> value)
        [@property] metadata A collection of metadata to be written to the receiver's output file. The value of this property is an array of AVMetadataItem objects representing the collection of top-level metadata to be written in the output file. This property cannot be set after writing has started.
      • setMovieFragmentInterval

        public void setMovieFragmentInterval​(CMTime value)
        [@property] movieFragmentInterval For file types that support movie fragments, specifies the frequency at which movie fragments should be written. When movie fragments are used, a partially written asset whose writing is unexpectedly interrupted can be successfully opened and played up to multiples of the specified time interval. The default value of this property is kCMTimeInvalid, which indicates that movie fragments should not be used. This property cannot be set after writing has started.
      • setMovieTimeScale

        public void setMovieTimeScale​(int value)
        [@property] movieTimeScale For file types that contain a 'moov' atom, such as QuickTime Movie files, specifies the asset-level time scale to be used. The default value is 0, which indicates that the receiver should choose a convenient value, if applicable. This property cannot be set after writing has started.
      • setOverallDurationHint

        public void setOverallDurationHint​(CMTime value)
        [@property] overallDurationHint For file types that support movie fragments, provides a hint of the final duration of the file to be written The value of this property must be a nonnegative, numeric CMTime. Alternatively, if the value of this property is an invalid CMTime (e.g. kCMTimeInvalid), no overall duration hint will be written to the file. The default value is kCMTimeInvalid. This property is currently ignored if movie fragments are not being written. Use the movieFragmentInterval property to enable movie fragments. This property cannot be set after writing has started.
      • setShouldOptimizeForNetworkUse

        public void setShouldOptimizeForNetworkUse​(boolean value)
        [@property] shouldOptimizeForNetworkUse Specifies whether the output file should be written in way that makes it more suitable for playback over a network When the value of this property is YES, the output file will be written in such a way that playback can start after only a small amount of the file is downloaded. This property cannot be set after writing has started.
      • shouldOptimizeForNetworkUse

        public boolean shouldOptimizeForNetworkUse()
        [@property] shouldOptimizeForNetworkUse Specifies whether the output file should be written in way that makes it more suitable for playback over a network When the value of this property is YES, the output file will be written in such a way that playback can start after only a small amount of the file is downloaded. This property cannot be set after writing has started.
      • startSessionAtSourceTime

        public void startSessionAtSourceTime​(CMTime startTime)
        startSessionAtSourceTime: Initiates a sample-writing session for the receiver. Sequences of sample data appended to the asset writer inputs are considered to fall within "sample-writing sessions", initiated with this method. Accordingly, this method must be called after writing has started (using -startWriting) but before any sample data is appended to the receiver's inputs. Each writing session has a start time which, where allowed by the file format being written, defines the mapping from the timeline of source samples to the timeline of the written file. In the case of the QuickTime movie file format, the first session begins at movie time 0, so a sample appended with timestamp T will be played at movie time (T-startTime). Samples with timestamps earlier than startTime will still be added to the output file but will be edited out (i.e. not presented during playback). If the earliest appended sample for an input has a timestamp later than than startTime, an empty edit will be inserted to preserve synchronization between tracks of the output asset. To end the session started by use of this method, use -endSessionAtSourceTime: or -finishWritingWithCompletionHandler:. It is an error to invoke -startSessionAtSourceTime: twice in a row without invoking -endSessionAtSourceTime: in between. NOTE: Multiple sample-writing sessions are currently not supported. It is an error to call -startSessionAtSourceTime: a second time after calling -endSessionAtSourceTime:.
        Parameters:
        startTime - The starting asset time for the sample-writing session, in the timeline of the source samples.
      • startWriting

        public boolean startWriting()
        startWriting Prepares the receiver for accepting input and for writing its output to its output file. This method must be called after all inputs have been added and other configuration properties have been set in order to tell the receiver to prepare for writing. After this method is called, clients can start writing sessions using startSessionAtSourceTime: and can write media samples using the methods provided by each of the receiver's inputs. If writing cannot be started, this method returns NO. Clients can check the values of the status and error properties for more information on why writing could not be started. On iOS, if the status of an AVAssetWriter is AVAssetWriterStatusWriting when the client app goes into the background, its status will change to AVAssetWriterStatusFailed and appending to any of its inputs will fail. You may want to use -[UIApplication beginBackgroundTaskWithExpirationHandler:] to avoid being interrupted in the middle of a writing session and to finish writing the data that has already been appended. For more information about executing code in the background, see the iOS Application Programming Guide.
        Returns:
        A BOOL indicating whether writing successfully started.
      • status

        public long status()
        [@property] status The status of writing samples to the receiver's output file. The value of this property is an AVAssetWriterStatus that indicates whether writing is in progress, has completed successfully, has been canceled, or has failed. Clients of AVAssetWriterInput objects should check the value of this property after appending samples fails to determine why no more samples could be written. This property is thread safe.
      • delegate

        public AVAssetWriterDelegate delegate()
        [@property] delegate An object that implements one or more of the methods in the AVAssetWriterDelegate protocol. This property cannot be set after writing has started.
      • flushSegment

        public void flushSegment()
        flushSegment Closes the current segment and outputs it to the -assetWriter:didOutputSegmentData:segmentType:segmentReport: or -assetWriter:didOutputSegmentData:segmentType: delegate method. Use this method only when the value of preferredOutputSegmentInterval property is set to kCMTimeIndefinite.
      • initWithContentType

        public AVAssetWriter initWithContentType​(UTType outputContentType)
        initWithContentType: Creates an instance of AVAssetWriter configured to output segment data in a specified container format. Clients that want to receive segment data through the -assetWriter:didOutputSegmentData:segmentType:segmentReport: or -assetWriter:didOutputSegmentData:segmentType: delegate method should use this initializer instead of -initWithURL:fileType:error:. Clients may use +typeWithIdentifier: with a UTI to create an instance of UTType. See . UTIs for container formats that can be output are declared in AVMediaFormat.h.
        Parameters:
        outputContentType - A UTType indicating the format of the segment data to be output.
        Returns:
        An instance of AVAssetWriter.
      • initialMovieFragmentSequenceNumber

        public long initialMovieFragmentSequenceNumber()
        [@property] initialMovieFragmentSequenceNumber For file types that support movie fragments, specifies the initial movie fragment sequence number. The value must be equal to or greater than 1. The default value is 1. Note that if you combine movie fragments produced by an instance of AVAssetWriter with additional movie fragments, produced either by a different instance of AVAssetWriter or by some other means, it is necessary to ensure that movie fragment sequence numbers increase monotonically across the entire combined collection, in temporal order. This property cannot be set after writing has started.
      • initialSegmentStartTime

        public CMTime initialSegmentStartTime()
        [@property] initialSegmentStartTime Specifies start time of initial segment. A numeric time must be set if the value of preferredOutputSegmentInterval property is positive numeric. If not, this property is irrelevant. This property cannot be set after writing has started.
      • outputFileTypeProfile

        public java.lang.String outputFileTypeProfile()
        [@property] outputFileTypeProfile Specifies a file type profile for the specified file type. The default value is nil, which means that the receiver will choose an appropriate default profile based on the specified file type. Clients that want to receive segment data that is suitable for streaming through the -assetWriter:didOutputSegmentData:segmentType:segmentReport: or -assetWriter:didOutputSegmentData:segmentType: delegate method should set AVFileTypeProfileMPEG4AppleHLS, or AVFileTypeProfileMPEG4CMAFCompliant to require output that is specifically compliant with CMAF format, with AVFileTypeMPEG4 file type. File type profiles are declared in AVMediaFormat.h. This property cannot be set after writing has started.
      • preferredOutputSegmentInterval

        public CMTime preferredOutputSegmentInterval()
        [@property] preferredOutputSegmentInterval Specifies preferred segment interval. The default value is kCMTimeInvalid, which means that the receiver will choose an appropriate default value. The value can be set to positive numeric or kCMTimeIndefinite. If the value is kCMTimeIndefinite, every time a client calls -flushSegment the receiver outputs a segment data. This property cannot be set after writing has started.
      • producesCombinableFragments

        public boolean producesCombinableFragments()
        [@property] producesCombinableFragments For file types that support fragmented MPEG-4, specifies whether the movie fragments should be produced in way that makes them suitable for combining with movie fragments produced by one or more other instances of AVAssetWriter into a single fragment stream of uniform encoding. The default value is NO. When multiple instances of AVAssetWriter are used to produce distinct streams that complement each other, for example to create HLS encoding or bitrate variants, it’s not necessary to set this property to YES. This property cannot be set after writing has started.
      • setDelegate_unsafe

        public void setDelegate_unsafe​(AVAssetWriterDelegate value)
        [@property] delegate An object that implements one or more of the methods in the AVAssetWriterDelegate protocol. This property cannot be set after writing has started.
      • setDelegate

        public void setDelegate​(AVAssetWriterDelegate value)
        [@property] delegate An object that implements one or more of the methods in the AVAssetWriterDelegate protocol. This property cannot be set after writing has started.
      • setInitialMovieFragmentSequenceNumber

        public void setInitialMovieFragmentSequenceNumber​(long value)
        [@property] initialMovieFragmentSequenceNumber For file types that support movie fragments, specifies the initial movie fragment sequence number. The value must be equal to or greater than 1. The default value is 1. Note that if you combine movie fragments produced by an instance of AVAssetWriter with additional movie fragments, produced either by a different instance of AVAssetWriter or by some other means, it is necessary to ensure that movie fragment sequence numbers increase monotonically across the entire combined collection, in temporal order. This property cannot be set after writing has started.
      • setInitialSegmentStartTime

        public void setInitialSegmentStartTime​(CMTime value)
        [@property] initialSegmentStartTime Specifies start time of initial segment. A numeric time must be set if the value of preferredOutputSegmentInterval property is positive numeric. If not, this property is irrelevant. This property cannot be set after writing has started.
      • setOutputFileTypeProfile

        public void setOutputFileTypeProfile​(java.lang.String value)
        [@property] outputFileTypeProfile Specifies a file type profile for the specified file type. The default value is nil, which means that the receiver will choose an appropriate default profile based on the specified file type. Clients that want to receive segment data that is suitable for streaming through the -assetWriter:didOutputSegmentData:segmentType:segmentReport: or -assetWriter:didOutputSegmentData:segmentType: delegate method should set AVFileTypeProfileMPEG4AppleHLS, or AVFileTypeProfileMPEG4CMAFCompliant to require output that is specifically compliant with CMAF format, with AVFileTypeMPEG4 file type. File type profiles are declared in AVMediaFormat.h. This property cannot be set after writing has started.
      • setPreferredOutputSegmentInterval

        public void setPreferredOutputSegmentInterval​(CMTime value)
        [@property] preferredOutputSegmentInterval Specifies preferred segment interval. The default value is kCMTimeInvalid, which means that the receiver will choose an appropriate default value. The value can be set to positive numeric or kCMTimeIndefinite. If the value is kCMTimeIndefinite, every time a client calls -flushSegment the receiver outputs a segment data. This property cannot be set after writing has started.
      • setProducesCombinableFragments

        public void setProducesCombinableFragments​(boolean value)
        [@property] producesCombinableFragments For file types that support fragmented MPEG-4, specifies whether the movie fragments should be produced in way that makes them suitable for combining with movie fragments produced by one or more other instances of AVAssetWriter into a single fragment stream of uniform encoding. The default value is NO. When multiple instances of AVAssetWriter are used to produce distinct streams that complement each other, for example to create HLS encoding or bitrate variants, it’s not necessary to set this property to YES. This property cannot be set after writing has started.