Opened 6 years ago

Closed 6 years ago

#2163 closed defect (fixed)

Frame rate (fps) detection issue

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

Reported that when calling a video echo server and video is switched off and on repeatedly every ~10s, sometimes there are issues like:

  • taking a while for incoming video echo to be shown after video restart,
  • frame rate hiccups after video restart, e.g: a video frame is shown, but then stopped still for sometime, then resumed with higher frame rate (catching up the delay), and eventually played at normal frame rate.

Log file showed strange frame rate change events:

Decoding format changed: 352x288 I420<- 90000/431010(~0)fps
Decoding format changed: 352x288 I420<- 90000/365760(~0)fps
...or..
Decoding format changed: 352x288 I420<- 90000/2610(~34)fps
Decoding format changed: 352x288 I420<- 25/1(~25)fps

Currently the video stream continuously performs frame rate detection, and it should only publish a format-changed event when frame rate is increasing. But the log shows that it also publishes a format-changed event even when it sees frame rate down to zero, which should not happen.

Thank you Giorgio Alfarano 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 5913:

Fix #2163:

  • Frame rate calculation is now done using temporary variable, instead of using stream decoding channel state directly.
  • Added condition for applying calculated frame rate: it must be greater than zero.
  • Fixed frame rate comparison to use float, was using integer which might get overflow on 32 bit integer platforms.
Note: See TracTickets for help on using tickets.