[Ffmpeg-devel] [Ffmpeg-user] Capture a frame in a JPEG ffile:continued

Vlad GURDIGA gurdiga
Thu Mar 22 17:23:27 CET 2007


Hello,

I decided to give you some more information so you could more easy
give me a piece of advice.

> I apologize for previous disaster. I was so happy that i found someone
> I can ask about this, that I did not read before post. :>
> What i want to achieve using APIs, is the equivalent to this command
> line:
> ffmpeg.exe -i test.avi -ss 0:0:5.0  -vframes 1  -vcodec png  -y -f \
>     image2 frame.png

As I said before, until now I only managed to capture 10 frames to 10
files in PPM format, as it was in the example enclosed to the tutorial
(http://www.inb.uni-luebeck.de/~boehme/libavcodec_update.html). I
guess it only needs a slight modification to save the frames in JPEG
files, but I cannot figure it out because I did not get so deep into
the theory. I have attached my working C# code, hope will be
comprehensible for C/C++ developers too. I could not insert it in line
because lines are too long. A note on code: VideoUtils is a small
library that imports the functions I use and implements structures,
constants and enumeration types. All the "action" is in the Create()
method.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VideoThumbnail.cs
Type: application/octet-stream
Size: 5483 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070322/ff09820e/attachment.obj>



More information about the ffmpeg-devel mailing list