EFVideoFormat

public enum EFVideoFormat

Supported video formats for QR code animation export.

This enum defines the video formats that can be used to export animated QR codes as video files. Each format has different characteristics in terms of compatibility, file size, and quality.

## Supported Formats

  • MOV: Apple’s native format, best compatibility with Apple ecosystem
  • MP4: Widely supported format, good for cross-platform use
  • M4V: Apple’s container format, optimized for iTunes and Apple devices

## Usage

 let generator = try EFQRCode.Generator("Hello World")

 // Export as MOV video
 let movData = try generator.toMovData(width: 200)

 // Export as MP4 video
 let mp4Data = try generator.toMp4Data(width: 200)

 // Export as M4V video
 let m4vData = try generator.toM4vData(width: 200)

## Format Comparison

| Format | Apple Ecosystem | Cross-Platform | File Size | Quality | |——–|—————–|—————–|———–|———| | MOV | Excellent | Good | Medium | High | | MP4 | Good | Excellent | Small | High | | M4V | Excellent | Limited | Medium | High |

## Requirements

  • AVFoundation framework must be available
  • Not available on watchOS
  • mov

    QuickTime Movie format (MOV).

    Declaration

    Swift

    case mov
  • mp4

    MPEG-4 format (MP4).

    Declaration

    Swift

    case mp4
  • m4v

    Apple’s M4V container format.

    Declaration

    Swift

    case m4v
  • The file extension for the video format.

    This property provides the standard file extension for the video format, useful for saving files with the correct extension.

    Declaration

    Swift

    public var fileExtension: String { get }

    Return Value

    The file extension string (e.g., “mov”, “mp4”, “m4v”).