Question on streaming

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Question on streaming

Jerry Geis-2
I am using this command on my server:

gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! video/x-raw,width=1920,height=1080 ! videoconvert ! vp8enc cpu-used=16 end-usage=vbr target-bitrate=1024000 token-partitions=3 static-threshold=1000 min-quantizer=0 max-quantizer=63 threads=2 ! rtpvp8pay ! udpsink host=192.168.101.186 port=5000

Which leaves me with two questions:

1) What is the command to "view" the streaming out on clients?

2) How many clients can connect and view the stream at one time.

Thanks,

Jerry

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Question on streaming

Jerry Geis-2
Sorry I was not clear. How do I view the udpsink with something like totem or vlc command line?

I know gst-launch can also view. 
Thanks,

Jerry

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Question on streaming

Nicolas Dufresne-5
Le lundi 27 mars 2017 à 12:36 -0400, Jerry Geis a écrit :
> Sorry I was not clear. How do I view the udpsink with something like
> totem or vlc command line?

Use a proper protocol, like RTSP (see gst-rtsp-server).

>
> I know gst-launch can also view. 
> Thanks,
>
> Jerry
> _______________________________________________
> 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

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Question on streaming

Nicolas Dufresne-5
In reply to this post by Jerry Geis-2
Le lundi 27 mars 2017 à 11:35 -0400, Jerry Geis a écrit :
> gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! video/x-
> raw,width=1920,height=1080 ! videoconvert ! vp8enc cpu-used=16 end-
> usage=vbr target-bitrate=1024000 token-partitions=3 static-
> threshold=1000 min-quantizer=0 max-quantizer=63 threads=2 ! rtpvp8pay
> ! udpsink host=192.168.101.186 port=5000
>
> Which leaves me with two questions:
>
> 1) What is the command to "view" the streaming out on clients?

Note that without a deadline= on vp8enc, your stream will likely not be
real-time, hence not viewable. VBR is also not the ideal choice for RTP
streaming.

To view:

  udpsrc port=5000 caps=... ! rtpjitterbuffer ! rtpvp8depay ! ...

You have to copy the caps info from the first pipeline. Use -v for
that.

>
> 2) How many clients can connect and view the stream at one time.

You are using unicast, so 1. The the client requires to have ip
192.168.101.186. Maybe you are looking for gst-rtsp-server library ?
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Question on streaming

Tim Müller
In reply to this post by Jerry Geis-2
On Mon, 2017-03-27 at 11:35 -0400, Jerry Geis wrote:

Hi Jerry,

> I am using this command on my server:
>
> gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! video/x-
> raw,width=1920,height=1080 ! videoconvert ! vp8enc cpu-used=16 end-
> usage=vbr target-bitrate=1024000 token-partitions=3 static-
> threshold=1000 min-quantizer=0 max-quantizer=63 threads=2 ! rtpvp8pay
> ! udpsink host=192.168.101.186 port=5000

Have you considered using RTSP instead of 'raw' UDP/RTP?

The data transport would/could still be done with UDP, but there would
be an additional session setup which simplifies many things.

If that's something you might be interested in, check out gst-rtsp-
server and try e.g.:

gst-rtsp-server/examples$ ./test-launch 'v4l2src device=/dev/video0 !
videoconvert ! vp8enc cpu-used=16 end-usage=vbr target-bitrate=1024000
token-partitions=3 static-threshold=1000 min-quantizer=0 max-
quantizer=63 threads=2 deadline=1 ! rtpvp8pay name=pay0'

Note that I added a deadline=1 parameter to vp8enc here. I dropped your
resolution caps filter, but you can add it back of course.

Once that runs you can do:

 vlc rtsp://127.0.0.1:8554/test

or

 totem rtsp://127.0.0.1:8554/test

or

 gst-play-1.0 rtsp://127.0.0.1:8554/test

or

 gst-launch-1.0 playbin uri=rtsp://127.0.0.1:8554/test \
                uridecodebin0::source::latency=100

(By default GStreamer uses a default jitterbuffer latency/size of
2000ms, which is quite large, so the last example shows you how you can
use a smaller value with gst-launch-1.0 - this is all completely client
side.)

If you add a

  gst_rtsp_media_factory_set_shared (factory, TRUE);

to test-launch.c and recompile with 'make' the capture/encode pipeline
can be shared amongst as many clients as you like.

I realise this doesn't quite answer your question, but it's still what
I'd recommend if you don't have any reason not to go this way :)

Cheers
 -Tim

> Which leaves me with two questions:
>
> 1) What is the command to "view" the streaming out on clients?
>
> 2) How many clients can connect and view the stream at one time.
>

--
Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Loading...