title: Rails get video or audio file time duration uploaded to AMAZON S3
body: <p>In our rails app, we are uploading mp3/mp4 files directly to s3. We need to find the duration of video/audio and store it on the table. Just I tried <code>mp4info</code> gem</p>
  
  <pre><code>require 'taglib'
  require 'mp4info'
  
  file = "livetouch-test.mp4"
  info = MP4Info.open(file)
  p info.SECS
  </code></pre>
  
  <p>This provides video length, but this expecting video should be store locally. On rails app, videos/audios are available on s3 only. Anyone know how to get s3 uploaded file duration on RoR</p>