excitoon/video-remove-silence

AttributeError: 'module' object has no attribute 'run'

Mmoo1919 opened this issue · 2 comments

Trying to set this up to use with a video I have. Every time I run it I get an error.

I'm using this command:

python video-remove-silence test.mp4

and I get this error:

Extracting audio...
Traceback (most recent call last):
  File "video-remove-silence", line 131, in <module>
    extract_audio(args.path, audio_file.name)
  File "video-remove-silence", line 125, in extract_audio
    subprocess.run(command, stderr=subprocess.PIPE).check_returncode()
AttributeError: 'module' object has no attribute 'run'

Using ubuntu on windows 10 with python 3.5.6

I changed something and now I am getting this error:

Extracting audio...
Traceback (most recent call last):
  File "./video-remove-silence", line 131, in <module>
    extract_audio(args.path, audio_file.name)
  File "./video-remove-silence", line 125, in extract_audio
    subprocess.run(command, stderr=subprocess.PIPE).check_returncode()
  File "/usr/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['ffmpeg', '-i', 'test.mp4', '-acodec', 'pcm_s16le', '-f', 'wav', '-y', '/tmp/tmpglclh5ns']' returned non-zero exit status 1.

subprocess.run shall work on Python 3.5 🤷‍♂️

About second thing, I don't know if it is still worth answering but just in case, looks like ffmpeg can not read audio stream from that file. I would run that command and checked the output of ffmpeg.