Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the FMS source station is on, the frame rate is incorrect, causing video stuttering and shaking. #424

Closed
winlinvip opened this issue Jun 9, 2015 · 3 comments
Assignees
Labels
Bug It might be a bug. Enhancement Improvement or enhancement. TransByAI Translated by AI/GPT.
Milestone

Comments

@winlinvip
Copy link
Member

winlinvip commented Jun 9, 2015

Sometimes, the packages that come out of FMS have a timestamp of 0 in the gop cache at the beginning.

[2015-06-09 20:33:51.01] Video packet type=Video, dts=0, pts=0, diff=0, size=45, H.264(SH,I)
[2015-06-09 20:33:51.01] Audio packet type=Audio, dts=0, pts=0, diff=0, size=6, AAC(44KHz,16bit,Stereo,SH)
[2015-06-09 20:33:51.01] Rtmp packet type=Video, dts=0, diff=0, size=2, DecodeError
[2015-06-09 20:33:51.15] Video packet type=Video, dts=0, pts=80, diff=0, size=17044, H.264(Nalu,I)
[2015-06-09 20:33:51.15] Video packet type=Video, dts=0, pts=200, diff=0, size=4474, H.264(Nalu,P/B)
[2015-06-09 20:33:51.15] Video packet type=Video, dts=0, pts=80, diff=0, size=2045, H.264(Nalu,P/B)
[2015-06-09 20:33:51.15] Video packet type=Video, dts=0, pts=0, diff=0, size=1226, H.264(Nalu,P/B)
[2015-06-09 20:33:51.15] Video packet type=Video, dts=0, pts=40, diff=0, size=1476, H.264(Nalu,P/B)
[2015-06-09 20:33:51.19] Video packet type=Video, dts=0, pts=200, diff=0, size=3675, H.264(Nalu,P/B)
[2015-06-09 20:33:51.19] Video packet type=Video, dts=0, pts=80, diff=0, size=1741, H.264(Nalu,P/B)
[2015-06-09 20:33:51.19] Video packet type=Video, dts=0, pts=0, diff=0, size=1220, H.264(Nalu,P/B)
[2015-06-09 20:33:51.19] Video packet type=Video, dts=0, pts=40, diff=0, size=1210, H.264(Nalu,P/B)
[2015-06-09 20:33:51.19] Video packet type=Video, dts=0, pts=200, diff=0, size=3513, H.264(Nalu,P/B)
[2015-06-09 20:33:51.19] Video packet type=Video, dts=0, pts=80, diff=0, size=1617, H.264(Nalu,P/B)
[2015-06-09 20:33:51.19] Video packet type=Video, dts=0, pts=0, diff=0, size=1190, H.264(Nalu,P/B)
[2015-06-09 20:33:54.43] Video packet type=Video, dts=3, pts=83, diff=0, size=1866, H.264(Nalu,P/B)
[2015-06-09 20:33:54.75] Video packet type=Video, dts=43, pts=43, diff=40, size=1508, H.264(Nalu,P/B)
[2015-06-09 20:33:54.75] Audio packet type=Audio, dts=43, pts=43, diff=0, size=91, AAC(44KHz,16bit,Stereo,Raw)
[2015-06-09 20:33:54.79] Video packet type=Video, dts=83, pts=123, diff=40, size=1313, H.264(Nalu,P/B)

If the timestamp is corrected at this time, it will cause the first client to either fast forward or slow down the playback.

TRANS_BY_GPT3

@winlinvip winlinvip added Bug It might be a bug. Enhancement Improvement or enhancement. labels Jun 9, 2015
@winlinvip winlinvip added this to the srs 2.0 release milestone Jun 9, 2015
@winlinvip
Copy link
Member Author

winlinvip commented Jun 9, 2015

The most appropriate approach is to not adjust the timestamp when it remains unchanged. Only when the timestamp jumps, should it be corrected.

TRANS_BY_GPT3

@winlinvip
Copy link
Member Author

winlinvip commented Jun 9, 2015

    // if jitter detected, reset the delta.
    if (delta < 0 || delta > CONST_MAX_JITTER_MS) {

The current algorithm is to detect negative values and jumps.

TRANS_BY_GPT3

@winlinvip
Copy link
Member Author

winlinvip commented Jun 10, 2015

The problem of SRS2 frame skipping is related to handling aggregate messages in FMS and the issue with negative delta value judgment.

TRANS_BY_GPT3

@winlinvip winlinvip changed the title TimeJitter算法,时间戳不变时不用调整 FMS源站时,帧率不对,视频卡顿抖动 Jun 10, 2015
@winlinvip winlinvip self-assigned this Sep 25, 2021
@winlinvip winlinvip changed the title FMS源站时,帧率不对,视频卡顿抖动 When the FMS source station is on, the frame rate is incorrect, causing video stuttering and shaking. Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug It might be a bug. Enhancement Improvement or enhancement. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

1 participant