Audio/video file read

Hi All,

I want to read an audio/video file using rails.

please suggest me how can i achieve it!!

Thanks,

Saurabh

On Oct 7, 9:25 am, Saurabh P. [email protected]
wrote:

Hi All,

I want to read an audio/video file using rails.

please suggest me how can i achieve it!!

Well at a basic level File.read will read the bytes from any file, but
I rather suspect that isn’t the answer you are looking for. What do
you want to do with these files ?

Fred

Frederick C. wrote:

On Oct 7, 9:25�am, Saurabh P. [email protected]
wrote:

Hi All,

I want to read an audio/video file using rails.

please suggest me how can i achieve it!!

Well at a basic level File.read will read the bytes from any file, but
I rather suspect that isn’t the answer you are looking for. What do
you want to do with these files ?

Fred

Hi Fred,

I want to read the file size, it’s duration, dimensions, codec and other
such properties.

Thanks

Saurabh

Leonardo M. wrote:

On Wed, Oct 7, 2009 at 11:19 AM, Saurabh P.
[email protected] wrote:

What have you found/tried so far?


Leonardo M…
There’s no place like ~

I use the File class, which had given me time(@file.atime) and
size(@file.size)
but not getting the audio/video properties(e.g duration, sampling rate…
) as such.

Thanks

Saurabh

On Wed, Oct 7, 2009 at 11:19 AM, Saurabh P.
[email protected] wrote:

What have you found/tried so far?


Leonardo M…
There’s no place like ~

Checkout this links

http://raa.ruby-lang.org/project/ruby-audiofile/

I think this will help u…

Thanks
Brijesh S.

No I don’t have ne idea abt this…I found these links by googling.

Brijesh S. wrote:

Checkout this links

http://raa.ruby-lang.org/project/ruby-audiofile/
http://ruby-audiofile.sourceforge.net/

I think this will help u…

Thanks
Brijesh S.

Hi Brijesh

Thanks for the links

I had gone through them, but ruby extconf.rb is throwing an error, do
you have any idea about this:

checking for afOpenFile() in -laudiofile… no
*** ERROR: need to have all of this to compile this module
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
–with-opt-dir
–without-opt-dir
–with-opt-include
–without-opt-include=${opt-dir}/include
–with-opt-lib
–without-opt-lib=${opt-dir}/lib
–with-make-prog
–without-make-prog
–srcdir=.
–curdir
–ruby=/usr/bin/ruby
–with-audiofile-dir
–without-audiofile-dir
–with-audiofile-include
–without-audiofile-include=${audiofile-dir}/include
–with-audiofile-lib
–without-audiofile-lib=${audiofile-dir}/lib
–with-audiofilelib
–without-audiofilelib

thanks,

Saurabh

You’re missing the audiofile-dev on your linux distribution… is it
installed, and is it ruby-dev installed too?

On Oct 7, 10:15 am, Saurabh P. [email protected]