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

Fix a bug in parameters variable #704

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

farisalasmary
Copy link

I was trying to read a very large MP4 file and convert to WAV so I provided some parameters to from_file function in the argument parameters.
My parameters were:

parameters = ['-ac', '1', '-ar', '16000']

which means that the resultant audio file should have 16K sample rate and the number of channels should be 1 (mono) but that did not work!
After investigation, I found that the parameters are added it the end of the command and the command will be something like:

ffmpeg -y -i my_video.mp4 -acodec pcm_s16le -vn -f wav - -ac 1 -ar 16000

I changed it to add parameters in the middle where the command should look like this:

ffmpeg -y -i my_video.mp4 -ac 1 -ar 16000 -acodec pcm_s16le -vn -f wav -

and it worked!!

@farisalasmary
Copy link
Author

Hi @jiaaro,

Can you kindly merge this pull request as it is heavily used in my current projects?

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

Successfully merging this pull request may close these issues.

None yet

1 participant