Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    Italo José
    guys, soooory so much by my despair, it's a SUPER importatn feature to company and my job depends from it ahahaha
    sorry so much, I know that people is boring to help
        def on_track(track):
            if track.kind == 'video':
                local_video = VideoTransformTrack(track, transform=params['video_transform'])
            def on_datachannel(channel):
                def on_message(message):
    this is my final code
    hey all

    Hey all, I have a short question, that I hope you can maybe guide me in the right direction.

    I want to implement a camera-service in python that distributes a live stream of a USB-Camera to other services. I want to do this without an internet connection over the local network. I have two other services that use the stream, a classification service, in python and a front-end that displays the live stream written in html and javascript.

    You can find the whole question here: https://stackoverflow.com/questions/56582908/webrtc-connection-on-localhost-without-an-internet-connection

    without an internet connection, the streaming with aiortc between the python services works without any problems
    but the streaming between the camera service and the front-end in javascript does only work with an internet connection
    Jeremy Lainé
    "it doesn't work" is usually a poor start to get help :)
    Can you describe what does happen? Is SDP exchanged between the peers?
    Have you tried running the server in verbose mode?
    Is the "server" machine firewalled?
    the javascript does not complete the ice gathering
    in chrome I dont get any error message but when I run it in Firefox I get the message "ICE failed, see about:webrtc for more detail"
    When I comment the part in javascript where the ice gathering is completed:
           return new Promise(function(resolve) {
                if (pc.iceGatheringState === 'complete') {
                } else {
                    function checkState() {
                        if (pc.iceGatheringState === 'complete') {
                            pc.removeEventListener('icegatheringstatechange', checkState);
                    pc.addEventListener('icegatheringstatechange', checkState);
    then the sdp is exchanged but the video stream is not transferred
    About the firewall I am not sure, but I run everything on localhost on one PC, so I think there should not be any firewall issues
    Andrew Kralovec

    Hey guys,

    Im new to the project, and was hoping for some advice.
    I'm trying to use aiortc allow two clients (browser webcams) to connect to the server, and have the server broadcast both ( and it will only ever be two), video streams to each user. So they can see each other. What example on github would best help me with this ? I was thinking about merging webcam & apprtc. I'll be honest though. Im unsure how to convert the image reciver to a media player. Any advice would be appreciated.

    Tomasz Rojek
    @italojs Did you try to send message to the browser using WebSockets?
    You can use socket.io which works both on python and javascript
    Tomasz Rojek
    Does anyone know how to enable hardware acceleration in server example ?
    Alexander Kozhevin
    Hello, everyone. I want to make a clone of https://golightstream.com/
    Is there any reliable way to make WebRTC -> RTMP converter with 720p quality at least. ?
    Yury Zhuravlev
    Hello all!
    Praveen Mareedu
    Hi Everyone
    I am working on testing aiortc on AWS EC2 servers. I have created a docker of AIORTC and deployed in an ec2 instance .. I want to stream my webcam feed from local Mac to the EC2 instance and back to browser in local machine.
    I have opened all kinds of traffic on my Ec2 instance and send UDP packets from local machine to EC2
    Praveen Mareedu
    I am testing the server example and I can load the interface but I think there is a problem with WEBRTC connection establishment.
    ICE gathering state: new -> gathering -> complete
    ICE connection state: new -> checking -> disconnected
    Signaling state: stable -> have-local-offer -> stable
    Any idea on how to debug this?
    Raghvendra Jain
    @italojs Could you solve the problem? I tried using data channels, but it does not send the data continuously in the loop. what to do?
    @trojek Hi. I am in same boat as @italojs. I understand how to use WebSockets with browser, but in this case I am unable to send the data from aiortc.
    Ivelin Ivanov
    I’ve been working on similar problems and have been able to make good progress recently. Ported PeerJS to python. It’s been a battle but well the effort.
    Higher level abstraction over Aiortc that addresses signaling.
    Raghvendra Jain
    Good work @ivelin. I will look into it, thanks!
    Hi, I need help processing a video frames and sending back data in data channels.
    Hello i am on fedora 31 and MediaRecorder does not create any file any hint how i can debug this?
    found it
    does the MediaRecorder always encode the incoming stream? or would it bepossible to forward it without reencoding ( h264)
    looks very quite here :> is there a other channel like discord or irc slack ?
    Zack Schwartz
    I'm using the server example of aiortc which I got working, but I'd like to stream what I receive at the server side to an RTMP endpoint. Does anyone have any guidance on that?
    Hello all, I have raised an issue,
    This is for pyav but hampers the installation for aiortc, did anyone encounter this while installing aiortc?
    Hi all. I am having trouble install aiortc on Mac. I keep getting this:ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    If anyone has any insight - would love it!
    Michael Noronha
    Hi, I've got a bit of a basic question -- I have a client receiving a sequence of frames (via a VideoStreamTrack) from a server, and I want to process that sequence of frames on the client. I understand how to process them on the server (in recv, right?), but how can I do it on the client?
    Michael Noronha
    The solution I came up with is pretty simple: in my @pc.on("datachannel") and @pc.on("track") handlers, I check if the other one has been initialized. They happen sequentially, so one of them must have both initialized and from there I set up a function that processes them in a loop
    I'd be interested to hear about better ways of doing this though
    I run some transformation a aiortc video stream and change the transformation at runtime. The switch to another transformations takes some secs and I end up with an accumulated delay on the stream. Is there a way to skip the queued frames and jump to the latests frame to reduce this delay?

    Hi, I'm trying to process with OpenCV and python a live video transmission from a WebRTC site: https://webrtc-streamer.herokuapp.com/webrtcstreamer.html?video=Bahia&options=rtptransport%3Dtcp%26timeout%3D60& But I can't open the video with cv2.videocapture (URL).

    How could I open the video that is compatible with OpenCV? I appreciate it if you demonstrate the code.

    Ilyas Salhi
    hey everyone, I'm new here and just curious if anyone has done clientjs to serverpy example with multiple datachannels for one peer connection? I modified the example/server in the project's repo to conditionally respons based on the channel label, but I noticed that RTT goes up. Curious if I'm just using asyncio wrong or if anyone has found ways of opening extra channels without hurting latency
    Ilyas Salhi
    Interesting thing is that the second channel has the larger RTT's
    Wondering if there's a way to thread each datachannel seperately