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

Video snapshot in java

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can a program be developed in java, which would get the snapshot of the first frame of a video file programmatically?

Please provide some links or sample codes.

Thanks a lot in advance.
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like the job of JNI or JMF.

With JNI, you can develop a bridge to a native library to capture what you want. I guess ffmpeg library is a good choice for this aim. Check the url below as an example of this: http://sourceforge.net/projects/jffmpeg/

And if JMF supports this somehow, you can use it:
http://java.sun.com/products/java-media/jmf/
 
fahad siddiqui
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't understand something, this library ffmpeg is a supporting library for Java. So using apis in this, the snapshot scenario can be achieved? Why would i need a native call?

Also, if i would need a native call, then would i have to write a system hook in C for screen capture or something like this? Please elaborate a little more on this.

I haven't been able to try the library, very busy currently.
 
rohit leeta
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as i know, you should try JMF first. IF it supports capturing for the video format you plan to use then there is no problem: you can use JMF.

But if it does not support this for that video format (You know codecs are also important) then you will need a more powerful solution and ffmpeg is a well know video processing library. I guess it will have that functionality but it is not written in Java which means you will need to bridge it or use an existing bridge for accessing it from Java.
 
fahad siddiqui
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, i will try it out in a couple of days and let you know.
 
Just let me do the talking. Ahem ... so ... you see ... we have this tiny ad...
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic