Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

How to determine the length of a video file?

Thread view: 
BG Mahesh - 13 Jan 2006 03:01 GMT
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]?

-- Mahesh
Oliver Wong - 16 Jan 2006 15:51 GMT
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.