A
A
amiznikov2019-09-27 19:56:22
Video broadcast
amiznikov, 2019-09-27 19:56:22

How to get rtp stream?

Hello everyone, there is an rtmp video stream, you need to get an rtp stream from it, here is the command:

PEER_A=another_port PEER_V=port PEER_IP=server_ip \
SELF_PATH="rtmp://localhost:1935/" \
SELF_A=5006 SELF_ASSRC=445566 \
SELF_V=5004 SELF_VSSRC=112233 \
bash -c 'gst-launch-1.0 -e \
  rtpbin name=r sdes="application/x-rtp-source-sdes,cname=(string)\"user\@example.com\"" \
  rtmpsrc location="$SELF_PATH" ! decodebin name=d \
  d. ! queue ! audioconvert ! opusenc \
    ! rtpopuspay ! "application/x-rtp,payload=(int)96,clock-rate=(int)48000,ssrc=(uint)$SELF_ASSRC" \
    ! r.send_rtp_sink_0 \
  d. ! queue ! videoconvert ! x264enc tune=zerolatency \
    ! rtph264pay ! "application/x-rtp,payload=(int)103,clock-rate=(int)90000,ssrc=(uint)$SELF_VSSRC" \
    ! r.send_rtp_sink_1 \
  r.send_rtp_src_0 ! udpsink host=$PEER_IP port=$PEER_A bind-port=$SELF_A \
  r.send_rtcp_src_0 ! udpsink host=$PEER_IP port=$((PEER_A+1)) bind-port=$((SELF_A+1)) sync=false async=false \
  udpsrc port=$((SELF_A+1)) ! r.recv_rtcp_sink_0 \
  r.send_rtp_src_1 ! udpsink host=$PEER_IP port=$PEER_V bind-port=$SELF_V \
  r.send_rtcp_src_1 ! udpsink host=$PEER_IP port=$((PEER_V+1)) bind-port=$((SELF_V+1)) sync=false async=false \
  udpsrc port=$((SELF_V+1)) ! tee name=t \
    t. ! queue ! r.recv_rtcp_sink_1 \
    t. ! queue ! fakesink dump=true async=false'

gives errors:
5d8e3f10620a7943178066.jpeg
thanks in advance everyone!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question