srs RTMP: time_jitter: DTS out of order

rfbsl7qr  于 2022-12-31  发布在  其他
关注(0)|答案(7)|浏览(256)

if there is a big difference between the previous timestamp and the current timestamp - playback error

srs/trunk/src/app/srs_app_source.cpp

Line 73 in b066615

| | srs_error_tSrsRtmpJitter::correct(SrsSharedPtrMessage* msg, SrsRtmpJitterAlgorithm ag) |

ffplay
[flv @ 0000000000555700] DTS 16925 < 16983 out of order

srs_trace("%d ==> %d, last_pkt_time:%d, delta: %d, %s", msg->timestamp, last_pkt_correct_time, last_pkt_time, delta, msg->is_audio() ? "audio" : "video");

Format:
msg->timestam ==> last_pkt_correct_time, last_pkt_time, delta

38012 ==> 16764, last_pkt_time:37989, delta: 23, audio
38035 ==> 16787, last_pkt_time:38012, delta: 23, audio
38058 ==> 16810, last_pkt_time:38035, delta: 23, audio
38082 ==> 16834, last_pkt_time:38058, delta: 24, audio
38105 ==> 16857, last_pkt_time:38082, delta: 23, audio
38128 ==> 16880, last_pkt_time:38105, delta: 23, audio
38151 ==> 16903, last_pkt_time:38128, delta: 23, audio
38174 ==> 16926, last_pkt_time:38151, delta: 23, audio
38198 ==> 16950, last_pkt_time:38174, delta: 24, audio
38221 ==> 16973, last_pkt_time:38198, delta: 23, audio
correct jitter: dts: 37730, last_pkt_time: 38221, delta: 10, video //use default 10ms to notice the problem of stream
37730 ==> 16983, last_pkt_time:38221, delta: 10, video //LAST VIDEO FTS
correct jitter: dts: 38244, last_pkt_time: 37730, delta: 10, audio //use default 10ms to notice the problem of stream
38244 ==> 16993, last_pkt_time:37730, delta: 10, audio
38267 ==> 17016, last_pkt_time:38244, delta: 23, audio
38291 ==> 17040, last_pkt_time:38267, delta: 24, audio
38314 ==> 17063, last_pkt_time:38291, delta: 23, audio
38337 ==> 17086, last_pkt_time:38314, delta: 23, audio
38360 ==> 17109, last_pkt_time:38337, delta: 23, audio
38176 ==> 16925, last_pkt_time:38360, delta: -184, video // BAD timestamp (last video DTS = 16983) Video freezes in Chrome, but continue in ffplay

SRS: 4.0.178

f1tvaqid

f1tvaqid1#

Well it seems a discussion, and it not likely to happy so that we don't need to fix it?

8gsdolmq

8gsdolmq2#

I suggest disabling the default option

time_jitter off #OR zero
bz4sfanl

bz4sfanl3#

I didn't get you, what's the issue? To play RTMP stream? How to replay this issue?

wtlkbnrh

wtlkbnrh4#

I didn't get you, what's the issue? To play RTMP stream? How to replay this issue?

this is a borderline case. When changing the video resolution, my encoder(android yasea) sends the timestamps that I described at the beginning. Only disabling the jitter helped me

Yes, issue with playing (flv)

nhn9ugyo

nhn9ugyo5#

Rather than changing the default config value, it's much better to fix the jitter algorithm to fix this borderline case.

Patch welcome. 😄

whitzsjs

whitzsjs6#

Alas, I can't make a patch. although with jitter disabled there are audio problems (flvjs) ... ohhh, I dream of switching completely to webrtc, I'm still testing, but it works great. flvjs is still a crutch...

h43kikqp

h43kikqp7#

WebRTC is not designed for live streaming, so there's a lot of problems.Parts of them have been solved by SRS, but some still exists. Be careful, it's really really complex.

Welcome for more discuss in discord .

相关问题