Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove os.path.exists checks so we can also work with files over http #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions converter/ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,6 @@ def probe(self, fname, posters_as_video=True):
:param posters_as_video: Take poster images (mainly for audio files) as
A video stream, defaults to True
"""

if not os.path.exists(fname):
return None

info = MediaInfo(posters_as_video)

p = self._spawn([self.ffprobe_path,
Expand Down Expand Up @@ -398,9 +394,6 @@ def convert(self, infile, outfile, opts, timeout=10):
... pass # can be used to inform the user about conversion progress

"""
if not os.path.exists(infile):
raise FFMpegError("Input file doesn't exist: " + infile)

cmds = [self.ffmpeg_path, '-i', infile]
cmds.extend(opts)
cmds.extend(['-y', outfile])
Expand Down Expand Up @@ -502,9 +495,6 @@ def thumbnails(self, fname, option_list):
>>> FFMpeg().thumbnails('test1.ogg', [(5, '/tmp/shot.png', '320x240'),
>>> (10, '/tmp/shot2.png', None, 5)])
"""
if not os.path.exists(fname):
raise IOError('No such file: ' + fname)

cmds = [self.ffmpeg_path, '-i', fname, '-y', '-an']
for thumb in option_list:
if len(thumb) > 2 and thumb[2]:
Expand Down