[gst-devel] Converting a videostream to individual frames and vice versa
Tim Müller
t.i.m at zen.co.uk
Sun May 14 14:23:51 CEST 2006
On Sun, 2006-05-14 at 22:11 +0200, Jaap Haitsma wrote:
> Is it possible to make a pipeline that converts for example an mpeg2
> file to one jpeg file for every frame? And vice versa?
>
> To clarify even more I'd like to convert video.mpg which contains 250
> frames to:
> video.001.jpg
> video.002.jpg
> video.003.jpg
mpeg2 to jpeg is easy, just use a pipeline like:
filesrc location=foo.mpg ! decodebin ! ffmpegcolorspace ! jpegenc !
fakesink signal-handoffs=true
in a program and connect to fakesink's "handoff" signal. There you get
one encoded jpeg frame as a buffer. Just keep a counter and write it to
file.
The other way around is fairly easy as well, but I think the mpeg2enc
element might need to be ported to 0.10 first.
Cheers
-Tim
More information about the gstreamer-devel
mailing list