Class: Mkv2m4v::AudioTrack
- Inherits:
-
Track
- Object
- Track
- Mkv2m4v::AudioTrack
show all
- Defined in:
- lib/mkv2m4v/track.rb
Instance Attribute Summary
Attributes inherited from Track
#info
Instance Method Summary
collapse
Methods inherited from Track
#format_description, #initialize, #language, #title
Constructor Details
This class inherits a constructor from Mkv2m4v::Track
Instance Method Details
#bit_rate_description ⇒ Object
60
61
62
|
# File 'lib/mkv2m4v/track.rb', line 60
def bit_rate_description
"#{bit_rate_kbps}k (#{info.bit_rate_mode})"
end
|
#bit_rate_kbps ⇒ Object
52
53
54
|
# File 'lib/mkv2m4v/track.rb', line 52
def bit_rate_kbps
info.bit_rate.gsub(/\D/, "").to_i if info.bit_rate
end
|
#channel_count ⇒ Object
48
49
50
|
# File 'lib/mkv2m4v/track.rb', line 48
def channel_count
info.channels.to_s.chars.first.to_i
end
|
#channel_description ⇒ Object
56
57
58
|
# File 'lib/mkv2m4v/track.rb', line 56
def channel_description
"#{channel_count} (#{info.channel_positions})"
end
|
#print(color = nil) ⇒ Object
64
65
66
67
68
69
70
71
|
# File 'lib/mkv2m4v/track.rb', line 64
def print(color = nil)
puts "Audio Track ##{id}:".colorize(color)
puts " Format: #{format_description}"
puts " Channels: #{channel_description}"
puts " Bit rate: #{bit_rate_description}"
puts " Language: #{language}"
puts " Title: #{title}"
end
|