Comments (4)
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.
user case like: save to file, forward to rtsp server without another decode/encode.
monkey-patch is way to do this.
from aiortc.
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.
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)
- Can aiortc module be used for professional or semi-professional use?
- Implement MediaStreamTrack.enabled HOT 3
- Setting RTCRtpTransceiver.direction to `inactive` does not have any effect HOT 1
- Issue encountered when installing aiortc from source
- JS and PYTHON communication are available in the LAN, and the Internet connection fails HOT 1
- 'server' example failed when served in a remote machine HOT 2
- example videostream-cli not working HOT 1
- addTrack failing inside datachannel message receive handler
- chopping sounds with AudioStreamTrack HOT 2
- Recording video on server discards beyond a few seconds.
- Combining multiple mp3 files to be returned as a single MediaStreamTrack
- Server Python to Client Python Q/A (INCLUDE FULL SCRIPTS!)
- Webrtc initial negotiation succeeds but renegotiation fails
- Set packet_time = 125 msec instead of 20 msec (both side) HOT 4
- Adding a new track HOT 1
- Bug in filexfer example: filename should be fp?
- How to create ICE candidates? HOT 1
- Problems with ForwardTsnChunk
- aiortc rejecting offer with setup=passive against RFC guidance
- How to stream video? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aiortc.