Cant take an immediate screenshot image of static video from h264 rtp stream

anno domini genericgroupmail at gmail.com
Thu Sep 18 08:30:35 PDT 2014


Thanks again Nicolas,

Having removed the intra-refresh and applied a key-int-max seems to provide
exactly what i need for now.
I can refine and enhance things later.

Thanks so much for all your help!

On Thu, Sep 18, 2014 at 4:17 PM, Nicolas Dufresne <
nicolas.dufresne at collabora.com> wrote:

>
> Le 2014-09-18 11:07, anno domini a écrit :
>
>> Bonjour Nicolas!
>>
>> Merci pour votre reponse!
>> Thanks so much for taking the time to answer.
>> I'm a little lost in that last part of your suggestion.
>> To make things a little quicker to debug i am now running everything on
>> the command line and i have removed the valve and the intra-refresh element.
>>
>> As suspected i still see the long delay, here is my setup:
>>
>> UDP STREAM SERVER (COMMAND LINE):
>> gst-launch -v -e v4l2src device=/dev/video1 norm=PAL ! videoscale !
>> video/x-raw-rgb, width=720, height=576, pixel-aspect-ratio=1/1 ! \
>> ffmpegcolorspace ! tee name=videoTee \
>> videoTee. ! queue ! x264enc tune="zerolatency" threads=1 ! rtph264pay
>> config-interval=2 ! udpsink port=8554 \
>> videoTee. ! queue ! x264enc tune="zerolatency" threads=1 ! rtph264pay
>> config-interval=2 ! udpsink port=8555
>>
>
> Ideally replacing the intra-refresh would be better. The options is
> key-int-max, if you want a key frame every 2 seconds (to match your
> config-interval), and a frame rate of 30 fps, then key-int-max=60 should do.
>
>
>> MONITOR CLIENT (COMMAND LINE):
>> gst-launch -v udpsrc port=8555 ! application/x-rtp, payload=96 !
>> rtph264depay ! ffdec_h264 ! xvimagesink
>>
>> PNG CREATOR CLIENT PIPELINE (PYTHON):
>> udpsrc port=8554 ! application/x-rtp, payload=96 ! rtph264depay !
>> ffdec_h264 ! ffmpegcolorspace ! videoscale ! video/x-raw-rgb, bpp=24,
>> width=720, height=576, pixel-aspect-ratio=1/1 ! pngenc snapshot=true
>> compression-level=1 ! filesink location=/tmp/blah2.png
>>
> What I mean with a seperate pipeline is:
>
> appsrc ! videoconvert ! pngenc ! filesink ...
>
> When you want to take a shot, just get the property "last-sample" from the
> xvimagsink from the monitor client, and pass the caps and buffer from the
> obtained GstSample to the appsrc. Then send EOS, a PNG shall be created.
> This way, you don't need so many key frames per second, and can get a shot
> on a non-keyframe. This obviously require some C writing.
>
>>
>> You are right that i am running on 0.10.
>> I'm not familiar with appsrc or pushing the buffer. Could you elaborate
>> on what you mean?
>>
> appsrc is a element that comes with an API. It's made for application that
> want to insert or extra buffer into/from a pipeline and do their own
> processing.
>
> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/
> gst-plugins-base-libs/html/gst-plugins-base-libs-appsrc.html
>
>
>> Merci Beaucoup!!!!!
>>
> cordialement,
>
> Nicolas
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140918/8339ba46/attachment.html>


More information about the gstreamer-devel mailing list