Hello. I'm sorry if this is in the wrong section but here goes:
I am writing an application in Java that takes a user specified video file and converts it to h.624. The video file can be a variety of formats: Mpeg, wmv, etc.. What I would like to do is limit the video to 5 minutes, i.e. if the video is over 5 mins, it doesn't do the conversion. Further, the video files have no sound. I was wondering how I can determine the video length? Is there some general formula given the bitrate, size, type... etc??? I've found some purposed formula online but after testing out those formulas on some files, it doesn't work out. Any help would be appreciated. Thanks.
+ Reply to Thread
Results 1 to 4 of 4
-
-
Just use windows API, they will give you the length and other infos about the file.
or maybe you can read the header/index of the video file to get it's length -
Originally Posted by cd090580
-
filesize = bitrate x running time
So if you know two variables, you can figure out the third
Another option might be to use mediainfo which provides this information and more; perhaps you can integrate it into your application with a little programming, many other programs use it.
Similar Threads
-
VFR - Video Length Issue
By olcifaraga in forum EditingReplies: 0Last Post: 26th Apr 2012, 02:01 -
Change length of an AVI. Reduce/Increase Frame Length
By Buzwinkle in forum Authoring (DVD)Replies: 4Last Post: 10th Aug 2011, 08:08 -
flv with no video length
By tv3636 in forum Newbie / General discussionsReplies: 6Last Post: 30th May 2009, 15:47 -
VOB Conversion/Video Length
By koberulz in forum Newbie / General discussionsReplies: 7Last Post: 14th Dec 2007, 15:59 -
Video 2X the length of audio after demux
By pchan in forum EditingReplies: 6Last Post: 18th Sep 2007, 22:51