[gst-devel] videorate for encoded video

Farkas Levente lfarkas at lfarkas.org
Wed Sep 8 11:24:18 CEST 2010

On 09/08/2010 11:13 AM, Alexandru Csete wrote:
> On Wed, Sep 8, 2010 at 10:22 AM, Farkas Levente <lfarkas at lfarkas.org> wrote:
>> hi,
>> we'd like to make snapshots of an input encoded video stream.
>> does anybody have any tip how can we do this?
>> unfortunately videorate can only accept raw streams.
>> so suppose we've got a h264 input source and like to save the stream and
>> every 5 minutes a jpeg image, then this pipeline almost good:
>> ---------------------------
>> gst-launch -e rtspsrc
>> location="rtsp://a-h264-url" ! rtph264depay access-unit=true ! h264parse
>> ! tee name="t" ! queue ! matroskamux ! filesink location="test.mkv"  t.
>> ! queue ! ffdec_h264 ! videorate !
>> video/x-raw-yuv,framerate=1/300 !
>> ffmpegcolorspace ! jpegenc ! multifilesink location="frame%05d.jpg"
>> ---------------------------
>> but in this case we've to decode _all_ frames. and we'd like to save cpu
>> and only decode the required frames.
>> does anybody has any tips?
> Hi Levente,
> I don't think you can do that because h264 (and most other video
> codecs) rely heavily on inter frame compression. I guess one could do
> what you ask by only decoding the key frames, but that would probably
> require writing your own decoder.

or simple decode only the required i frame and a few p frames instead of
all i and p frames....
that's what i looking for...

  Levente                               "Si vis pacem para bellum!"

More information about the gstreamer-devel mailing list