Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: finding video features using JMF

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question finding video features using JMF

    hii
    i am trying to find the features of video like its length,bit rate and other meta information
    but the problem is when i am unable to find the length of the video without actually playing using the Player class.i have tried the code given below

    URL url = this.getClass().getResource( resourceName );
    Player p = Manager.createPlayer( url );
    p.start();
    int state = p.getState();
    while( state != Controller.Started )
    {
    try
    {
    Thread.sleep( 100 );
    state = p.getState();
    }
    catch( Exception e )
    {
    e.printStackTrace();
    }
    }
    Time duration = p.getDuration();

    is it not possible to find the length of the video without actually playing it????please help me regarding this


  2. #2
    Super Moderator Sean4u's Avatar
    Join Date
    Jul 2011
    Location
    Tavistock, UK
    Posts
    637
    Thanks
    5
    Thanked 103 Times in 93 Posts

    Default Re: finding video features using JMF

    I'm not familiar with JMF but the Interweb suggests you should be able to do it:
    jmf player getduration - Google Search
    and there might even be
    Getting .mp3 Duration Of A JMF - Java | Dream.In.Code
    a couple of ways of doing it
    Finding Duration of an MP3 file in Java - Stack Overflow

Similar Threads

  1. WORKING BUT SOME FEATURES NOT
    By kariolos in forum What's Wrong With My Code?
    Replies: 16
    Last Post: May 26th, 2011, 06:25 AM
  2. new features in bug tracking tools
    By ssiklib in forum Web Frameworks
    Replies: 0
    Last Post: April 5th, 2011, 02:34 AM
  3. Replies: 2
    Last Post: March 16th, 2011, 06:32 AM
  4. CVS features in Eclipse
    By bbr201 in forum Java IDEs
    Replies: 5
    Last Post: August 11th, 2010, 06:12 AM
  5. jmf , video with hopes of AR
    By wolfgar in forum Java SE APIs
    Replies: 0
    Last Post: December 4th, 2009, 04:54 AM