Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Capture a frame from AVI/MOV

Reply
Thread Tools

Capture a frame from AVI/MOV

 
 
pjsenthil@gmail.com
Guest
Posts: n/a
 
      07-12-2006
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

 
Reply With Quote
 
 
 
 
Mumia W.
Guest
Posts: n/a
 
      07-12-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> 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

 
Reply With Quote
 
 
 
 
pjsenthil@gmail.com
Guest
Posts: n/a
 
      07-12-2006
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

Mumia W. wrote:
> (E-Mail Removed) wrote:
> > 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


 
Reply With Quote
 
Vilmos Soti
Guest
Posts: n/a
 
      07-12-2006
(E-Mail Removed) writes:

> 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
 
Reply With Quote
 
pjsenthil@gmail.com
Guest
Posts: n/a
 
      07-13-2006
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 Soti wrote:
> (E-Mail Removed) writes:
>
> > 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.



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


>
> Vilmos


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen Capture With Mouse , Mouse Position Capture Max Java 7 08-08-2009 11:51 PM
SuperVideoCap work as a broadcast capture and screen capture and record tool. hely0123 Media 0 10-30-2007 08:59 AM
Want to capture the first frame or something as a thumbnail baroque Chou ASP .Net 0 03-03-2006 05:05 PM
Frame Relay Capture? Eric Gamess Cisco 8 08-30-2005 01:03 PM
1 Frame per second frame capture rate Don and Liz Campbell Digital Photography 4 03-25-2005 02:47 PM



Advertisments