Giter VIP home page Giter VIP logo

Comments (6)

notedit avatar notedit commented on May 19, 2024

I want to know why we do not send FIR when a keyframe is needed.

from aiortc.

jlaine avatar jlaine commented on May 19, 2024

Regardless of whether we send FIR or PLI, the critical missing bit is detecting we need it - which I haven't had time to do yet. If you have time for a dive into the WebRTC code I'd be interested in a list of the criteria they use for this.

from aiortc.

koenvo avatar koenvo commented on May 19, 2024

I want to know why we do not send FIR when a keyframe is needed.

I noticed some browsers ignore the FIR and do respond with a keyframe to a PLI

from aiortc.

jlaine avatar jlaine commented on May 19, 2024

From reading the webrtc.org codebase, there seem to be multiple triggers for a PLI:

  • if the NACK list grows beyond 1000 packets

https://webrtc.googlesource.com/src/+/05cb48599918d0089175a37d4ac716b4ceac8060/modules/video_coding/nack_module.cc#236

  • if the video codec requests it:

https://webrtc.googlesource.com/src/+/05cb48599918d0089175a37d4ac716b4ceac8060/video/video_receive_stream.cc#473

  • if no keyframe has been received for a long time:

https://webrtc.googlesource.com/src/+/05cb48599918d0089175a37d4ac716b4ceac8060/video/video_receive_stream.cc#479

  • if decoding fails (I think):

https://webrtc.googlesource.com/src/+/05cb48599918d0089175a37d4ac716b4ceac8060/video/rtp_video_stream_receiver.cc#395

  • some H.264-specific condition:

https://webrtc.googlesource.com/src/+/05cb48599918d0089175a37d4ac716b4ceac8060/video/rtp_video_stream_receiver.cc#267

from aiortc.

jlaine avatar jlaine commented on May 19, 2024

I had a deeper look at the code, and it looks like simply sending out a PLI is not going to be enough. In addition the jitter buffer code would need to be reworked to discard packets intelligently, otherwise it will keep waiting for the missing packets until it eventually overflows. In fact I'm not entirely convinced we can keep using a single jitter buffer implementation for audio and video. The webrtc.org codebase seems to use two distinct implementations.

from aiortc.

jlaine avatar jlaine commented on May 19, 2024

@Przem83 fixed this in 42f4e0f

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.