Stream RTP to FFMPEG using SDP

后端 未结 2 2034
日久生厌
日久生厌 2020-12-10 18:45

I get RTP stream from WebRTC server (I used mediasoup) using node.js and I get the decrypted RTP packets raw data from the stream. I want to forward this RTP data to ffmpeg

相关标签:
2条回答
  • 2020-12-10 19:02

    I've solved my problem, my setup :

    kms(rtpEndpoint)-->.sdp--->ffmpeg--->nginx-rtmp--->vlc
    

    Problem was in sdp. sdp should be in proper format, as sdp answer. Use identical sdp content in file(ffmpeg sdp input file) as well as in media server(kms in my case). IP should be nginx server ip.(works in my case).

    0 讨论(0)
  • 2020-12-10 19:20
    c=IN IP4 192.168.193.182
    

    Is that your local IP from which your own Node UDP/TCP server is listening for the connection from ffmpeg?

    m=audio 33301 RTP/AVP 111
    

    Why 33301? I hope that is not the same port as the one used by mediasoup to communicate with the remote browser (if so, obviously you¡ll get the "address already in use" error)...

    a=rtpmap:111 /opus/48000
    

    That's wrong format. Remove the first "/".

    Remove all the a=rtcp-fb lines. I don't think ffmpeg supports any of them at all.

    Same for video.

    0 讨论(0)
提交回复
热议问题