> hi
>
> I am given the URL of a video file [Real/Windows media]. Is there
> anyway to find the length of the video and size of that file
> programatically [Java/Linux]?
If the URL points to a local file, then you should be able to determine
the size of the file easily. To determine the length of the video, you would
need to understand the file format of the video to decode it. Hopefully the
length info is in the header, and you can just read that; Otherwise, you
might need to decode the entire video stream to determine its length.
If the URL points to some remote server, you'll just have to pray that
whatever protocol the URL specifies (HTTP, FTP, or something else) allows
you to ask for the size of the file from the sever, rather than downloading
the whole file locally before performing all your analysis. Similarly, if
the protocol allows you to somehow get the video length, great. Otherwise,
you'll have to download the header (if there is one), and parse it.
- Oliver
BG Mahesh - 18 Jan 2006 07:42 GMT
hi
It is not a local file. Assume it is a Real/WMV file is there some site
I could use to figure out how to parse the header?
-- Mahesh
Oliver Wong - 18 Jan 2006 15:25 GMT
> hi
>
> It is not a local file. Assume it is a Real/WMV file is there some site
> I could use to figure out how to parse the header?
You should read up on the file formats for Real and WMV. Or you could
try reverse engineering the file formats.
- Oliver