pszemraj / vid2cleantxt

Python API & command-line tool to easily transcribe speech-based video files into clean text
Apache License 2.0
185 stars 26 forks source link

No such file or directory: 'ffprobe' #18

Closed manu2504 closed 1 year ago

manu2504 commented 1 year ago

Hello, and thanks for this project, which sounds really helpful. Except that I've to fix several errors to make it work. Latest error was:

warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning)
transcribing...:   0%|                                                                                                                  | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/Users/manu/sw-projects/transcribe.py", line 3, in <module>
    text_output_dir, metadata_output_dir = vid2cleantxt.transcribe.transcribe_dir(
  File "/Users/manu/sw-projects/venv/lib/python3.10/site-packages/vid2cleantxt/transcribe.py", line 663, in transcribe_dir
    transcribe_video_whisper(
  File "/Users/manu/sw-projects/venv/lib/python3.10/site-packages/vid2cleantxt/transcribe.py", line 263, in transcribe_video_whisper
    chunk_directory = prep_transc_pydub(
  File "/Users/manu/sw-projects/venv/lib/python3.10/site-packages/vid2cleantxt/audio2text_functions.py", line 116, in prep_transc_pydub
    vid_audio = AudioSegment.from_file(load_path)
  File "/Users/manu/sw-projects/venv/lib/python3.10/site-packages/pydub/audio_segment.py", line 728, in from_file
    info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit)
  File "/Users/manu/sw-projects/venv/lib/python3.10/site-packages/pydub/utils.py", line 274, in mediainfo_json
    res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 1847, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe'

Does someone know how to fix that?

pszemraj commented 1 year ago

Hi! Thanks for reaching out. Do you have ffmpeg installed on your system? There may be an issue with the install because ffprobe is from that.

Try running ffmpeg --help in your console. If that gives you issues, i would recommend (re)installing as recommended on their site https://ffmpeg.org/

manu2504 commented 1 year ago

ffmpeg wasn't installed globally on my system (which ffmpeg), but it was installed locally in my venv (pip install ffmpeg: already installed). I installed it with homebrew (brew install ffmpeg) and it worked. Thanks.

pszemraj commented 1 year ago

Glad to hear! ffmpeg can be tricky, I've been in similar situations