aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes image from video file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "image from video file " Watch "image from video file " New topic
Author

image from video file

anuja Edathu
Ranch Hand

Joined: Sep 09, 2005
Posts: 84
when i upload a video file i want to store the thumbnail for the first frame of the video. what steps should i follow inorder to achieve this?
Thanks
Anuja K
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42612
    
  65
You'll need to open the movie with an API that understands the movie file format, and which can extract single images. You didn't say which format that is, but QuickTime can read quite a few. The JMF API from Sun may also help, but it is no longer actively maintained.


Ping & DNS - my free Android networking tools app
anuja Edathu
Ranch Hand

Joined: Sep 09, 2005
Posts: 84
Thank you Ulf Dittmer for your reply , i need to upload video file of any format .Will this be possible with the above API.
I tried using JMF with a sample program from net


but when i run this im getting can not realize player Exception



can any one tell me what i am doing wrong about this and how can i correct it ?

Regards ,
Anuja K
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42612
    
  65
It looks like JMF can't handle the XVID file format. I don't think there's anything you can do about that, and I've no idea if QuickTime supports XVID. The easiest way to find out is probably to try and run the video through the QuickTime Player application.
anuja Edathu
Ranch Hand

Joined: Sep 09, 2005
Posts: 84
that reply was helpul, i found the jmf registry supports mpg and mpv . i changed URL url = new URL("file:/home/anuja/Desktop/lion.mpg");
now im not getting previous error but it seems ,
returns null thoguh fpc.seek() is not null . Any thoughts on this will be appreciated?
Thanks & Regards ,
Anuja K
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42612
    
  65
Are you sure that the movie is fully loaded? I'm not familiar with JMF, but maybe you need to use a mechanism like MediaTracker to determine when the image/movie is fully loaded.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: image from video file