File size of web-based flv. Reading some bytes from a web-based file

This is such a noobie question.

I have a file, http:// … /One-minute-commercial-027.flv (I can’t
enter the name because the email gets rejected with a 5.7.1 as spam,

I want to do two simple things:

  1. I want to get the file size. Please note that File.size() does not
    seem to work for me for a web-based file but does work for a local file.

=> 32406
irb(main):002:0> File.size(‘http:// … /One-minute-commercial-027.flv’)
Errno::EINVAL: Invalid argument - http:// something
from (irb):2:in size' from (irb):2 from C:/RailsInstaller/Ruby1.9.2/bin/irb:12:in

  1. I want to read a few hundred bytes from the beginning of the file so
    as to pick up the flv’s time duration.

Are there Ruby facilities to do this?

Ralph S.