Skip to content

Latest commit

 

History

History
109 lines (78 loc) · 4.43 KB

File metadata and controls

109 lines (78 loc) · 4.43 KB

Data Models

This page describes the primary data structures used by FFmpeg Kit Extended Flutter.

MediaInformation

The MediaInformation class contains comprehensive metadata about a media file, retrieved via FFprobeKit.

Media Information Properties

  • filename (String?): The path or URL of the media file.
  • format (String?): The short name of the container format (e.g., "mp4", "mkv").
  • longFormat (String?): The long descriptive name of the format.
  • duration (String?): The total duration of the media in seconds.
  • startTime (String?): The start time of the media in seconds.
  • bitrate (String?): The bitrate of the media stream.
  • size (String?): The size of the media file in bytes.
  • tagsJson (String?): A JSON string containing media tags (metadata).
  • allPropertiesJson (String?): A JSON string containing all media properties.
  • streams (List<StreamInformation>): The list of streams contained in the media.
  • chapters (List<ChapterInformation>): The list of chapters contained in the media.

Media Information Computed Properties

  • tags (Map<String, dynamic>?): Parsed map of tags from the tagsJson string.
  • allProperties (Map<String, dynamic>?): Parsed map of all properties from the allPropertiesJson string.

StreamInformation

Represents a single media stream (video, audio, subtitle, etc.) within a container format.

Stream Information Properties

  • index (int?): The index of the stream in the file.
  • type (String?): The type of the stream (e.g., "video", "audio", "subtitle").
  • codec (String?): The short name of the codec (e.g., "h264", "aac").
  • codecLong (String?): The long descriptive name of the codec.
  • format (String?): The format associated with the stream (e.g., "yuv420p").
  • width (int?): The width of the video stream in pixels.
  • height (int?): The height of the video stream in pixels.
  • bitrate (String?): The bitrate of the stream in bits per second.
  • sampleRate (String?): The audio sample rate in Hz.
  • sampleFormat (String?): The audio sample format (e.g., "fltp").
  • channelLayout (String?): The channel layout of the audio stream (e.g., "stereo").
  • sampleAspectRatio (String?): The sample aspect ratio.
  • displayAspectRatio (String?): The display aspect ratio (e.g., "16:9").
  • averageFrameRate (String?): The average frame rate of the video stream.
  • realFrameRate (String?): The real frame rate of the video stream.
  • timeBase (String?): The time base of the stream.
  • codecTimeBase (String?): The codec time base.
  • tagsJson (String?): A JSON string containing stream tags.
  • allPropertiesJson (String?): A JSON string containing all stream properties.

Stream Information Computed Properties

  • tags (Map<String, dynamic>?): Parsed map of tags from the tagsJson string.
  • allProperties (Map<String, dynamic>?): Parsed map of all properties from the allPropertiesJson string.

ChapterInformation

Represents a chapter within a media file.

Chapter Information Properties

  • id (int?): The unique ID of the chapter.
  • timeBase (String?): The time base used for chapter timestamps.
  • start (int?): The start time in timeBase units.
  • startTime (String?): The start time in seconds as a string.
  • end (int?): The end time in timeBase units.
  • endTime (String?): The end time in seconds as a string.
  • tagsJson (String?): A JSON string containing chapter tags.
  • allPropertiesJson (String?): A JSON string containing all chapter properties.

Log

Represents a single log entry emitted by FFmpeg.

Log Properties

  • sessionId (int): The ID of the session that produced this log.
  • level (int): The raw integer log level.
  • message (String): The log message content.

Log Computed Properties

  • logLevel (LogLevel): The LogLevel representation of the raw integer level.

Statistics

Represents encoding/decoding statistics for an active FFmpegSession.

Statistics Properties

  • sessionId (int): The ID of the session these statistics belong to.
  • time (int): The current time in milliseconds.
  • size (int): The current size of the output in bytes.
  • bitrate (double): The current bitrate in bits per second.
  • speed (double): The processing speed (e.g., 2.0x).
  • videoFrameNumber (int): The current video frame number being processed.
  • videoFps (double): The current video processing speed in frames per second.
  • videoQuality (double): The current video quality (quantizer value).