I am trying to execute the code to determine the resolution of the video by running the ffmpeg utility as a subprocess and getting its output and analyzing it:
IO.popen 'ffmpeg -i ' + path_to_file do |ffmpegIO|
end
... but the ffmpeg output is still connected to stdout and ffmepgIO.readlines is empty. Is there any special treatment needed for the ffmpeg utility? Or is there another way to get ffmpeg output? I tested this code under WinXP and Fedora Linux - the results are the same.
source
share