views:

52

answers:

0

I'm using the HeyWatch gem for video conversion in my Rails app. It works great, but I’m getting different results from Video.create, depending on which machine I use. I’m using the same Rails app (updated from svn), same Rails version 2.3.4, same Heywatch gem 0.0.1 (uninstalled/reinstalled). Ruby is 1.8.6 on both, as well.

On my laptop and the server, Video create returns this object:

--- !ruby/object:HeyWatch::Video  attributes: 
    updated_at: 2009-07-14 07:56:27 -07:00
    specs: 
      audio: 
        sample_rate: 44100
        stream: 0.0
        codec: aac
        bitrate: 0
        channels: 2
      size: 907
      thumb: <a href="http://raw-2.heywatch.com/thumbs/03f10dc415/CGI.16348.0.jpg"&gt;http://raw-2.heywatch.com/thumbs/03f10dc415/CGI.16348.0.jpg&lt;/a&gt;
      mime_type: video/quicktime
      video: 
        container: mov
        aspect: 1.33
        stream: 0.1
        codec: h264
        length: 3
        bitrate: 2397
        height: 300
        fps: 29.97
        width: 400
    title: h264
    id: 1441495
    created_at: 2009-07-14 07:56:27 -07:00

But on my iMac the same code produces this:

Video create: --- !ruby/object:HeyWatch::Video 
attributes: 
  video: 
    updated_at: 2009-07-14 07:56:27 -07:00
    specs: 
      audio: 
        sample_rate: 44100
        stream: 0.0
        codec: aac
        bitrate: 0
        channels: 2
      size: 907
      thumb: <a href="http://raw-2.heywatch.com/thumbs/03f10dc415/CGI.16348.0.jpg"&gt;http://raw-2.heywatch.com/thumbs/03f10dc415/CGI.16348.0.jpg&lt;/a&gt;
      mime_type: video/quicktime
      video: 
        container: mov
        aspect: 1.33
        stream: 0.1
        codec: h264
        length: 3
        bitrate: 2397
        height: 300
        fps: 29.97
        width: 400
    title: h264
    id: 1441495
    created_at: 2009-07-14 07:56:27 -07:00

Everything is wrapped in a “video” attribute. Any idea what could be causing this? If I create a simple script on the iMac to simulate this, it works fine (no wrapping “video” attribute), so it’s something specific about the way Rails and my iMac interact. Again, same code on both machines, same Rails version, same video file.

Any ideas what may be causing this? I’m stumped.