Open triksmelb opened 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
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)
still getting this error
using full path helped me
https://github.com/Irvingouj/auto-subtitle I created a fork, this works for windows. the python path management is such a pain
GitHubAutomatically generate and overlay subtitles for any video. - GitHub - Irvingouj/auto-subtitle: Automatically generate and overlay subtitles for any video.
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!
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)