cannot open two videosinks for two programs of mpegts

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

cannot open two videosinks for two programs of mpegts

a.vasiliev
Hello!
I have mpegts stream on udp. The stream has two programs inside. I want
to show both programs in one pipeline.


Here are video sources:

gst-launch-1.0 videotestsrc horizontal-speed=1 !
'video/x-raw,width=720,height=576' ! timeoverlay  ! x264enc bitrate=3500
key-int-max=25 byte-stream=true ! muxer.sink_300 mpegtsmux name=muxer
prog-map=program_map,sink_300=10 ! udpsink host=127.0.0.1 port=3000 -v

gst-launch-1.0 videotestsrc horizontal-speed=1 pattern=18 !
'video/x-raw,width=720,height=576' ! timeoverlay  ! x264enc bitrate=3500
key-int-max=25 byte-stream=true  ! muxer.sink_301 mpegtsmux name=muxer
prog-map=program_map,sink_301=11 ! udpsink host=127.0.0.1 port=3000 -v


They can be captured separatly with:

gst-launch-1.0 udpsrc port=3000 ! queue ! tsdemux name=demux
program-number=10 demux. ! 'video/x-h264' ! queue ! h264parse
config-interval=1 ! avdec_h264 ! fpsdisplaysink sync=false

gst-launch-1.0 udpsrc port=3000 ! queue ! tsdemux name=demux
program-number=11 demux. ! 'video/x-h264' ! queue ! h264parse
config-interval=1 ! avdec_h264 ! fpsdisplaysink sync=false


But when i try to capture streams in one pileline i got only one video
window. Here is a pipeline:

gst-launch-1.0 udpsrc port=3000 ! tee name=t ! tsdemux
program-number=11  ! queue2 ! 'video/x-h264' ! h264parse ! avdec_h264 !
autovideosink sync=false async-handling=true async=true t. ! tsdemux
program-number=10  ! queue2 ! 'video/x-h264' ! h264parse ! avdec_h264 !
autovideosink sync=false async-handling=true async=true

The output is full of "Redistribute latency...".


How can i watch to mpeg-ts programs in one pipeline?


--
Best regards,
Alexander Vasiljev
GC Geoscan
Professional aerial imaging systems
Tel. +7 (812) 363-33-67 ext. 1181
https://www.geoscan.aero/en/

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

Re: cannot open two videosinks for two programs of mpegts

Peter Maersk-Moller-2
Hi Alexander.

UDP is not a magical muxer that can mux two streams from two different sources. You need to mux the two stream in a single pipeline.

Regards
Peter MM

On Wed, Dec 13, 2017 at 4:17 PM, Alexander Vasiliev <[hidden email]> wrote:
Hello!
I have mpegts stream on udp. The stream has two programs inside. I want to show both programs in one pipeline.


Here are video sources:

gst-launch-1.0 videotestsrc horizontal-speed=1 ! 'video/x-raw,width=720,height=576' ! timeoverlay  ! x264enc bitrate=3500 key-int-max=25 byte-stream=true ! muxer.sink_300 mpegtsmux name=muxer prog-map=program_map,sink_300=10 ! udpsink host=127.0.0.1 port=3000 -v

gst-launch-1.0 videotestsrc horizontal-speed=1 pattern=18 ! 'video/x-raw,width=720,height=576' ! timeoverlay  ! x264enc bitrate=3500 key-int-max=25 byte-stream=true  ! muxer.sink_301 mpegtsmux name=muxer prog-map=program_map,sink_301=11 ! udpsink host=127.0.0.1 port=3000 -v


They can be captured separatly with:

gst-launch-1.0 udpsrc port=3000 ! queue ! tsdemux name=demux program-number=10 demux. ! 'video/x-h264' ! queue ! h264parse config-interval=1 ! avdec_h264 ! fpsdisplaysink sync=false

gst-launch-1.0 udpsrc port=3000 ! queue ! tsdemux name=demux program-number=11 demux. ! 'video/x-h264' ! queue ! h264parse config-interval=1 ! avdec_h264 ! fpsdisplaysink sync=false


But when i try to capture streams in one pileline i got only one video window. Here is a pipeline:

gst-launch-1.0 udpsrc port=3000 ! tee name=t ! tsdemux program-number=11  ! queue2 ! 'video/x-h264' ! h264parse ! avdec_h264 ! autovideosink sync=false async-handling=true async=true t. ! tsdemux program-number=10  ! queue2 ! 'video/x-h264' ! h264parse ! avdec_h264 ! autovideosink sync=false async-handling=true async=true

The output is full of "Redistribute latency...".


