How to call FFMPEG using Rails?

Basically i am wondering how to call ffmpeg in rails so i can read video
files in order to get their properties? My goal is to have ffmpeg read
thru a list of video files and then take their properties and place
these properties along with the name in a sql table.

Andrew M wrote:

Basically i am wondering how to call ffmpeg in rails so i can read video
files in order to get their properties? My goal is to have ffmpeg read
thru a list of video files and then take their properties and place
these properties along with the name in a sql table.

You can call a shell program using backticks ffmpeg ...options... If
there’s a way to get the program to output the infirmation you require
to stdout, you can capture it and store it.

This is more a Ruby question, than a Rails one, I think. Sorry I can’t
be more help.

A.

Alan F. wrote:

This is more a Ruby question, than a Rails one, I think. Sorry I can’t
be more help.

Here, for example, is some ruby code that captures ssh-agent output
and uses it.

The %x{…} is the same as the backticks I think.

http://www.joeygibson.com/blog/2004/01/07

Shouldn’t be a strech to run ffmpeg instead and take the parsed output
and put it in a model.

Alan