Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to find the run time of a media file

 
sachin yadav
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is nothing specific in JSP for doing this.
Moving to General Computing.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic