0

I am trying to start a ffmpeg subprocess

the following command works perfectly

ffmpeg -f alsa -r 16000 -i hw:2,0 -f video4linux2 -s 800x600 -i /dev/video0 -r 30 -f avi -vcodec mpeg4 -vtag xvid -qscale 0 -acodec libmp3lame -ab 96k /home/Desktop/output.avi

when I try this

process = subprocess.Popen(['ffmpeg', '-f alsa', '-r 16000', '-i hw:2,0', '-f video4linux2', '-s 800x600', '-i /dev/video0', '-r 30', '-f avi', '-vcodec mpeg4', '-vtag xvid', '-qscale 0', '-acodec libmp3lame', '-ab 96k', '/home/Desktop/output.avi')])

I get this error

Unrecognized option 'f alsa'.
Error splitting the argument list: Option not found
asked May 15, 2014 at 14:25

1 Answer 1

8

As the error states:

Unrecognized option 'f alsa'.

So each argument needs to be it's own array element:

process = subprocess.Popen(['ffmpeg', '-f', 'alsa', '-r', '16000', ....
answered May 15, 2014 at 14:29
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.