beanieboi / ffprober

a small ruby wrapper for ffprobe
MIT License
41 stars 21 forks source link

File Not Found error when using a remote url for file path #99

Closed wrburgess closed 2 years ago

wrburgess commented 3 years ago

Note: File names have been obfuscated below

When I use ffprobe from a command line, I am able to retrieve the metadata from the video file using a URL:

ffprobe -v quiet -print_format json -show_format -show_streams -show_error "https://[unique_id].s3.amazonaws.com/[file_name].mov"

Results:

{
    "streams": [
        {
            "index": 0,
            "codec_name": "svq3",
            "codec_long_name": "Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3",
            "codec_type": "video",
            "codec_tag_string": "SVQ3",
            "codec_tag": "0x33515653",
            "width": 360,
            "height": 244,
            "coded_width": 360,
           ...
           }
      ] 
  }

When I try using ffprober, however, I get a File not found error:

ffprobe = Ffprober::Parser.from_file("https://[unique_id].s3.amazonaws.com/[file_name].mov")

Error:

ArgumentError: File not found https://[unique_id].s3.amazonaws.com/[file_name].mov
from /Users/[user]/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/ffprober-1.0/lib/ffprober/parsers/file.rb:16:in `initialize'

Is this a bug or does ffprober require a local file to process correctly?

beanieboi commented 2 years ago

have you tried using?

ffprobe = Ffprober::Parser.from_url('http://localhost/notarealfile.mp4')
wrburgess commented 2 years ago

I have not, but will give it a shot.