Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions lib/ffmpeg/movie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
module FFMPEG
class Movie
attr_reader :path, :duration, :time, :bitrate, :rotation, :creation_time
attr_reader :displaymatrix, :display_rotation
attr_reader :video_stream, :video_codec, :video_bitrate, :colorspace, :width, :height, :sar, :dar, :frame_rate
attr_reader :audio_streams, :audio_stream, :audio_codec, :audio_bitrate, :audio_sample_rate, :audio_channels, :audio_tags
attr_reader :container
Expand Down Expand Up @@ -60,8 +61,16 @@ def initialize(path)

@time = @metadata[:format][:start_time].to_f


output[/Audio:\ (.*)/]
@audio_stream = $1

output[/displaymatrix:\ (.*)/]
@displaymatrix = $1

@format_tags = @metadata[:format][:tags]


@creation_time = if @format_tags and @format_tags.key?(:creation_time)
begin
Time.parse(@format_tags[:creation_time])
Expand Down Expand Up @@ -125,6 +134,10 @@ def initialize(path)
end

end

if displaymatrix
@display_rotation=displaymatrix[/(-|)(\d+.\d+)/]
end

unsupported_stream_ids = unsupported_streams(std_error)
nil_or_unsupported = ->(stream) { stream.nil? || unsupported_stream_ids.include?(stream[:index]) }
Expand Down
Binary file added streamio-ffmpeg-1.0.1.gem
Binary file not shown.