How to use the RTSP server with display and stream both

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

How to use the RTSP server with display and stream both

saketbafna82@gmail.com
This post was updated on .
Hi All,
         I am using gst-rtsp-server plugin to stream-out encoded stream.
When I tried with :
  gst_rtsp_media_factory_set_launch (factory, "( "
   "v4l2src device=/dev/video1 io-mode=4 ! video/x-raw, width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)30/1 !  "
   "h265enc Gop-Length=30 b-frames=4 target-bitrate=100000000 ! video/x-h265, width=(int)3840, height=(int)2160, profile=(string)main  ! rtph265pay name=pay0 pt=96 "
   ")");
above pipeline works fine.

When I add tee element to display as well then, pipeline fails.
  gst_rtsp_media_factory_set_launch (factory, "( "
   "v4l2src device=/dev/video1 io-mode=4 ! video/x-raw, width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)30/1 !  tee name=t t. ! kmssink  t. ! "
   "h265enc Gop-Length=30 b-frames=4 target-bitrate=100000000 ! video/x-h265, width=(int)3840, height=(int)2160, profile=(string)main  ! rtph265pay name=pay0 pt=96 "
   ")");

I also tried with async=false in kmssink but, this also failed.

Can anyone please let me know what could be the issue?

P.S. I copied rest pipeline code from test-multicast.c
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to use the RTSP server with display and stream both

Nicolas Dufresne-5
Le vendredi 21 juillet 2017 à 02:16 -0700, [hidden email] a écrit :

> Hi All,
>          I am using gst-rtsp-server plugin to stream-out encoded stream.
>
>   gst_rtsp_media_factory_set_launch (factory, "( "
>    "v4l2src device=/dev/video1 io-mode=4 ! video/x-raw, width=(int)3840,
> height=(int)2160, format=(string)NV12, framerate=(fraction)30/1 !  "
>    "h265enc Gop-Length=30 b-frames=4 target-bitrate=100000000 !
> video/x-h265, width=(int)3840, height=(int)2160, profile=(string)main  !
> rtph265pay name=pay0 pt=96 "
>    ")");
> this pipeline works fine.
>
> When I add tee element to display as well then, pipeline fails.
When using tee, of any multiplexing element, you need queue afterward.

>   gst_rtsp_media_factory_set_launch (factory, "( "
>    "v4l2src device=/dev/video1 io-mode=4 ! video/x-raw, width=(int)3840,
> height=(int)2160, format=(string)NV12, framerate=(fraction)30/1 !  tee
> name=t t. ! kmssink  t. "
>    "h265enc Gop-Length=30 b-frames=4 target-bitrate=100000000 !
> video/x-h265, width=(int)3840, height=(int)2160, profile=(string)main  !
> rtph265pay name=pay0 pt=96 "
>    ")");
>
> I also tried with async=false in kmssink but, this also failed.
>
> Can anyone please let me know what could be the issue?
>
> P.S. I copied rest pipeline code from test-multicast.c
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-use-the-RTSP-server-with-display-and-stream-both-tp4683888.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> 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 (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to use the RTSP server with display and stream both

saketbafna82@gmail.com
This post was updated on .
Thanks Nicolas but, adding queue also didn't help to me.

  gst_rtsp_media_factory_set_launch (factory, "( "
   "v4l2src device=/dev/video1 io-mode=4 ! video/x-raw, width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)30/1 !  tee name=t t. ! queue ! kmssink async=false t. ! "
   "queue ! h265enc ip-mode=2 control-rate=2 Gop-Length=30 b-frames=4 target-bitrate=100000000 ! video/x-h265, width=(int)3840, height=(int)2160, profile=(string)main  ! rtph265pay name=pay0 pt=96 "
   ")");

This pipeline also failed.
Where as when I tried with RTP streamout and local display :
gst-launch-1.0 -v\
        v4l2src \
          device=/dev/video1 io-mode=4 \
        ! video/x-raw,format=NV12,width=3840,height=2160, framerate=30/1 \
        ! tee name=t t. \
        ! h264enc  ip-mode=2 target-bitrate=20000000 control-rate=2 Gop-Length=30 b-frames=0 \
        ! rtph264pay \
        ! udpsink host=172.23.98.14 port=50000 max-lateness=-1 qos-dscp=60  t. \
        ! kmssink
 

pipeline worked.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to use the RTSP server with display and stream both

Nicolas Dufresne-5
Le lundi 24 juillet 2017 à 01:22 -0700, [hidden email] a
écrit :

> Thanks Nicolas but, adding queue also didn't help to me.
>
>   gst_rtsp_media_factory_set_launch (factory, "( "
>    "v4l2src device=/dev/video1 io-mode=4 ! video/x-raw, width=(int)3840,
> height=(int)2160, format=(string)NV12, framerate=(fraction)30/1 !  tee
> name=t t. ! queue ! kmssink async=false t. ! "
>    "queue ! h265enc ip-mode=2 control-rate=2 Gop-Length=30 b-frames=4
> target-bitrate=100000000 ! video/x-h265, width=(int)3840, height=(int)2160,
> profile=(string)main  ! rtph265pay name=pay0 pt=96 "
>    ")");
Then yous should describe how it failed for you. I am just pointing out
one obvious mistake here.

cheers,
Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment
Loading...