Video Frame as Image - Help

Hello,

I am having some serious problems in trying to get this working

so if u have any idea to get it working please help.

Aim : I need screen shots of a movie, what that means is I need certain frames of the movie as images. Say for example, the first frame, the 20th frame, and the 60the frame, ( eg for a 100 frame movie)

I have been breaking my head with FramePositioningControl and FrameGrabbingControl it keep returning null :(

I need this to work for all types of movies that i can play with JMF Player. So please tell me if there is any way to get a particular frame from a movie as an image.

I have looked at vid2jpg.zip and have no clue how to use it.

Thanks in advance.

[730 byte] By [--stallion--a] at [2007-11-27 2:45:19]
# 1
Re vid2jpg.zip :-Using Windows on a PC, unzip it into a folder. Put you video in that folder. Edit run.bat to replace testcam04.avi with the name of your video file. Hit on run.bat and look in the images folder.
andyblea at 2007-7-12 3:12:45 > top of Java-index,Security,Cryptography...
# 2
hi Iam new to JMF.I also need to convert video into jpg images.have u solved the problem.If u have plz can u send the codes to d.kokila@yahoo.co.in
kokilaaa at 2007-7-12 3:12:45 > top of Java-index,Security,Cryptography...
# 3
http://java.sun.com/products/java-media/jmf/2.1.1/solutions/index.html http://www.exactfutures.com/index02.htm
andyblea at 2007-7-12 3:12:45 > top of Java-index,Security,Cryptography...
# 4
Hi, I am still having problems with MPEG4 videosvid2jpg.zip and FrameAccess.java both give an error " The input media does not contain a video trac"Please help, I am trying to get screen shots form MPEG4 and H.264 video formats.Thanks
--stallion--a at 2007-7-12 3:12:45 > top of Java-index,Security,Cryptography...
# 5
Try running vid2jpg or your version of same from the folder it unzipped into.See sun.bat which works for the included example lotr.mp4.It uses fobs4jmf etc in that folder.
andyblea at 2007-7-12 3:12:45 > top of Java-index,Security,Cryptography...
# 6
Thanks, You are a Legend !!
--stallion--a at 2007-7-12 3:12:45 > top of Java-index,Security,Cryptography...
# 7
Hi andyble Can you help me in modifying FrameAccess.java, such that it returns the desired frame as a image.kindly suggest an approachthanks.
--stallion--a at 2007-7-12 3:12:45 > top of Java-index,Security,Cryptography...
# 8

Either of the AccessFrame methods illustrate how to get each Buffer抯 timestamp and sequence number, so you may only need to run through the frames until you get to the ones you want via code.

It may be better to use vid2jpg because that puts all frames into the images folder, and each has a filename which presently includes the timestamp, so you could read these directly.

andyblea at 2007-7-12 3:12:45 > top of Java-index,Security,Cryptography...
# 9

Hi,

Thanks for the help.

I fixed the problem using frameAccess, what i did was converted the buffer of the out codec to an image, using buffertoImage. It works good.

The problem with vid2jpg, is that after i installed fobs, it some how cant find the sun.native codec anymore so it does not compile.

Anyways, thanks for all the help

--stallion--a at 2007-7-12 3:12:45 > top of Java-index,Security,Cryptography...