can't get fps

8 views
Skip to first unread message

Macario Ortega

unread,
Oct 10, 2008, 7:50:18 PM10/10/08
to RVideo


Hi, i wan't to use rvideo in a rails app but I get this error while
trying to get the fps:


You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]
/Library/Ruby/Gems/1.8/gems/rvideo-0.9.3/lib/rvideo/inspector.rb:
455 :in `fps'
/Users/sistemasinteractivos/Sites/maqueta_cna/vendor/plugins/
attachment_fu_video_hack/lib/processor/ffmpeg.rb:47 :in `transcode'
/Users/sistemasinteractivos/Sites/maqueta_cna/vendor/plugins/
attachment_fu_video_hack/lib/processor/ffmpeg.rb:71 :in `transcode!'
/Users/sistemasinteractivos/Sites/maqueta_cna/vendor/plugins/
attachment_fu_video_hack/lib/processor/ffmpeg.rb:19 :in `call'
/Users/sistemasinteractivos/Sites/maqueta_cna/vendor/plugins/
attachment_fu_video_hack/lib/processor/ffmpeg.rb:19 :in `with_file'
/Users/sistemasinteractivos/Sites/maqueta_cna/vendor/plugins/
attachment_fu_video_hack/lib/processor/ffmpeg.rb:91 :in `with_file'
/Users/sistemasinteractivos/Sites/maqueta_cna/vendor/plugins/
attachment_fu_video_hack/lib/processor/ffmpeg.rb:71 :in `transcode!'
./vendor/plugins/attachment_fu_video_hack/spec/
attachment_fu_video_hack_spec.rb:105 :in `after_process_attachment'
/Users/sistemasinteractivos/Sites/maqueta_cna/vendor/plugins/
attachment_fu/lib/technoweenie/attachment_fu.rb:444 :in
`run_callbacks'
./vendor/plugins/attachment_fu_video_hack/spec/
attachment_fu_video_hack_spec.rb:132

def fps
453 return nil unless video?
454
455 /([0-9\.]+) fps/.match(video_stream)[1]
456 end
457
458# gem install syntax to get syntax highlighting


I've tried the following line in irb and the actual rails app:

RVideo::Inspector.new(:file => "video.mp4") and
RVideo::Inspector.new(:file => "video.mov", :ffmpeg_binary => '/opt/
local/bin/ffmpeg')

any ideas? does it has to do with my ffmpeg config?

heres the ffmpeg config:

=> "--prefix=/opt/local --disable-vhook --mandir=/opt/local/share/man
--enable-shared --enable-pthreads --disable-mmx --cc=gcc-4.0 --enable-
libmp3lame --enable-gpl --enable-libfaac --enable-libfaad --enable-
libxvid --enable-libx264 --enable-liba52"


Thing is I have another ffmpeg instalation i did from source, may it
have something to do with it?

Thanks!!

Jon Dahl

unread,
Oct 13, 2008, 10:50:08 AM10/13/08
to RVideo
Hi Macario - this could be a ffmpeg version incompatibility, or
something else. Can you run the following command on the failing file,
and paste the output to this forum? That will let us troubleshoot it a
bit more.

ffmpeg -i /path/to/video.mp4

Copy the entire output that this gives. If you want, you can try it
with both versions of ffmpeg that you have.

Cheers,
Jon

macario

unread,
Oct 15, 2008, 4:01:09 PM10/15/08
to rvi...@googlegroups.com

Hi, Sorry for the delay in my answer


This is what igot from /opt/local/bin/ffmpeg -i video.mov

FFmpeg version SVN-r14381, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --prefix=/opt/local --disable-vhook --mandir=/opt/local/share/man --enable-shared --enable-pthreads --disable-mmx --cc=gcc-4.0 --enable-libmp3lame --enable-gpl --enable-libfaac --enable-libfaad --enable-libxvid --enable-libx264 --enable-liba52
  libavutil version: 49.7.0
  libavcodec version: 51.60.0
  libavformat version: 52.18.0
  libavdevice version: 52.0.0
  built on Oct  8 2008 16:10:38, gcc: 4.0.1 (Apple Inc. build 5465)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mov':
  Duration: 00:02:06.75, start: 0.000000, bitrate: 362 kb/s
    Stream #0.0(eng): Audio: libfaad, 32000 Hz, mono
    Stream #0.1(eng): Video: qtrle, rgb24, 800x600, 29.97 tb(r)


The ffmpeg binary I been was installed a few days ago via mac ports, I've tried with other videos and get the same error.

Thanks!!


2008/10/13 Jon Dahl <jon...@gmail.com>
Reply all
Reply to author
Forward
0 new messages