Hi All, I want to read an audio/video file using rails. please suggest me how can i achieve it!! Thanks, Saurabh -- Posted via http://www.ruby-forum.com/.
On Oct 7, 9:25 am, Saurabh Peshkar <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> 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> Thanks, > > Saurabh > -- > Posted viahttp://www.ruby-forum.com/.
Frederick Cheung wrote:> On Oct 7, 9:25�am, Saurabh Peshkar <rails-mailing-l...@andreas-s.net> > 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 ? > > FredHi Fred, I want to read the file size, it''s duration, dimensions, codec and other such properties. Thanks Saurabh -- Posted via http://www.ruby-forum.com/.
On Wed, Oct 7, 2009 at 11:19 AM, Saurabh Peshkar <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Frederick Cheung wrote: >> On Oct 7, 9:25�am, Saurabh Peshkar <rails-mailing-l...@andreas-s.net> >> 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. >What have you found/tried so far? -- Leonardo Mateo. There''s no place like ~
Leonardo Mateo wrote:> On Wed, Oct 7, 2009 at 11:19 AM, Saurabh Peshkar > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >>> >> > What have you found/tried so far? > > -- > Leonardo Mateo. > 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 -- Posted via http://www.ruby-forum.com/.
Checkout this links http://raa.ruby-lang.org/project/ruby-audiofile/ http://ruby-audiofile.sourceforge.net/ I think this will help u... Thanks Brijesh Shah -- Posted via http://www.ruby-forum.com/.
Brijesh Shah 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 ShahHi 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 -- Posted via http://www.ruby-forum.com/.
No I don''t have ne idea abt this..I found these links by googling. -- Posted via http://www.ruby-forum.com/.
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 Peshkar <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Brijesh Shah 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 Shah > > 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 > -- > Posted viahttp://www.ruby-forum.com/.