gbstack / ffprobe-python

A wrapper of ffprobe command to extract metadata from media files.
Other
59 stars 56 forks source link

Support remote video files #8

Closed brannondorsey closed 4 years ago

brannondorsey commented 4 years ago

ffprobe supports probing remote files over HTTP. It would be great if this library could too.

Right now, if you try and load a remote file you get an OS Error because the file doesn't exist on disk.

>>> from ffprobe import FFProbe
>>> metadata = FFProbe("https://example.com/movie.mp4")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/example-user/virtual-env/lib/python3.6/site-packages/ffprobe/ffprobe.py", line 101, in __init__
    raise IOError('No such media file ' + self.path_to_video)
OSError: No such media file https://example.com/movie.mp4
norus commented 4 years ago

PR submitted for review: https://github.com/gbstack/ffprobe-python/pull/9

brannondorsey commented 4 years ago

Wow! This is great, I just tested and it works perfectly for our use case. Thank you for taking the time to add this.