m1guelpf / auto-subtitle

Automatically generate and overlay subtitles for any video.
MIT License
1.63k stars 253 forks source link

ffmpeg._run.Error: ffmpeg error #50

Open triksmelb opened 1 year ago

triksmelb commented 1 year ago

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)

ekp1k80 commented 1 year ago

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

stingwraith commented 1 year ago

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)

charl-ie commented 1 year ago

still getting this error

tebrizetayi commented 1 year ago

using full path helped me

Irvingouj commented 1 year ago

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

GitHub
GitHub - Irvingouj/auto-subtitle: Automatically generate and overlay subtitles for any video.
Automatically generate and overlay subtitles for any video. - GitHub - Irvingouj/auto-subtitle: Automatically generate and overlay subtitles for any video.
Serbernari commented 9 months ago

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!