reference.md

July 14, 2026 · View on GitHub

Component reference

TFFReader (uFFReader.pas)

PropertiesFileName, InputAdapter, Active, AutoPump, Duration (µs), Streams
MethodsOpen, Close, ReadPacket, Seek (µs; StreamIndex = -1AV_TIME_BASE)
EventsOnOpen, OnClose
GraphSubscribePacketSink / UnsubscribePacketSink

TFFDecoder (uFFDecoder.pas)

PropertiesReader, StreamIndex, AutoInitialize, PreviewMaxPackets, CodecName, HardwareDevice
MethodsInitialize, CloseCodec, SendPacket, ReceiveFrame, Flush, DecodeFrameAt, DecodeNextFrame
EventsOnFrameHook, OnFrameDecoded
GraphTakePacket, SubscribeFrameSink / UnsubscribeFrameSink
WindowsFFDecoderPreviewToBitmap, FFDecoderFrameToBitmap

TFFEncoder (uFFEncoder.pas)

PropertiesMediaType, CodecName, BitRate, Width/Height, SampleRate/Channels, Reader, InputDecoder, OutputWriter, CopyAudio, TranscodeAudio
MethodsInitialize, SendFrame, ReceivePacket, Flush, Start, Pause, Resume, Stop
EventsOnProgress, OnPreviewFrame, OnStateChange, OnFrameHook

TFFWriter (uFFWriter.pas)

PropertiesFileName, FormatName, OutputAdapter, RemuxReader, VideoEncoder, AudioEncoder
MethodsOpen, AddStream, AddStreamCopy, WriteHeader, WritePacket, WriteTrailer, Close, SetupFromLinks
GraphTakePacket (remux sink)

TFFPlaybackEngine (uFFPlaybackEngine.pas)

PropertiesFileName, HardwareDevice, State, Position, Duration, Volume, VideoStreamIndex, AudioStreamIndex
MethodsPlay, Pause, Stop, SeekTo
EventsOnPresentFrame, OnPositionChange, OnStateChange, OnFrameHook, OnVideoHook, OnAudioHook

TFFVideoPlayer (uFFVideoPlayer.pas, VCL)

PropertiesFileName, VideoDecoder, AudioDecoder, SubtitleDecoder, HardwareDevice, State, Position, Duration, Volume
MethodsPlay, Pause, Stop, SeekTo
EventsOnStateChange, OnFrameHook, OnVideoHook, OnAudioHook

TFFSubtitleDecoder (uFFSubtitleDecoder.pas)

PropertiesReader, StreamIndex, Initialized, HasEvents
MethodsInitialize, LoadAll, LoadFromSrt, GetEventAt, GetTextAt, TakePacket

TFFSubtitleEvent: StartMs, EndMs, Text, IsBitmap + Bitmap, IsAss + AssRaw.

Helper classes

TFFFrameConverter (uFFFrameConverter.pas)

Configure, Convert → BGRA (AV_PIX_FMT_BGRA by default).

TFFFrameBitmap (uFFFrameBitmap.pas, VCL)

AssignBgraBuffer, copy BGRA → TBitmap.

TFFAudioResampler (uFFAudioResampler.pas)

PCM S16, 44100 Hz, stereo by default.

TFFAudioOutput (uFFAudioOutput.pas)

PlatformUnit
WindowsuFFAudioOutputWin (WaveOut)
LinuxuFFAudioOutputALSAuFFAudioOutputSDL

TFFPacketQueue (uFFPacketQueue.pas)

Thread-safe TFFPacket queue for demux.

TFFPlaybackClock (uFFPlaybackClock.pas)

Reset, Pause, Resume, GetTimeMs, SetAudioTimeMs, WaitUntil, IsLate.

TFFMemoryAccessAdapter (uFFMemoryAccessAdapter.pas)

AVIOContext over TStream for TFFReader / TFFWriter.

TFFBitmapEncoder (uFFBitmapEncoder.pas)

Write video from BGRA frames / TBitmap.

TFFMediaInfo (uFFMediaInfo.pas)

Probe, FindBestStream, duration and codecs without decode.

TFFThumbnailExtractor (uFFThumbnailExtractor.pas)

Frame at position → bitmap / file.

TFFFrameFilter (uFFFrameFilter.pas)

libavfilter graph node: FilterDescription (e.g. scale=1280:720).

TFFTranscodeJob / TFFRemuxJob

High-level preset-based transcode and stream-copy remux.

TFFHardwareDecode (uFFHardwareDecode.pas)

TFFHardwareDecodeContext.TrySetup, TransferToSoftware – used inside TFFDecoder.

TFFLoader / TFFLogger

DLL loading and av_log capture.

Exceptions

EFFException (uFFException.pas) – FFmpeg errors with text from av_strerror.