VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Member
    Join Date
    Nov 2008
    Location
    Canada
    Search Comp PM
    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.
    Quote Quote  
  2. 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
    Quote Quote  
  3. Member
    Join Date
    Nov 2008
    Location
    Canada
    Search Comp PM
    Originally Posted by cd090580
    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
    Thanks for the help but could you please be a little more specific? I should have pointed out that I know nothing when it comes to video media.
    Quote Quote  
  4. 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.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!