Capture a frame from AVI/MOV

P

pjsenthil

Hi,


I am writing code in CGI-perl,in which i am want to capture
frames from a media player which runs mpeg or any video.(mov file in
Quick time).'

the purpose of doing this is to generate thumbnails (snapshot ) of the
video when it is in the play mode..

Friends pl help..Becoz i am not familiar in working on images.

Regards
Senthil
 
M

Mumia W.

Hi,


I am writing code in CGI-perl,in which i am want to capture
frames from a media player which runs mpeg or any video.(mov file in
Quick time).'

the purpose of doing this is to generate thumbnails (snapshot ) of the
video when it is in the play mode..

Friends pl help..Becoz i am not familiar in working on images.

Regards
Senthil

Perhaps you should get mplayer and investigate
mplayer's command line parameters. Because mplayer
creates something other than a normal X Window, you'll
probably not be able to simply take a snapshot of the
window image. Instead, you'll want to command mplayer
to output one of the video frames to disk.

HTH
 
P

pjsenthil

First of all thanx for your reply.
I read the mplayer. there is option like converting the whole video
file into frames..but not the required frame.

That option is also there "grab_frame" but it is not implemented.


one more thing..I have to embed the Mplayer into a web page.how can i
do that .

and also how can i control the command line options Mplayer from my
perl code.through which package can i able to do it.

Regards
Senthil
 
V

Vilmos Soti

I read the mplayer. there is option like converting the whole video
file into frames..but not the required frame.

This is how I extract a specific frame through mplayer:

mplayer -vo jpeg -ao null -ss $icon_time -frames 2 avifile.avi

Check the -ss switch in the manpage. You might also want to check
the -vo switch, and use png instead of jpeg depending on your needs.

You need to extract 2 frames, since the first will be the very
first frame of the video, and the second one is the one you need.
That option is also there "grab_frame" but it is not implemented.

Where is it? In the source? I couldn't find it in the manpage.

Vilmos
 
P

pjsenthil

Thanx For your reply..I am able to get a single frame.as u have told..

And now i am not able to idea.how to embed it into a webpage .

actually my idea was to embed it on my page and play video and when he
want a particular frame he can get that frame.

so how can i control the Mplayer from my perl code .is there and
package for it to do..
ie the commmand line how can i invoke from perl script.
Regards
Senthil

Vilmos said:
This is how I extract a specific frame through mplayer:

mplayer -vo jpeg -ao null -ss $icon_time -frames 2 avifile.avi

Check the -ss switch in the manpage. You might also want to check
the -vo switch, and use png instead of jpeg depending on your needs.

You need to extract 2 frames, since the first will be the very
first frame of the video, and the second one is the one you need.


Where is it? In the source? I couldn't find it in the manpage.


******And regarding the grab frame option ..it is given in
slave.txt.*******
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top