Class: MediaInfoNative::VideoStream

Inherits:
BaseStreamWithFramerate show all
Defined in:
lib/mediainfo-native/streams/video.rb

Constant Summary

Constants inherited from BaseStream

BaseStream::TYPES

Instance Method Summary collapse

Methods inherited from BaseStreamWithFramerate

#fps

Methods inherited from BaseStream

#stream_type

Methods included from AttrReaders

#mediainfo_attr_reader, #mediainfo_date_reader, #mediainfo_duration_reader, #mediainfo_int_reader, #supported_attribute, #supported_attributes

Instance Method Details

#cbr?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/mediainfo-native/streams/video.rb', line 12

def cbr?
  video? && 'Constant' == bit_rate_mode
end

#frame_sizeObject



87
88
89
# File 'lib/mediainfo-native/streams/video.rb', line 87

def frame_size
  "#{width}x#{height}" if width && height
end

#interlaced?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/mediainfo-native/streams/video.rb', line 22

def interlaced?
  video? && 'Interlaced' == scan_type
end

#max_fpsObject Also known as: max_framerate



73
74
75
# File 'lib/mediainfo-native/streams/video.rb', line 73

def max_fps
  maximum_frame_rate[/[\d.]+/].to_f if video?
end

#min_fpsObject Also known as: min_framerate



67
68
69
# File 'lib/mediainfo-native/streams/video.rb', line 67

def min_fps
  minimum_frame_rate[/[\d.]+/].to_f if video?
end

#nominal_fpsObject Also known as: nominal_framerate



61
62
63
# File 'lib/mediainfo-native/streams/video.rb', line 61

def nominal_fps
  nominal_frame_rate[/[\d.]+/].to_f if nominal_frame_rate
end

#progressive?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/mediainfo-native/streams/video.rb', line 26

def progressive?
  video? && !interlaced?
end

#vbr?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/mediainfo-native/streams/video.rb', line 16

def vbr?
  video? && !cbr?
end