BingLingGroup / autosub

Command-line utility to transcribe/translate from video/audio/subtitles to subtitles
GNU General Public License v2.0
1.99k stars 245 forks source link

Unix subprocess.check_output compatibility #47

Closed haleyngonadi closed 5 years ago

haleyngonadi commented 5 years ago

Please forgive my ignorance but I'm trying to get this working. When I run autosub -i myvideoFilter.wav

It immediately returns an error:

Convert source audio to "/var/folders/fz/_m3hd8n524x47ktcbwj4f6g00000gn/T/tmpq5j6nows.wav" and get audio length for regions detection.
ffmpeg -hide_banner -y -i "myvideoFilter.wav" -ac 1 -ar 48000 "/var/folders/fz/_m3hd8n524x47ktcbwj4f6g00000gn/T/tmpq5j6nows.wav"
Traceback (most recent call last):
  File "/usr/local/bin/autosub", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/autosub/__init__.py", line 142, in main
    no_audio_prcs=no_audio_prcs)
  File "/usr/local/lib/python3.7/site-packages/autosub/cmdline_utils.py", line 812, in audio_or_video_prcs
    subprocess.check_output(command, stdin=open(os.devnull), shell=False)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 376, in check_output
    **kwargs).stdout
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 453, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 756, in __init__
    restore_signals, start_new_session)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1499, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg -hide_banner -y -i "myvideoFilter.wav" -ac 1 -ar 48000 "/var/folders/fz/_m3hd8n524x47ktcbwj4f6g00000gn/T/tmpq5j6nows.wav"': 'ffmpeg -hide_banner -y -i "myvideoFilter.wav" -ac 1 -ar 48000 "/var/folders/fz/_m3hd8n524x47ktcbwj4f6g00000gn/T/tmpq5j6nows.wav"'

At which stage is the file supposed to be generated?

BingLingGroup commented 5 years ago

It seems like a unix subprocess command issue. I will try to test it on an Ubuntu and do some research.

BingLingGroup commented 5 years ago

Commit f0ab2e1 should fix this issue. Thanks for your feedback.