I am trying to run this command here:
f = open("|ffmpeg -i /Users/joaoh82/Desktop/teste.MP4")
result = f.read()
But I am not getting any response…
But when I try this command in the terminal it works great:
ffmpeg -i /Users/joaoh82/Desktop/teste.MP4
But now on rails code. Funny thing is that when I try the same thing with some else like an echo $PATH it works great! Like:
f = open("|echo $PATH")
result = f.read()
Any ideas!?
ffmpeg -iprints to stderr, which won’t be captured by your pipe. You could redirect stderr to stdout: