By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,885 Members | 1,072 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,885 IT Pros & Developers. It's quick & easy.

How to capture images from video?

P: n/a
Hello all:

I'd like to grab images from video (wmv format, a physical file stored
in the host or even a streaming video, e.g. mms://abc.com/test.wma).

Is there any solution that after I put the timecode into the the
module, the PHP can return to the image corresponding to the timecode.

How can I do this? Thanks

Apr 12 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
I have been searching this for years too
and this is the only solution I have found:
http://ffmpeg-php.sourceforge.net/
"Pete Chen" <pe********@gmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Hello all:

I'd like to grab images from video (wmv format, a physical file stored
in the host or even a streaming video, e.g. mms://abc.com/test.wma).

Is there any solution that after I put the timecode into the the
module, the PHP can return to the image corresponding to the timecode.

How can I do this? Thanks

Apr 12 '06 #2

P: n/a
>From http://www.pantz.org/blog/blog-10-2005.shtml

mplayer /video/videoname.ext -vo jpeg:quality=90,optimize=100 -ss 6
-frames 90

The above command uses mplayer to play the video file and uses
mplayer's video output driver for JPEG. It starts on the 6th second of
the video and grabs 90 frames (3 seconds of video)

Apr 12 '06 #3

P: n/a
Thanks, Yannick Benoit.

I've tried ffmpeg-php before I left my question.

I don't know why my Apache server always crashes while I am trying to
execute my

code to produce an image from ffmpeg.

Any suggestion?

Apr 14 '06 #4

P: n/a
Thanks, fletch. I use your solution to successfully producing images
from video.

But I still have two questions.

1. mplayer always produces the 1st frame images of the 1st sec.
whatever I use -ss to start from xxx sec.

For example:

mplayer 20060406.wmv -vf scale=720:480 -vo jpeg:quality=90,optimize=100
-ss 300 -frames 1

The above command line always produces two images. The first one is the
1st frame images of the 1st sec. The second one is what I really want.

2.Mostly, mplayer cannot go to right timecode I want it to do.

For example:

I use -ss 300 to play the video staring the 300th sec. But it will play
starting the 285th sec.

Hope you can help me out, and thanks in advance.

Apr 14 '06 #5

P: n/a
Never really tried this just knew mplayer could do that sort of thing
and googled to that effect. Don't really know much more I'm afriad.
This conversation is probably best conducted on an mplayer specifc ng
or maillist now.

Apr 14 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.