How can i watch to mpeg-ts programs in one pipeline?


--
Best regards,
Alexander Vasiljev
GC Geoscan
Professional aerial imaging systems
Tel. <a href="tel:%2B7%20%28812%29%20363-33-67%20ext.%201181" value="+78123633367" target="_blank">+7 (812) 363-33-67 ext. 1181
https://www.geoscan.aero/en/

_______________________________________________
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: cannot open two videosinks for two programs of mpegts

a.vasiliev
In reply to this post by a.vasiliev
Hi Peter.

Nevetherless I can open each stream smoothly with one of one program pipeline, when 
two streams is going on.

I don't see any problem with udp. PIDs are different for each stream, continuity counters are
different for each PID. So they should be easily separated by tsdemuxer.

But why two tsdemuxers cannot work in one pipeline?

-- 
Best regards,
Alexander Vasiljev


> Hi Alexander.

> UDP is not a magical muxer that can mux two streams from two different
> sources. You need to mux the two stream in a single pipeline.

> Regards
> Peter MM

On Wed, Dec 13, 2017 at 4:17 PM, Alexander Vasiliev <a.vasiliev at geoscan.aero
> wrote:

> Hello!
> I have mpegts stream on udp. The stream has two programs inside. I want to
> show both programs in one pipeline.
>
>
> Here are video sources:
>
> gst-launch-1.0 videotestsrc horizontal-speed=1 !
> 'video/x-raw,width=720,height=576' ! timeoverlay  ! x264enc bitrate=3500
> key-int-max=25 byte-stream=true ! muxer.sink_300 mpegtsmux name=muxer
> prog-map=program_map,sink_300=10 ! udpsink host=127.0.0.1 port=3000 -v
>
> gst-launch-1.0 videotestsrc horizontal-speed=1 pattern=18 !
> 'video/x-raw,width=720,height=576' ! timeoverlay  ! x264enc bitrate=3500
> key-int-max=25 byte-stream=true  ! muxer.sink_301 mpegtsmux name=muxer
> prog-map=program_map,sink_301=11 ! udpsink host=127.0.0.1 port=3000 -v
>
>
> They can be captured separatly with:
>
> gst-launch-1.0 udpsrc port=3000 ! queue ! tsdemux name=demux
> program-number=10 demux. ! 'video/x-h264' ! queue ! h264parse
> config-interval=1 ! avdec_h264 ! fpsdisplaysink sync=false
>
> gst-launch-1.0 udpsrc port=3000 ! queue ! tsdemux name=demux
> program-number=11 demux. ! 'video/x-h264' ! queue ! h264parse
> config-interval=1 ! avdec_h264 ! fpsdisplaysink sync=false
>
>
> But when i try to capture streams in one pileline i got only one video
> window. Here is a pipeline:
>
> gst-launch-1.0 udpsrc port=3000 ! tee name=t ! tsdemux program-number=11
> ! queue2 ! 'video/x-h264' ! h264parse ! avdec_h264 ! autovideosink
> sync=false async-handling=true async=true t. ! tsdemux program-number=10  !
> queue2 ! 'video/x-h264' ! h264parse ! avdec_h264 ! autovideosink sync=false
> async-handling=true async=true
>
> The output is full of "Redistribute latency...".
>
>
> How can i watch to mpeg-ts programs in one pipeline?
>

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

Re: cannot open two videosinks for two programs of mpegts

Arjen Veenhuizen
No, this cannot work. You should not have multiple processes stream data to
the same port in the first place. Either stream each video to a different
UDP port, or multiplex both programs into a single mpeg2ts, payload it with
rtpmp2tpay and have a combination of rtpmp2tdepay, queue, tee and two
tsdemux elements at the receiving end.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: cannot open two videosinks for two programs of mpegts

Ilya Averyanov-2
Why do you think that you can not send two mpeg ts stream to one upd
port without multiplexing. This behavior does not contradict any
standards.

2017-12-15 15:04 GMT+03:00 Arjen Veenhuizen <[hidden email]>:

> No, this cannot work. You should not have multiple processes stream data to
> the same port in the first place. Either stream each video to a different
> UDP port, or multiplex both programs into a single mpeg2ts, payload it with
> rtpmp2tpay and have a combination of rtpmp2tdepay, queue, tee and two
> tsdemux elements at the receiving end.
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.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
Reply | Threaded
Open this post in threaded view
|

Re: cannot open two videosinks for two programs of mpegts

Baby Octopus
Administrator
You need to use MPTS multiplexing to send two programs over a single UDP
port. Sending multiple SPTS is not the way to multiplex.

~BO



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel