Class: RVideo::Tools::Mp4creator
- Inherits:
-
Object
- Object
- RVideo::Tools::Mp4creator
- Includes:
- AbstractTool::InstanceMethods
- Defined in:
- lib/rvideo/tools/mp4creator.rb
Instance Attribute Summary collapse
-
#raw_metadata ⇒ Object
readonly
Returns the value of attribute raw_metadata.
Attributes included from AbstractTool::InstanceMethods
#command, #options, #original, #progress, #raw_result
Instance Method Summary collapse
Methods included from AbstractTool::InstanceMethods
abstract_attribute_formatter, #audio_bit_rate, #audio_channels, #audio_sample_rate, #calculate_height, #calculate_width, #deinterlace, #do_execute, #execute, #fps, #get_audio_bit_rate, #get_audio_channels, #get_audio_sample_rate, #get_deinterlace, #get_fit_to_height_resolution, #get_fit_to_width_resolution, #get_fps, #get_letterbox_resolution, #get_mono_audio, #get_original_fps, #get_original_resolution, #get_resolution, #get_specific_audio_bit_rate, #get_specific_audio_sample_rate, #get_specific_fps, #get_specific_resolution, #get_stereo_audio, #get_video_bit_rate, #get_video_bit_rate_max, #get_video_bit_rate_min, #get_video_bit_rate_tolerance, #get_video_quality, #initialize, #resolution, #temp_dir, #valid_dimension?, #video_bit_rate, #video_bit_rate_max, #video_bit_rate_min, #video_bit_rate_tolerance, #video_quality
Instance Attribute Details
#raw_metadata ⇒ Object (readonly)
Returns the value of attribute raw_metadata.
6 7 8 |
# File 'lib/rvideo/tools/mp4creator.rb', line 6 def @raw_metadata end |
Instance Method Details
#format_fps(params = {}) ⇒ Object
12 13 14 |
# File 'lib/rvideo/tools/mp4creator.rb', line 12 def format_fps(params={}) " -rate=#{params[:fps]}" end |
#parse_result(result) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/rvideo/tools/mp4creator.rb', line 16 def parse_result(result) if m = /can't open file/.match(result) raise TranscoderError::InvalidFile, "I/O error" end if m = /unknown file type/.match(result) raise TranscoderError::InvalidFile, "I/O error" end if @options['output_file'] && !File.exist?(@options['output_file']) raise TranscoderError::UnexpectedResult, "An unknown error has occured with mp4creator:#{result}" end @raw_metadata = result.empty? ? "No Results" : result return true end |
#tool_command ⇒ Object
8 9 10 |
# File 'lib/rvideo/tools/mp4creator.rb', line 8 def tool_command 'mp4creator' end |