Opened 6 years ago

Closed 6 years ago

#2152 closed defect (fixed)

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 (1)

comment:1 Changed 6 years ago by nanang

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

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.