running
a = `ffmpeg -i video.mp4`
does not seem to give the output of the command into a… Why is that? how do override it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Quick answer:
Detailed answer:
When I ran
ffmpeg -i blah.avion a handy file, I noticed that none of its output when out to standard out; instead, all the output when to standard error. You can check yourself at the shell by running:Then look at both
/tmp/standard_outand/tmp/standard_error. You’ll see which one is which quickly. You can quickly ‘fix’ this by usingffmpeg -i video.mp4 2>&1in your script, which will ask the shell to redirect stderr along with stdout. You won’t be able to tell the difference between stderr and stdout, but you can get the output you ‘see’ easily enough.You’ll have to use popen3 if you want to keep stdout and stderr separate.