Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

image from video file

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
anuja Edathu
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic