Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Mmoo1919 opened this issue Apr 26, 2020 · 2 comments
Open

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

Mmoo1919 opened this issue Apr 26, 2020 · 2 comments

Comments

@Mmoo1919
Copy link

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

@Mmoo1919
Copy link
Author

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.

@excitoon
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants