Class Frame

java.lang.Object
com.github.kokorin.jaffree.ffprobe.Frame
All Implemented Interfaces:
FrameSubtitle, PacketFrameSubtitle, TagAware

public class Frame extends Object implements TagAware, FrameSubtitle, PacketFrameSubtitle
Frame description.
See Also:
  • Constructor Details

    • Frame

      public Frame(ProbeData probeData)
      Creates Frame description based on provided data sections.
      Parameters:
      probeData - data section
  • Method Details

    • getProbeData

      public ProbeData getProbeData()
      Returns data section which holds all the data provided by ffprobe.

      Use this method if you have to access properties which are not accessible through other getters.

      Specified by:
      getProbeData in interface TagAware
      Returns:
      probe data
    • getLogs

      public List<Log> getLogs()
      Returns logging information from the decoder about each frame according to the value set in loglevel.
      Returns:
      logs
      See Also:
    • getSideDataList

      public List<SideData> getSideDataList()
      Returns additional frame data that can be provided by the container. Frame can contain several types of side information.
      Returns:
      side data for the frame
    • getPts

      public Long getPts()
      Presentation timestamp in timebase units (time when frame should be shown to user).

      Note: despite declared in ffprobe.xsd for ffprobe:frameType, this property has never been reported by ffprobe.

      Returns:
      pts
      See Also:
    • getPtsTime

      public Float getPtsTime()
      Presentation timestamp in seconds (time when frame should be shown to user).

      Note: despite declared in ffprobe.xsd for ffprobe:frameType, this property has never been reported by ffprobe.

      Returns:
      pts in seconds
      See Also:
    • getMediaType

      public StreamType getMediaType()
      Returns:
      media type
    • getStreamIndex

      public Integer getStreamIndex()
      Returns:
      corresponding stream id
    • getKeyFrame

      public Boolean getKeyFrame()
      Returns:
      true if key frame
    • getPktPts

      public Long getPktPts()
      PTS in time_base units copied from the AVPacket that was decoded to produce this frame.
      Returns:
      packet pts
    • getPktPtsTime

      public Float getPktPtsTime()
      PTS in seconds copied from the AVPacket that was decoded to produce this frame.
      Returns:
      packet pts
    • getPktDts

      public Long getPktDts()
      DTS in time_base units copied from the AVPacket. (if frame threading isn't used) This is also the Presentation time of this AVFrame calculated from only AVPacket.dts values without pts values.
      Returns:
      packet DTS
    • getPktDtsTime

      public Float getPktDtsTime()
      DTS in seconds copied from the AVPacket. (if frame threading isn't used) This is also the Presentation time of this AVFrame calculated from only AVPacket.dts values without pts values.
      Returns:
      packet DTS time
    • getBestEffortTimestamp

      public Long getBestEffortTimestamp()
      Frame timestamp in stream time_base units, estimated using various heuristics.
      • encoding: unused
      • decoding: set by libavcodec, read by user
      Returns:
      best effort PTS
    • getBestEffortTimestampTime

      public Float getBestEffortTimestampTime()
      Frame timestamp in seconds, estimated using various heuristics.
      • encoding: unused
      • decoding: set by libavcodec, read by user
      Returns:
      best effort time
    • getPktDuration

      public Long getPktDuration()
      Duration of the corresponding packet in stream time_base units, 0 if unknown.
      Returns:
      packet duration
    • getPktDurationTime

      public Float getPktDurationTime()
      Duration of the corresponding packet in seconds, 0 if unknown.
      Returns:
      packet duration
    • getPktPos

      public Long getPktPos()
      Reordered pos from the last AVPacket that has been input into the decoder.
      Returns:
      packet position
    • getPktSize

      public Integer getPktSize()
      Size of the corresponding packet containing the compressed frame.

      It is set to a negative value if unknown.

      Returns:
      packet size
    • getSampleFmt

      public String getSampleFmt()
      Returns:
      audio samples format
    • getNbSamples

      public Long getNbSamples()
      Returns:
      number of audio sample in a single channel
    • getChannels

      public Integer getChannels()
      Returns:
      number of channels
    • getChannelLayout

      public String getChannelLayout()
      Returns:
      channels layout
    • getWidth

      public Long getWidth()
      Returns:
      video frame width
    • getHeight

      public Long getHeight()
      Returns:
      video frame height
    • getPixFmt

      public String getPixFmt()
      Returns:
      video frame pixel format
    • getSampleAspectRatio

      public Rational getSampleAspectRatio()
      Return sample aspect ratio for the video frame, 0/1 if unknown/unspecified.
      Returns:
      aspect ration
    • getPictType

      public String getPictType()
      Possible return values:
      • I -> Intra
      • P -> Predicted
      • B -> Bi-dir predicted
      • S -> S(GMC)-VOP MPEG-4
      • i -> Switching Intra
      • p -> Switching Predicted
      • b -> BI type
      • ? -> unknown/undefined
      Returns:
      picture type of the frame
      See Also:
    • getCodedPictureNumber

      public Long getCodedPictureNumber()
      Returns:
      picture number in bitstream order
    • getDisplayPictureNumber

      public Long getDisplayPictureNumber()
      Returns:
      picture number in display order
    • getInterlacedFrame

      public Boolean getInterlacedFrame()
      The content of the picture is interlaced.
      Returns:
      true if interlaced
    • getTopFieldFirst

      public Boolean getTopFieldFirst()
      If the content is interlaced, is top field displayed first.
      Returns:
      true if top field is displayed first
    • getRepeatPict

      public Integer getRepeatPict()
      When decoding, this signals how much the picture must be delayed.

      extra_delay = repeat_pict / (2*fps)

      Returns:
      picture extra delay