Welcome to the wiki talking about FFmpeg on Windows.

FFEncoder OutputOptions

Most of the members of TInputOptions and TOutputOptions are according to the parameters of ffmpeg command line tool. Please refer to http://www.ffmpeg.org/ffmpeg-doc.html for detail.

Abbreviations

  • PCR - Program Clock Reference
  • STC - System Time Clock
  • SCR - System Clock Reference
  • PTS - Presentation Time Stamp
  • DTS - Decode Time Stamp

Enumerations

  TOptionTargetType = (ttIgnore, ttVCD, ttSVCD, ttDVD);
  TOptionNormType = (ntAuto, ntPAL, ntNTSC);
  TOptionNormDefault = ntPAL..ntNTSC;

StreamInfo

  (* stream info *)
  TStreamInfo = record
    // -timestamp time: set the timestamp
    TimeStamp: TDateTime;  // !!! differ with FFmpeg parameter
    // -metadata year=number: set the year
    Year: Integer;  (**< ID3 year, 0 if none *)
    // -metadata track=number: set the track
    Track: Integer; (**< track number, 0 if none *)
    // -metadata title=string: set the title
    Title: AnsiString;
    // -metadata author=string: set the author
    Author: AnsiString;
    // -metadata copyright=string: set the copyright
    Copyright: AnsiString;
    // -metadata comment=string: set the comment
    Comment: AnsiString;
    // -metadata album=string: set the album
    Album: AnsiString;
    // -metadata genre=string: set the genre
    Genre: AnsiString; (**< ID3 genre *)
  end;

OutputOptions

  POutputOptions = ^TOutputOptions;
  TOutputOptions = record
    FileName: WideString;
    FileExt: string;
 
    // -f fmt: force format
    ForceFormat: string;
 
    // -packetsize <int>: E.... set packet size
    PacketSize: Integer;
    // -muxrate <int>: E.... set mux rate
    MuxRate: Integer;
    // -muxdelay seconds: set the maximum demux-decode delay
    MuxDelay: Single;
    // -muxpreload seconds: set the initial demux-decode delay
    MuxPreload: Single;
 
    // -acodec codec: force audio codec ('copy' to copy stream)
    AudioCodec: string;
    // -apre preset: set the audio options to the indicated preset
    AudioPreset: string;
    // -an: disable audio
    DisableAudio: Boolean;
    // -vol volume: change audio volume (256=normal)
    AudioVolume: Integer;
    // -ac channels: set number of audio channels
    AudioChannels: Integer;
    // -ar rate: set audio sampling rate (in Hz)
    AudioSampleRate: Integer;
    // -ab bitrate: set bitrate (in bits/s)
    AudioBitrate: Integer;
    // -abt <int>: E.A.. set audio bitrate tolerance (in bits/s)
    AudioBitRateTolerance: Integer;
    // -alang code: set the ISO 639 language code (3 letters) of the current audio stream
    AudioLanguage: string;
    // -async: audio sync method
    AudioSyncMethod: Integer;
    // -atag fourcc/tag: force audio tag/fourcc
    AudioTag: string;
 
    // -vcodec codec: force video codec ('copy' to copy stream)
    VideoCodec: string;
    // -vpre preset: set the video options to the indicated preset
    VideoPreset: string;
    // -vn: disable video
    DisableVideo: Boolean;
    // -r fps: set frame rate (Hz value, fraction or abbreviation)
    FrameRate: string;
    // -s size: set frame size (WxH or abbreviation)
    FrameSize: string;
    // -aspect aspect: set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)
    FrameAspectRatio: string;
    // -croptop size: set top crop band size (in pixels)
    CropTop: Integer;
    // -cropbottom size: set bottom crop band size (in pixels)
    CropBottom: Integer;
    // -cropleft size: set left crop band size (in pixels)
    CropLeft: Integer;
    // -cropright size: set right crop band size (in pixels)
    CropRight: Integer;
 
    // -g gop_size: set the group of pictures size
    GroupPictureSize: Integer;
    // -b/vb bitrate: set bitrate (in bits/s)
    VideoBitrate: Integer;
    // -maxrate bitrate: set max video bitrate (in bit/s)
    VideoMaxRate: Integer;
    // -minrate bitrate: Set min video bitrate (in bit/s)
    VideoMinRate: Integer;
    // -bt <int>: E.V.. set video bitrate tolerance (in bits/s)
    VideoBitRateTolerance: Integer;
    // -bufsize size: Set video buffer verifier buffer size (in bits)
    VideoBufSize: Integer;
    // -vsync: video sync method
    VideoSyncMethod: Integer;
    // -vtag fourcc/tag: force video tag/fourcc
    VideoTag: string;
    // -vfilters filter list: video filters
    VideoFilters: string;
    // -vlang code: set the ISO 639 language code (3 letters) of the current video stream
    VideoLanguage: string;
 
    // -scodec codec: force subtitle codec ('copy' to copy stream)
    SubtitleCodec: string;
    // -spre preset: set the subtitle options to the indicated preset
    SubtitlePreset: string;
    // -sn: disable subtitle
    DisableSubtitle: Boolean;
    // -slang code: set the ISO 639 language code (3 letters) of the current subtitle stream
    SubtitleLanguage: string;
 
    // Audio/Video grab options:
    // -isync: sync read on input
    InputSync: Boolean;
 
    // -copyts: copy timestamps
    CopyTimestamp: Boolean;
    // -ss position: set the start time offset
    TimeStart: Int64; // microsecond!!! differ with FFmpeg parameter
    // -t duration: record or transcode "duration" seconds of audio/video
    TimeLength: Int64; // microsecond!!! differ with FFmpeg parameter
    Info: TStreamInfo;
 
    // -target type: specify target file type
    // ("vcd", "svcd", "dvd", "dv", "dv50", "pal-vcd", "ntsc-svcd", ...)
    TargetType: TOptionTargetType;
    NormType: TOptionNormType;
    NormDefault: TOptionNormDefault;
 
    // whether enable OnAudioHook event
    AudioHook: Boolean;
 
    // whether enable OnVideoInputHook event
    VideoInputHook: Boolean;
    // whether enable OnVideoOutputHook event
    VideoOutputHook: Boolean;
    // specifies the number of adjacent color bits on each plane needed to define a pixel.
    // one of (8, 15[555, BI_RGB], 16[565, BI_BITFIELDS], 24, 32),
    // default is 24 for VCL and 32 for ActiveX
    VideoHookBitsPixel: Integer;
 
    // join all input files to this one output file
    Join: Boolean;
 
    // extended options for flexibility
    // Format: name1=value1<CRLF>name2=value2<CRLF>...nameN=valueN<CRLF>
    //         name and value correspond to ffmpeg.exe's parameters
    //         e.g. "pix_fmt=yuv422p<CRLF>aspect=16:9<CRLF>"
    ExtOptions: string;
 
    // used for your special purpose
    Tag: Integer;
    Data: Pointer;
  end;

OutputOptions Initialization

Print/export