Cant take an immediate screenshot image of static video from h264 rtp stream
Nicolas Dufresne
nicolas.dufresne at collabora.com
Thu Sep 18 07:18:22 PDT 2014
Le 2014-09-18 09:34, anno domini a écrit :
> 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
> intra-refresh=true ! rtph264pay config-interval=2 ! udpsink port=8554
You may want to switch from intra-refresh toward periodic keyframe. The
decoder is simply waiting until a full valid frame is available. Note
this behaviour may have change if you move toward a recent GStreamer
(you are using 0.10, which is unmaintained), you would endup with
corrupted frame in your PNG (see avdec_h264 property output-corrupt).
Also, note that the general valve approach is racy, and prevent you from
taking a shot at a specific time since your decoder state is left
undefined. Assuming you are always previewing this stream, you could set
"enable-last-sample" on your display sink, and get the last-sample. On a
second pipeline, using appsink, you could set the sample caps, push the
buffer, send EOS, and you'd have a safe result instantly.
Nicolas
More information about the gstreamer-devel
mailing list