Last active
February 5, 2016 10:07
-
-
Save tilllt/73983d3579a46aed0993 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem https://github.com/beanieboi/ffprober | |
ffprobe = Ffprober::Parser.from_file(dir_entry) | |
pp ffprobe.json | |
private method `json' called for #<Ffprober::Wrapper:0x007fb57412d7d0> (NoMethodError) | |
pp ffprobe.inspect | |
#<Ffprober::Wrapper:0x007fb6640dd848 @json={:streams=>[{:index=>0, :codec_name=>\"mpeg4\", :codec_long_name=>\"MPEG-4 part 2\", :profile=>\"Advanced Simple Profile\", :codec_type=>\"video\", :codec_time_base=>\"911/21845\", :codec_tag_string=>\"XVID\", :codec_tag=>\"0x44495658\", :width=>672, :height=>368, :coded_width=>672, :coded_height=>368, :has_b_frames=>1, :sample_aspect_ratio=>\"1:1\", :display_aspect_ratio=>\"42:23\", :pix_fmt=>\"yuv420p\", :level=>5, :chroma_location=>\"left\", :refs=>1, :quarter_sample=>\"0\", :divx_packed=>\"0\", :r_frame_rate=>\"24000/1001\", :avg_frame_rate=>\"24000/1001\", :time_base=>\"1001/24000\", :start_pts=>0, :start_time=>\"0.000000\", :duration_ts=>138516, :duration=>\"5777.271500\", :bit_rate=>\"892934\", :nb_frames=>\"138516\", :disposition=>{:default=>0, :dub=>0, :original=>0, :comment=>0, :lyrics=>0, :karaoke=>0, :forced=>0, :hearing_impaired=>0, :visual_impaired=>0, :clean_effects=>0, :attached_pic=>0}}, {:index=>1, :codec_name=>\"mp3\", :codec_long_name=>\"MP3 (MPEG audio layer 3)\", :codec_type=>\"audio\", :codec_time_base=>\"1/48000\", :codec_tag_string=>\"U[0][0][0]\", :codec_tag=>\"0x0055\", :sample_fmt=>\"s16p\", :sample_rate=>\"48000\", :channels=>2, :channel_layout=>\"stereo\", :bits_per_sample=>0, :r_frame_rate=>\"0/0\", :avg_frame_rate=>\"0/0\", :time_base=>\"3/125\", :start_pts=>0, :start_time=>\"0.000000\", :duration_ts=>240720, :duration=>\"5777.280000\", :bit_rate=>\"111992\", :nb_frames=>\"240720\", :disposition=>{:default=>0, :dub=>0, :original=>0, :comment=>0, :lyrics=>0, :karaoke=>0, :forced=>0, :hearing_impaired=>0, :visual_impaired=>0, :clean_effects=>0, :attached_pic=>0}}], :chapters=>[], :format=>{:filename=>\"/Users/till/Downloads/filename.avi\", :nb_streams=>2, :nb_programs=>0, :format_name=>\"avi\", :format_long_name=>\"AVI (Audio Video Interleaved)\", :start_time=>\"0.000000\", :duration=>\"5777.280000\", :size=>\"734896128\", :bit_rate=>\"1017636\", :probe_score=>100, :tags=>{:encoder=>\"VirtualDubMod 1.5.4.1 (build 2178/release)\", :IAS1=>\"English\"}}}> | |
pp ffprobe.methods | |
[:format, | |
:video_streams, | |
:audio_streams, | |
:data_streams, | |
:chapters, | |
:subtitle_streams, | |
:pretty_print, | |
:pretty_print_cycle, | |
:pretty_print_instance_variables, | |
:pretty_print_inspect, | |
:to_json, | |
:nil?, | |
:===, | |
:=~, | |
:!~, | |
:eql?, | |
:hash, | |
:<=>, | |
:class, | |
:singleton_class, | |
:clone, | |
:dup, | |
:taint, | |
:tainted?, | |
:untaint, | |
:untrust, | |
:untrusted?, | |
:trust, | |
:freeze, | |
:frozen?, | |
:to_s, | |
:inspect, | |
:methods, | |
:singleton_methods, | |
:protected_methods, | |
:private_methods, | |
:public_methods, | |
:instance_variables, | |
:instance_variable_get, | |
:instance_variable_set, | |
:instance_variable_defined?, | |
:remove_instance_variable, | |
:instance_of?, | |
:kind_of?, | |
:is_a?, | |
:tap, | |
:send, | |
:public_send, | |
:respond_to?, | |
:extend, | |
:display, | |
:method, | |
:public_method, | |
:singleton_method, | |
:define_singleton_method, | |
:object_id, | |
:to_enum, | |
:enum_for, | |
:pretty_inspect, | |
:==, | |
:equal?, | |
:!, | |
:!=, | |
:instance_eval, | |
:instance_exec, | |
:__send__, | |
:__id__] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment