QuantumEntangledAndy / neolink

An RTSP bridge to Reolink IP cameras
GNU Affero General Public License v3.0
322 stars 44 forks source link

Lots of warnings in VLC client message log #37

Closed dkerr64 closed 1 year ago

dkerr64 commented 1 year ago

rtsp stream contains lots of missing frames / delayed frames. This may be unavoidable and cause may be upstream (the camera) but wanted to log these in case something can be done in neolink.

The problem occurs on both my wired and wifi/battery cameras so it is not a poor wifi link causing the issue. But it looks to be worse with the wifi/battery one.

This is the VLC client message log (WiFi camera)...

main debug: Buffering 87%
main debug: Buffering 89%
main debug: Buffering 91%
main debug: Buffering 93%
main debug: Buffering 95%
main debug: Buffering 98%
main debug: Stream buffering done (1003 ms in 556 ms)
main debug: Decoder wait done in 0 ms
main warning: buffer too late (-265602 us): dropped
main warning: picture is too late to be displayed (missing 231 ms)
hevc info: Waiting for VPS/SPS/PPS
hevc info: Waiting for VPS/SPS/PPS
hevc info: Waiting for VPS/SPS/PPS
hevc info: Waiting for VPS/SPS/PPS
hevc info: Waiting for VPS/SPS/PPS
hevc info: Waiting for VPS/SPS/PPS
hevc info: Waiting for VPS/SPS/PPS
hevc info: Waiting for VPS/SPS/PPS
hevc info: Waiting for VPS/SPS/PPS
hevc info: Waiting for VPS/SPS/PPS
hevc info: Waiting for VPS/SPS/PPS
hevc info: Waiting for VPS/SPS/PPS
live555 debug: tk->rtpSource->hasBeenSynchronizedUsingRTCP()
main warning: playback way too early (-1292480): playing silence
main debug: inserting 20679 zeroes
main warning: playback too late (106646): up-sampling
main warning: playback way too late (227108): flushing buffers
main debug: picture might be displayed late (missing 5 ms)
main debug: picture might be displayed late (missing 9 ms)
main warning: playback way too early (-967435): playing silence
main debug: inserting 15478 zeroes
main warning: picture is too late to be displayed (missing 123 ms)
main debug: picture might be displayed late (missing 4 ms)
main warning: picture is too late to be displayed (missing 126 ms)
main debug: picture might be displayed late (missing 5 ms)
main debug: picture might be displayed late (missing 8 ms)
main warning: playback too early (-49662): down-sampling
main debug: picture might be displayed late (missing 3 ms)
main debug: picture might be displayed late (missing 3 ms)
main debug: picture might be displayed late (missing 5 ms)
main warning: picture is too late to be displayed (missing 95 ms)
main warning: timing screwed (drift: -114421 us): stopping resampling
main warning: playback too early (-114358): down-sampling
main debug: picture might be displayed late (missing 1 ms)
main debug: picture might be displayed late (missing 2 ms)
main debug: picture might be displayed late (missing 2 ms)
main warning: playback way too early (-798095): playing silence
main debug: inserting 12769 zeroes
main debug: picture might be displayed late (missing 3 ms)
main warning: playback too early (-59052): down-sampling
main debug: picture might be displayed late (missing 3 ms)
main debug: picture might be displayed late (missing 2 ms)
main debug: picture might be displayed late (missing 3 ms)
main warning: picture is too late to be displayed (missing 126 ms)
main debug: picture might be displayed late (missing 15 ms)
main debug: picture might be displayed late (missing 16 ms)
main debug: resampling stopped (drift: -6129 us)
main debug: picture might be displayed late (missing 1 ms)
main warning: playback too late (117605): up-sampling
main warning: playback way too late (204223): flushing buffers
main warning: picture is too late to be displayed (missing 49 ms)
main debug: picture might be displayed late (missing 1 ms)
main debug: picture might be displayed late (missing 3 ms)
main debug: picture might be displayed late (missing 5 ms)
auhal warning: underrun of 1368 bytes
main warning: playback way too early (-1037521): playing silence
main debug: inserting 16600 zeroes
main warning: picture is too late to be displayed (missing 76 ms)
main warning: playback way too early (-180094): playing silence
main debug: inserting 2881 zeroes
main debug: picture might be displayed late (missing 1 ms)
main warning: picture is too late to be displayed (missing 125 ms)
main warning: picture is too late to be displayed (missing 52 ms)
main warning: picture is too late to be displayed (missing 52 ms)
main debug: picture might be displayed late (missing 1 ms)
main warning: picture is too late to be displayed (missing 89 ms)
main warning: picture is too late to be displayed (missing 47 ms)
main warning: playback way too early (-442093): playing silence
main debug: inserting 7073 zeroes
main warning: playback way too late (183092): flushing buffers
main warning: buffer too late (-249193 us): dropped
main warning: buffer too late (-227525 us): dropped
main debug: inserting 16475 zeroes
auhal warning: underrun of 34800 bytes
main debug: picture might be displayed late (missing 1 ms)
main warning: picture is too late to be displayed (missing 1520 ms)
main warning: picture is too late to be displayed (missing 1343 ms)
main warning: picture is too late to be displayed (missing 1343 ms)
main warning: picture is too late to be displayed (missing 1231 ms)
main warning: picture is too late to be displayed (missing 1231 ms)
main warning: picture is too late to be displayed (missing 1231 ms)
main warning: picture is too late to be displayed (missing 1008 ms)
main warning: picture is too late to be displayed (missing 1160 ms)
main warning: picture is too late to be displayed (missing 1072 ms)
main warning: picture is too late to be displayed (missing 1072 ms)
main warning: picture is too late to be displayed (missing 923 ms)
main warning: picture is too late to be displayed (missing 1055 ms)
main warning: picture is too late to be displayed (missing 965 ms)
main warning: picture is too late to be displayed (missing 965 ms)
main warning: picture is too late to be displayed (missing 877 ms)
main warning: picture is too late to be displayed (missing 877 ms)
main warning: picture is too late to be displayed (missing 877 ms)
main warning: playback way too early (-225562): playing silence
main debug: inserting 3608 zeroes
main warning: playback too early (-66758): down-sampling
main debug: picture might be displayed late (missing 3 ms)
main debug: resampling stopped (drift: -8586 us)
main debug: picture might be displayed late (missing 2 ms)
main warning: playback too late (103140): up-sampling
main warning: playback way too late (204102): flushing buffers
main debug: picture might be displayed late (missing 1 ms)
main warning: playback way too early (-1071679): playing silence
main debug: inserting 17146 zeroes
auhal warning: underrun of 60896 bytes
main debug: picture might be displayed late (missing 1 ms)
main warning: picture is too late to be displayed (missing 60 ms)
main debug: picture might be displayed late (missing 1 ms)
main warning: playback way too early (-173749): playing silence
main debug: inserting 2779 zeroes
main warning: picture is too late to be displayed (missing 113 ms)
main warning: picture is too late to be displayed (missing 35 ms)
main warning: picture is too late to be displayed (missing 35 ms)
main debug: picture might be displayed late (missing 1 ms)
main warning: playback too early (-59570): down-sampling
main debug: picture might be displayed late (missing 1 ms)
main debug: picture might be displayed late (missing 3 ms)
main warning: playback way too early (-123937): playing silence
main debug: inserting 1982 zeroes
main warning: playback way too late (272481): flushing buffers
main warning: playback way too early (-686199): playing silence
main debug: inserting 10979 zeroes
auhal warning: underrun of 62912 bytes
main warning: playback way too early (-1505773): playing silence
main debug: inserting 24092 zeroes
main warning: playback way too late (637184): flushing buffers
main debug: picture might be displayed late (missing 1 ms)
main debug: picture might be displayed late (missing 1 ms)
main warning: picture is too late to be displayed (missing 48 ms)
main debug: picture might be displayed late (missing 3 ms)
main debug: picture might be displayed late (missing 1 ms)
main warning: picture is too late to be displayed (missing 227 ms)
main warning: picture is too late to be displayed (missing 128 ms)
main warning: picture is too late to be displayed (missing 127 ms)
main warning: picture is too late to be displayed (missing 24 ms)
main warning: picture is too late to be displayed (missing 151 ms)
main warning: picture is too late to be displayed (missing 22 ms)
main warning: picture is too late to be displayed (missing 22 ms)
main warning: playback too late (143966): up-sampling
main warning: playback way too late (202111): flushing buffers
main debug: picture might be displayed late (missing 1 ms)
main debug: picture might be displayed late (missing 4 ms)
QuantumEntangledAndy commented 1 year ago

These are all timing errors saying that the data has come a little late. Currently we drop the time data stored in the iFrame/pFrame and just use the wallclock for timestamps. Might need to use that time data properly but I'm not really sure.

QuantumEntangledAndy commented 1 year ago

I'm now using the timestamps of the stream in the latest build could you maybe test again in the latest neolink?

QuantumEntangledAndy commented 1 year ago

Going to close this. I've done a few things to try and improve the warnings but they are mostly harmless and often unavoidable coming from upstream delays in the frames.

Please do checkout later code if you can as there is now some support for using the time stamps from the camera which should help with keeping frames somewhat smoother