Ticket #2152 (closed defect: fixed)

Opened 3 months ago

Last modified 3 months ago

Avoid premature video frame decoding due to RTP reordering

Reported by: nanang Owned by: nanang
Priority: normal Milestone: release-2.9
Component: pjmedia Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

Currently video stream will assume a video frame is available and ready to decode when it sees RTP timestamp changing in the jitter buffer (note that RTP packets belong to same a video frame have same RTP timestamp). And when it sees a 'ready' frame, video stream will immediately pull those RTP packets from the JB and start decoding them.

Unfortunately such frame availability check method may cause video quality degradation when the network suffers from consistent RTP reordering, e.g: an RTP packet of a newer frame received before the last RTP packets of an older frame, so the video frame will be decoded without one or more RTP packets.

This ticket updates the behavior by introducing some delay in video frame decoding. The minimum delay is configurable via PJMEDIA_VID_STREAM_DECODE_MIN_DELAY_MSEC, which by default is 100ms. So video stream will make sure that there should be already few video frames in the JB before start decoding the oldest frame.

Thanks Sai Krishna Reddy Kovvuri for the report.

Change History

comment:1 Changed 3 months ago by nanang

  • Status changed from new to closed
  • Resolution set to fixed

In 5887:

Close #2152: Updated video stream to delay video frame decoding, the minimum delay is configurable via PJMEDIA_VID_STREAM_DECODE_MIN_DELAY_MSEC.

Note: See TracTickets for help on using tickets.