GithubHelp home page GithubHelp logo

input/output raw rtp packet api about aiortc HOT 4 CLOSED

aiortc avatar aiortc commented on May 17, 2024
input/output raw rtp packet api

from aiortc.

Comments (4)

jlaine avatar jlaine commented on May 17, 2024

I'm not sure outputting the raw RTP is very useful, how would things like RTCP reports be handled/generated? Maybe you can elaborate on your usecase?

In the meantime if you absolutely want to do this, one way would be to monkey-patch RTCRtpReceiver._handle_rtp_packet and RTCRtpReceiver._handle_rtcp_packet which will give you the decoded RTP/RTCP packets. If you want to convert them back to bytes you can use bytes(packet).

Alternatively, you could also monkey-patch RTCDtlsTransport._handle_rtp_data and RTCDtlsTransport._handle_rtcp_data but then you will have to handle routing to the correct RTP receiver yourself.

from aiortc.

notedit avatar notedit commented on May 17, 2024

user case like: save to file, forward to rtsp server without another decode/encode.

monkey-patch is way to do this.

from aiortc.

jlaine avatar jlaine commented on May 17, 2024

Saving to file: ok, sure.

As to forwarding to another server, I'm not sure this would be the right place to do it. I agree you want to skip the codec decode/encode step, but I think you would still like to retain the benefit of the jitter buffer and the RTCP-based retransmission (which I'm currently implementing). For this usecase I think it would be more useful to have an API which hands you re-assembled (but not decoded) audio/video frames.

Anyway I'll close this issue for now, please do leave a comment if you have some additional feedback.

from aiortc.

notedit avatar notedit commented on May 17, 2024

RTPReceiver still do rtcp-based retransmission and jitter buffer, just pass out the rtp packet after we got a full frame. like this line https://github.com/jlaine/aiortc/blob/master/aiortc/rtcrtpreceiver.py#L236

from aiortc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.