- Clone repo locally
- run
gem install bundler - run
bundle exec ruby main.rb
Result Example:
{:streams=>
[{:index=>0,
:codec_name=>"aac",
:codec_long_name=>"AAC (Advanced Audio Coding)",
:profile=>"LC",
:codec_type=>"audio",
:codec_tag_string=>"mp4a",
:codec_tag=>"0x6134706d",
:sample_fmt=>"fltp",
:sample_rate=>"16000",
:channels=>2,
:channel_layout=>"stereo",
:bits_per_sample=>0,
:r_frame_rate=>"0/0",
:avg_frame_rate=>"0/0",
:time_base=>"1/16000",
:start_pts=>0,
:start_time=>"0.000000",
:duration_ts=>625147,
:duration=>"39.071688",
:bit_rate=>"29852",
:nb_frames=>"611",
:disposition=>
{:default=>1,
:dub=>0,
:original=>0,
:comment=>0,
:lyrics=>0,
:karaoke=>0,
:forced=>0,
:hearing_impaired=>0,
:visual_impaired=>0,
:clean_effects=>0,
:attached_pic=>0,
:timed_thumbnails=>0},
:tags=>
{:creation_time=>"2021-10-26T17:18:02.000000Z",
:language=>"eng",
:handler_name=>"Apple Sound Media Handler",
:vendor_id=>"[0][0][0][0]"}},
{:index=>1,
:codec_name=>"h264",
:codec_long_name=>"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
:profile=>"Main",
:codec_type=>"video",
:codec_tag_string=>"avc1",
:codec_tag=>"0x31637661",
:width=>320,
:height=>240,
:coded_width=>320,
:coded_height=>240,
:closed_captions=>0,
:has_b_frames=>1,
:pix_fmt=>"yuv420p",
:level=>20,
:color_range=>"tv",
:color_space=>"smpte170m",
:color_transfer=>"bt709",
:color_primaries=>"smpte170m",
:chroma_location=>"left",
:refs=>1,
:is_avc=>"true",
:nal_length_size=>"4",
:r_frame_rate=>"2997/100",
:avg_frame_rate=>"2997/100",
:time_base=>"1/2997",
:start_pts=>0,
:start_time=>"0.000000",
:duration_ts=>117098,
:duration=>"39.071738",
:bit_rate=>"1275175",
:bits_per_raw_sample=>"8",
:nb_frames=>"1171",
:disposition=>
{:default=>1,
:dub=>0,
:original=>0,
:comment=>0,
:lyrics=>0,
:karaoke=>0,
:forced=>0,
:hearing_impaired=>0,
:visual_impaired=>0,
:clean_effects=>0,
:attached_pic=>0,
:timed_thumbnails=>0},
:tags=>
{:creation_time=>"2021-10-26T17:18:02.000000Z",
:language=>"eng",
:handler_name=>"Apple Video Media Handler",
:vendor_id=>"appl",
:encoder=>"H.264"}}],
:chapters=>[],
:format=>
{:filename=>"505059_1_1_wm.mov",
:nb_streams=>2,
:nb_programs=>0,
:format_name=>"mov,mp4,m4a,3gp,3g2,mj2",
:format_long_name=>"QuickTime / MOV",
:start_time=>"0.000000",
:duration=>"39.071667",
:size=>"6400222",
:bit_rate=>"1310457",
:probe_score=>100,
:tags=>
{:major_brand=>"qt ",
:minor_version=>"537199360",
:compatible_brands=>"qt ",
:creation_time=>"2021-10-26T17:18:02.000000Z",
:"com.apple.quicktime.author"=>
"WPA Film Library (www.wpafilmlibrary.com)",
:"com.apple.quicktime.copyright"=>
"These motion images are protected by copyright, please contact WPA Film Library to obtain license for usage.",
:"com.apple.quicktime.displayname"=>"505059_1_1_wm",
:"com.apple.quicktime.player.movie.audio.gain"=>"1.000000",
:"com.apple.quicktime.player.movie.audio.treble"=>"0.000000",
:"com.apple.quicktime.player.movie.audio.bass"=>"0.000000",
:"com.apple.quicktime.player.movie.audio.balance"=>"0.000000",
:"com.apple.quicktime.player.movie.audio.pitchshift"=>"0.000000",
:"com.apple.quicktime.player.movie.audio.mute"=>"",
:"com.apple.quicktime.player.movie.visual.brightness"=>"0.000000",
:"com.apple.quicktime.player.movie.visual.color"=>"1.000000",
:"com.apple.quicktime.player.movie.visual.tint"=>"0.000000",
:"com.apple.quicktime.player.movie.visual.contrast"=>"1.000000",
:"com.apple.quicktime.player.version"=>"7.6.6 (7.6.6)",
:"com.apple.quicktime.version"=>
"7.7.3 (2890.6) 0x7738000 (Mac OS X, 10.10.4, 14E46)",
:artist=>"WPA Film Library (www.wpafilmlibrary.com)",
:"artist-eng"=>"WPA Film Library (www.wpafilmlibrary.com)",
:copyright=>
"These motion images are protected by copyright, please contact WPA Film Library to obtain license for usage.",
:"copyright-eng"=>
"These motion images are protected by copyright, please contact WPA Film Library to obtain license for usage.",
:title=>"505059_1_1_wm",
:"title-eng"=>"505059_1_1_wm"}}}