wood burning stoves 2.0*
The moose likes General Computing and the fly likes    	how to find the run time of a  media file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "   	how to find the run time of a  media file" Watch "   	how to find the run time of a  media file" New topic

how to find the run time of a media file

sachin yadav
Ranch Hand

Joined: Nov 24, 2005
Posts: 156
hi ranchers,

I am developing a web application where a user can upload media files of format *.avi,*.mpeg ect. Now i have to calculate the run time of that media file and put the same in the database along with the file. The run time is something like when we run a avi file in media file we can see the total run time in status bar. i have to implement exactly that thing.
i have no clue about how do do this stuff. I just found javax.sound api but that's not helpfull in my case.can somebody please suggest something.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

There is nothing specific in JSP for doing this.
Moving to General Computing.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41124
There are various Java APIs for dealing with media formats, e.g. JMF from Sun (although I believe that's come to a dead end in its life), and QuickTime from Apple. Both can play various formats, and should be able to tell you how long the runtime is.

Ping & DNS - my free Android networking tools app
jQuery in Action, 2nd edition
subject: how to find the run time of a media file
Similar Threads
How to play (with pause, stop, etc.) movies in a java app (or is JMF really dead?)
tomcat style startup - shutdown
recursive calls to constructor..
Problem when palying audio
Streaming content and SOAP