Accessing Ouput from the Shell


#1

Basically i am running input via rails into ffmpeg which is a shell
program. Is there a way i can take the output of the shell and store it
into a string? or any other form that i can manipulate.

andrew
p.s. i am trying to read the dimensions of a video file via ffmpeg and
use this value in my rails app.


#2

Andrew M. wrote:

Basically i am running input via rails into ffmpeg which is a shell
program. Is there a way i can take the output of the shell and store it
into a string? or any other form that i can manipulate.

andrew
p.s. i am trying to read the dimensions of a video file via ffmpeg and
use this value in my rails app.

I seem to remember answering this very question here on the list, and
searching on ruby-forum.com shows it having been asked twice already by
someone called Andrew (you or someone else), and answered twice.

Please see: http://www.ruby-forum.com/search?query=ffmpeg&submit=Search

for a few answers.

Alan