Classes

The following classes are available globally.

  • A class that reads in audio and video samples and produces fragmented mp4’s and playlists

    Usage Example:

    // URL to a temp dir
    let outputDir   = URL(fileURLWithPath: NSTemporaryDirectory(), isDirectory: true)
    let writer      = FragmentedMP4Writer(outputDir) // setup the writer without any options
    writer.configure(settings: videoSettings) // Pass in video settings config
    writer.configure(settings: audioSettings) // Pass in audio settings confg
    
    // Specify a hls vod style playlist (file will appear in outputDir/vod.m3u8)
    let playlist = Playlist(type: .hls_vod, fileName: "vod.m3u8")
    try writer.add(playlist: playlist)
    
    // Append some samples
    writer.append(compressedSample)
    
    // Signal when complete.  All queued samples in the writer will be immediately flushed.
    writer.stop()
    
    See more

    Declaration

    Swift

    public class FragmentedMP4Writer