class VideoStream

Attributes

bit_rate[RW]
bit_rate_mode[RW]
bitdepth[RW]
bits_pixel_frame[RW]
codec[RW]
codec_id[RW]
codec_info[RW]
colorimetry[RW]
colorspace[RW]
colour_primaries[RW]
display_aspect_ratio[RW]
duration[RW]
encoded_date[RW]
format[RW]
format_commercial[RW]
format_info[RW]
format_profile[RW]
format_settings_cabac[RW]
format_settings_gop[RW]
format_settings_matrix[RW]
format_settings_reframes[RW]
format_version[RW]
frame_rate[RW]
frame_rate_mode[RW]
height[RW]
matrix_coefficients[RW]
maximum_frame_rate[RW]
menu_id[RW]
minimum_frame_rate[RW]
nominal_bit_rate[RW]
resolution[RW]
scan_order[RW]
scan_type[RW]
standard[RW]
stream_size[RW]
tagged_date[RW]
transfer_characteristics[RW]
width[RW]

Public Instance Methods

cbr?() click to toggle source
# File lib/mediainfo-simple/streams/video.rb, line 9
def cbr?
  video? && 'Constant' == bit_rate_mode
end
fps_float() click to toggle source

to convert framerate string to a float example: “25.000 fps” => 25.0 :

# File lib/mediainfo-simple/streams/video.rb, line 62
def fps_float
  frame_rate[/[\d.]+/].to_f if frame_rate
end
frame_size() click to toggle source
# File lib/mediainfo-simple/streams/video.rb, line 90
def frame_size
  "#{width}x#{height}" if width && height
end
interlaced?() click to toggle source
# File lib/mediainfo-simple/streams/video.rb, line 19
def interlaced?
  video? && 'Interlaced' == scan_type
end
max_fps_float() click to toggle source
# File lib/mediainfo-simple/streams/video.rb, line 77
def max_fps_float
  maximum_frame_rate[/[\d.]+/].to_f if video?
end
min_fps_float() click to toggle source

like above, to convert min_fps strng to a float:

# File lib/mediainfo-simple/streams/video.rb, line 70
def min_fps_float
  minimum_frame_rate[/[\d.]+/].to_f if video?
end
progressive?() click to toggle source
# File lib/mediainfo-simple/streams/video.rb, line 23
def progressive?
  video? && !interlaced?
end
vbr?() click to toggle source
# File lib/mediainfo-simple/streams/video.rb, line 13
def vbr?
  video? && !cbr?
end