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? thanks in advance. regards. -- Levente "Si vis pacem para bellum!" ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Wed, Sep 8, 2010 at 10:22 AM, Farkas Levente <[hidden email]> 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. Alex ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On 09/08/2010 11:13 AM, Alexandru Csete wrote:
> On Wed, Sep 8, 2010 at 10:22 AM, Farkas Levente <[hidden email]> 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!" ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |