1

I want to use the easy_thumbnails_ffmpeg library to get Thumbnails for videos in Python, however, I get a weird error saying that the file was not found. I have been looking for examples of how to use the library, but no luck and no documentation either. Any idea ? thank you

Log:

File "C:\Python27\lib\site-packages\easy_thumbnails_ffmpeg-0.1.1-py2.7.egg\easy_thumbnails_ffmpeg\source_generators.py", line 24, in ffmpeg_frame
    ], stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate(source.read())[0]
  File "C:\Python27\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 896, in _execute_child
    startupinfo)
WindowsError: [Error 2] Specified file not found
Selcuk
  • 57,004
  • 12
  • 102
  • 110
Abdellah Benhammou
  • 402
  • 1
  • 8
  • 22

1 Answers1

1

That file not found error likely means that the library is trying to call ffmpeg, but the binary does not work/isn't found. Inspecting the source of easy_thumbnails_ffmpeg, you can see it tries to call ffmpeg on the command line. Is ffmpeg on your PATH, such that you can call it in the same manner from a command prompt?

I.e., if you opened a command prompt, see if executing ffmpeg works for you. If it doesn't, add the binary to your PATH.

Sohan Jain
  • 2,318
  • 1
  • 16
  • 17
  • This solved the problem, any idea about what should be passed to source_generators.ffmpeg_frame as a source for the video ? path, open('path') ? Thank you – Abdellah Benhammou Apr 02 '14 at 16:21
  • 1
    From inspecting the source code, it looks like the `source` param takes in a file handler, ie `open(path)`, because on line 24 the lib calls `source.read()` – Sohan Jain Apr 02 '14 at 16:25