Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

andy.sh (8643)

andy.sh
  (email not shown publicly)
http://andy.sh/

Journal of andy.sh (8643)

Tuesday December 16, 2008
10:05 AM

A brief story of a long way to find the trivial solution

[ #38099 ]

A couple of days ago I faced the problem. I had to get meta information of video files which were located on the remote server. Tool for that is basic ffmpeg. The problem is that it is not allowed to 1) download the file and 2) install ffmpeg on the remote server. Well, both restrictions might be removed, thus they were rather ideological rather then technical.

It was possible to install different FLV::Info et. al. on the remote machine, but then I would have to install a bunch of modules for every video format I use.

Straightforward solution was to create some script to cut the beginning of each file, gzip them and put to the web space to be downloaded from target server. It was quite obvious that file in most of formats used for video in the internet contain their meta information in the first several kilobytes.

I also asked in a mailing list and was suggested with another solution: organize file system either over ssh or ftp. (Un)fortunately it did not start working easy.

Today I tried to make a trick and typed URI of the remote file in a command line:

$ ffmpeg -i http://my.remote.server/my/remote/video/file.flv

And that works! Easy and stupid.

I also checked access log of the web server, and it really showed that the file was not fully downloaded. Even HTTP response code is for partial data: 206.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.