kkroening / ffmpeg-python

Python bindings for FFmpeg - with complex filtering support
Apache License 2.0
9.99k stars 886 forks source link

Trying to convert Video into Images #569

Open IamExperimenting opened 3 years ago

IamExperimenting commented 3 years ago

I am trying to convert video into images using the below code, unfortunately, I am receiving FileNotFoundError. Wondering where should I create the folder. Also, I haven't mentioned the folder path there.

Code: import ffmpeg import os try: (ffmpeg.input('MyMovie49.mov') .filter('fps', fps=2) .output('images/%d.png', video_bitrate='5000k', s='64x64', sws_flags='bilinear', start_number=0) .run(capture_stdout=True, capture_stderr=True)) except ffmpeg.Error as e: print('stdout:', e.stdout.decode('utf8')) print('stderr:', e.stderr.decode('utf8')) Error: Traceback (most recent call last): File "FFMPEG.py", line 11, in .run(capture_stdout=True, capture_stderr=True)) File "/home/falconheavy/miniconda3/envs/TFDev/lib/python3.7/site-packages/ffmpeg/_run.py", line 320, in run overwrite_output=overwrite_output, File "/home/falconheavy/miniconda3/envs/TFDev/lib/python3.7/site-packages/ffmpeg/_run.py", line 285, in run_async args, stdin=stdin_stream, stdout=stdout_stream, stderr=stderr_stream File "/home/falconheavy/miniconda3/envs/TFDev/lib/python3.7/subprocess.py", line 800, in init restore_signals, start_new_session) File "/home/falconheavy/miniconda3/envs/TFDev/lib/python3.7/subprocess.py", line 1551, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg': 'ffmpeg'

Spider-ant commented 3 years ago

I'm just trying to get an example to run and getting the same.

FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'

I'm sorry to see there have been no replies to this.

Spider-ant commented 3 years ago

Ok... found some info here https://github.com/kkroening/ffmpeg-python/issues/251