auto-subtitle icon indicating copy to clipboard operation
auto-subtitle copied to clipboard

ffmpeg._run.Error: ffmpeg error

Open triksmelb opened this issue 1 year ago • 6 comments

seeing this error when attempting to generate subtitles:

ffmpeg version 6.0 macOS Ventura 13.4.1 (22F82)

admin@MacBook-Air ~ % auto_subtitle /Users/admin/Movies/slovenia.mp4 -o subtitled/ /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/whisper/timing.py:57: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details. @numba.jit Extracting audio from slovenia... Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/bin/auto_subtitle", line 8, in <module> sys.exit(main()) ^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/auto_subtitle/cli.py", line 49, in main audios = get_audio(args.pop("video")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/auto_subtitle/cli.py", line 84, in get_audio ).run(quiet=True, overwrite_output=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ffmpeg/_run.py", line 325, in run raise Error('ffmpeg', out, err) ffmpeg._run.Error: ffmpeg error (see stderr output for detail)

triksmelb avatar Jun 26 '23 04:06 triksmelb

i fix it. Just don't use "--output_dir" or "-o". At least in my case in windows. And avoid use ffmpeg, just get the srt with --srt_only Example: auto_subtitle C:\Users\fedeg\videos\Captures\phineasFerb\test.mp4 --srt_only True

ekp1k80 avatar Jun 28 '23 02:06 ekp1k80

This error is caused by the input file path not being correct. It seems you need to use the full file path for it to work properly. (Ie.: "C:\Users\username\Downloads\file.mp4" on Windows and "/home/username/Downloads/file.mp4" on Linux)

stingwraith avatar Jun 29 '23 14:06 stingwraith

still getting this error

charl-ie avatar Aug 11 '23 18:08 charl-ie

using full path helped me

tebrizetayi avatar Sep 07 '23 16:09 tebrizetayi

https://github.com/Irvingouj/auto-subtitle I created a fork, this works for windows. the python path management is such a pain

GitHub
Automatically generate and overlay subtitles for any video. - GitHub - Irvingouj/auto-subtitle: Automatically generate and overlay subtitles for any video.

Irvingouj avatar Nov 23 '23 03:11 Irvingouj

I changed code for ffmpeg to show error and it was "file not found". You may have double extension of file, your "video.mp4" is in fact "video.mp4.mp4". After i renamed my file to "vid1" everything worked!

Serbernari avatar Feb 02 '24 22:02 Serbernari