Gstreamer pipeline merging 2 udp sources to rtmp? -


i can't figure out how merge 2 udp sources (1 audio , 1 video), seperately pretty easy no clue how merge them being noob, know pretty close

gst-launch-1.0 rtpbin name=rtpbin rtpbin.recv_rtp_sink_ \ ! udpsrc port=6004 caps="application/x-rtp, media=(string)video,clock-rate=(int)90000,payload=(int)96,encoding-name=vp8-draft-ietf-01" \ ! rtpvp8depay \ ! queue \ ! mux.  rtpbin.recv_rtp_sink_ \ ! udpsrc port=6005 caps="application/x-rtp, media=audio, clock-rate=48000, encoding-name=x-gst-opus-draft-spittka-00, payload=111,channels=2" \ ! rtpopusdepay \ ! queue \ 

... ?

i not know exact answer go way (we can negotiate solution via comments :)) :

gst-launch-1.0 flvmux name=mux ! rtmpsink udpsrc port=6004 caps="application/x-rtp, media=(string)video,clock-rate=(int)90000,payload=(int)96,encoding-name=vp8-draft-ietf-01" ! rtpvp8depay ! vp8dec ! queue ! x264enc ! mux.  udpsrc port=6005 caps="application/x-rtp, media=audio, clock-rate=48000, encoding-name=x-gst-opus-draft-spittka-00, payload=111,channels=2" ! rtpopusdepay ! queue ! opusdec ! voaacenc ! aacparse ! queue ! mux. 

why pipe:

  • there 3 parts of pipeline later linked together,

1, first flvmux linked rtmpsink, notice there no ! sign between part , next udpsrc part

2, udpsrc video part needs first decoded vp8 , reencoded h264 flvmux understand h264 (i guess no support vp8, can check this)

3, udpsrc audio part decoded opus resulting in raw pcm audio , encoded in aac flvmux not seem understand raw audio

  • after mux can go rtpmsink stream given location (i not familiar format)

keep in mind order in elements appear order of creation, not order of linkage.. think elements must first exist if want link them therefore put flvmux @ beginning able use mux. name later (which alias). create these 3 parts of pipeline , link them usage of mux. alias..


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -