hi all ,
i am playing rtsp streaming with gstream-0.1 on imx53, the rtsp server is non-stop sending rtp packages, i play this stream with this one:
gst-launch rtspsrc location=rtsp://192.168.1.123:554/vga name=source ! queue max-size-buffers=0 max-size-time=0 ! rtph264depay ! mfw_vpudecoder ! mfw_v4lsink source. ! queue max-size-buffers=0 max-size-time=0 ! rtpmpadepay ! mpegaudioparse ! mad ! alsasink
this works very well except that there are some time green screen about 1~3 seconds at the beginning of the playback, i searched about what problem of this, and some one said playback should wait for an i-frame (keyframe) before playing,
i don't know where to set this parameter or (maybe ) adding extra element bin (caps) ? or any other solutions is welcome !
Thanks!
Best Regards!
toot_hzf
To avoid green screen at the beginning of rtsp we can set wait-for-keyframe=1 for h264depay element. Leard this from someone in #gstreamer IRC channel!
You can add request-keyframe=1 to probably avoid green screens during temporary loss of the traffic during playback.
Most likely, it can be done somehow by checking the v4l buffer flags. For details, refer to the v4l API description:
https://linuxtv.org/downloads/v4l-dvb-apis/
https://linuxtv.org/downloads/v4l-dvb-apis/uapi/v4l/buffer.html#buffer-flags
Seems that you have to create your own gstreamer plugin for that:
https://gstreamer.freedesktop.org/
https://gstreamer.freedesktop.org/documentation/
Best Regards,
Artur
hi artur,
thanks for replying, i will go to find buffer flags in source code and modify it and re-compile it.
another question, is there any way to avoid playing sound when waiting for the i-frame? for some time the sound started when the screen is green or black.
Best regards!
toot_hzf