Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Java in General
Get Frame Rate and Resolution from a video file
Chia-you Chai
Greenhorn
Posts: 13
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello, I want to get the frame rate, fps and resolution from a video file store in the local disk. Does any
java
api or library can help me to get such information ? Thanks a lot
Rob Spoor
Sheriff
Posts: 22862
132
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Perhaps the Java Media Framework (JMF) can help you out.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions
How To Answer Questions
Chia-you Chai
Greenhorn
Posts: 13
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Finally JMF helps a lot. You can call the getFormat method by specify a locator instance.
public Format getFormat(MediaLocator locator) throws NoProcessorException, IOException { final Processor processor = Manager.createProcessor(locator); processor.configure(); final List fmts = new ArrayList(); processor.addControllerListener(new ControllerListener() { @Override public void controllerUpdate(ControllerEvent evt) { if (evt instanceof ConfigureCompleteEvent) { for (TrackControl o : processor.getTrackControls()) { fmts.add(o.getFormat()); } if (fmts.isEmpty()) { fmts.add(null); } processor.close(); } } }); while (fmts.isEmpty()) { try { Thread.sleep(100); } catch(InterruptedException ignored) {} } format = (Format) fmts.get(0); return format; }
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Retrieving any frame from the video in the database.
C/C++ program to read an AVI file
Handy-Cam Features...
image from video file
How to get an image from .mp4 file
More...