gst stuck when using the linux tee

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

gst stuck when using the linux tee

Abu Abdullah
Hi,

I'm trying to forward a camera output (Raspberry PI camera 'raspivid')
to live555 and Gstreamer using the following:

raspivid -n -t 0 -w 640 -h 480 -b 1200000 -fps 20 -o - | tee
>(./testRaspi) | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay
pt=96 config-interval=10 ! udpsink host=192.168.1.15 port=5000

the above command will copy the output of raspivid and pass it to
live555/testRaspi. at the same time it will forward it also to
Gstreamer.
using the linux comman tee.

the problems with this command is:
- GStreamer client will not start until RTSP\live555 client start
requesting the stream i.e. only both of them will work at the same
time but not the GStreamer alone. in addition the stream from gst is
not smooth, it is like buffering some part of the stream and display
it very quickly in chunks.

is it something related to gst. does gst send acknowledgement as a
response to the src (copy of the camera feed).

N.B. it works fine without tee i.e.:
raspivid -n -t 0 -w 640 -h 480 -b 1200000 -fps 20 -o - |
gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay pt=96
config-interval=10 ! udpsink host=192.168.1.15 port=5000

Any support is appreciated
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gst stuck when using the linux tee

Nicolas Dufresne-4
Le lundi 11 juillet 2016 à 20:31 +0400, Abu Abdullah a écrit :

> Hi,
>
> I'm trying to forward a camera output (Raspberry PI camera
> 'raspivid')
> to live555 and Gstreamer using the following:
>
> raspivid -n -t 0 -w 640 -h 480 -b 1200000 -fps 20 -o - | tee
> > (./testRaspi) | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay
> pt=96 config-interval=10 ! udpsink host=192.168.1.15 port=5000
>
> the above command will copy the output of raspivid and pass it to
> live555/testRaspi. at the same time it will forward it also to
> Gstreamer.
> using the linux comman tee.

Just like using tee element in GStreamer, you need both output of the
tee to implement enough buffering to prevent blocking the other size.
If you need to run one without the other, you probably need leaky
queues. The require adding a queue in GStreamer, and probably modifying
live555 code. Have you considered using gst-rtp-server library instead
of live555 ?

>
> the problems with this command is:
> - GStreamer client will not start until RTSP\live555 client start
> requesting the stream i.e. only both of them will work at the same
> time but not the GStreamer alone. in addition the stream from gst is
> not smooth, it is like buffering some part of the stream and display
> it very quickly in chunks.
>
> is it something related to gst. does gst send acknowledgement as a
> response to the src (copy of the camera feed).
>
> N.B. it works fine without tee i.e.:
> raspivid -n -t 0 -w 640 -h 480 -b 1200000 -fps 20 -o - |
> gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay pt=96
> config-interval=10 ! udpsink host=192.168.1.15 port=5000
>
> Any support is appreciated
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gst stuck when using the linux tee

Abu Abdullah
>
> Just like using tee element in GStreamer, you need both output of the
> tee to implement enough buffering to prevent blocking the other size.
> If you need to run one without the other, you probably need leaky
> queues. The require adding a queue in GStreamer, and probably modifying
> live555 code. Have you considered using gst-rtp-server library instead
> of live555 ?
>

i would appreciate if you can show me how the pipeline would be with
after adding the 'queue'. modifying the code for live555 might be
diffecult for me (http://textuploader.com/5i2wm) so i will it first
without it.

i tried rtsp server as well but it will not work for me. i cannot have
two sinks at the same time since the camera feed is not allowing two
outputs at the same time.

i was using this gst-rpicamsrc plugin:

./test-launch "( rpicamsrc bitrate=1200000 intra-refresh-type=both
drc=medium ! video/x-h264,profile=baseline,width=640,height=480 !
h264parse config-interval=1 ! rtph264pay name=pay0 pt=96 )"

this command is working for me but i need additionally udpsink as
well. I tried to use tcpserversink and tcpclientsrc so that i can have
multiple sinks but it was not working:

raspivid -n  -t 0 -w 640 -h 480 -b 1200000 -fps 20 -o - |
gst-launch-1.0 -v fdsrc do-timestamp=true ! h264parse ! gdppay !
tcpserversink host=192.168.1.5 port=5000 | ./test-launch "(
tcpclientsrc host=192.168.1.5 port=5000 ! gdpdepay ! rtph264pay
config-interval=1 name=pay0 pt=96 )"
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel