• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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: 43081
77
  • 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: 43081
77
  • 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: 43081
77
  • 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.
 
Legend has it that if you rub the right tiny ad, a genie comes out.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic