wz_mini_hacks icon indicating copy to clipboard operation
wz_mini_hacks copied to clipboard

Most Reliable Settings for RTSP from V3 Cam? Stream dropping out regularly in VLC and TinyCam Pro.

Open evanheckert opened this issue 1 year ago • 6 comments

First of all, huge thanks for this library! It will be a lifesaver if I can get the last issue here resolved!

I'm connecting to the go2rtc RTSP url just fine, but in both TinyCam Pro and VLC on a high end android device (Galaxy Tab S7 Plus), every 10 seconds to a minute, I'll get a 10 second dropout. In VLC it just exits the stream and I have to reconnect. In TinyCam it just cuts out to black for 10 seconds and then resumes automatically.

Viewing the stream within the Wyze app works 100% without interruption.

Running V3 Cam on firmware 4.36.9.139, pulled from master on Oct 25, 2023.

Connecting to rtsp://<camera_ip>:8554/1080p

Relevant Settings:

#####VIDEO STREAM#####
RTSP_HI_RES_ENABLED="false"
RTSP_HI_RES_ENABLE_AUDIO="false"

RTSP_LOW_RES_ENABLED="false"
RTSP_LOW_RES_ENABLE_AUDIO="false"

RTSP_AUTH_DISABLE="false"

VIDEO_0_MAX_BITRATE="1024"
VIDEO_0_TARGET_BITRATE="512"
VIDEO_0_ENC_PARAMETER="2"
VIDEO_0_FPS=""

VIDEO_1_MAX_BITRATE=""
VIDEO_1_TARGET_BITRATE=""
VIDEO_1_ENC_PARAMETER=""
VIDEO_1_FPS=""

GO2RTC_SERVER_ENABLED="true"
GO2RTC_HI_RES_ENABLED="true"
GO2RTC_HI_RES_ENABLE_AUDIO="false"
GO2RTC_LOW_RES_ENABLED="false"
GO2RTC_LOW_RES_ENABLE_AUDIO="false"

My go2rtc config file is all defaults.

I've tried setting a lower framerate with the same results. What VIDEO_0 settings have given you the best, most reliable results? Anyone able to have a reliable stream going to an android device?

Many thanks for any help you can offer!

evanheckert avatar Oct 26 '23 15:10 evanheckert

I also use TinyCam on an old android tablet for as a Baby Monitor and do not have any dropouts for hours so hopefully you can figure out what is wrong. My camera and tablet is connected via ethernet though but I don't think i had issues even on wifi.

Two things you can try:

  1. Change VIDEO_0_ENC_PARAMETER="2" to "4" - I find the default doesn't respect the max bitrate at times and it caused lags with my very old tablet
  2. In TinyCam use RTSP over TCP instead of UDP

clee604 avatar Oct 26 '23 18:10 clee604

I also use TinyCam on an old android tablet for as a Baby Monitor and do not have any dropouts for hours so hopefully you can figure out what is wrong. My camera and tablet is connected via ethernet though but I don't think i had issues even on wifi.

Two things you can try:

  1. Change VIDEO_0_ENC_PARAMETER="2" to "4" - I find the default doesn't respect the max bitrate at times and it caused lags with my very old tablet
  2. In TinyCam use RTSP over TCP instead of UDP

I'll give that a try. Are you using go2rtc? What are your bitrate settings?

evanheckert avatar Oct 26 '23 19:10 evanheckert

VIDEO_0_MAX_BITRATE="2048" VIDEO_0_TARGET_BITRATE="1024" VIDEO_0_ENC_PARAMETER="4" VIDEO_0_FPS="15"

VIDEO_1_MAX_BITRATE="" VIDEO_1_TARGET_BITRATE="" VIDEO_1_ENC_PARAMETER="" VIDEO_1_FPS=""

GO2RTC_SERVER_ENABLED="true" GO2RTC_HI_RES_ENABLED="true" GO2RTC_HI_RES_ENABLE_AUDIO="false" GO2RTC_LOW_RES_ENABLED="false" GO2RTC_LOW_RES_ENABLE_AUDIO="false"

For go2rtc configuration I didn't change the defaults except adding api and rtsp authentication.

clee604 avatar Oct 26 '23 19:10 clee604

I appreciate you sharing @clee604 . I'm on those exact settings now, and TinyCam is still getting consistent dropouts.

Two variables that may be different - I'm currently using wifi, and they're on a network that isn't connected to the internet. Either of those not the case for you? It's got me wondering if every 15-60 seconds the cameras get upset that they're not connected to internet. I doubt it's wifi, because all three cameras are within 8 feet of the router (three car seat cams).

evanheckert avatar Nov 01 '23 03:11 evanheckert

Yes, my cameras are connected by ethernet and they do have access to the internet. I believe the icamera does a network check and reboots if it doesn't have access to the internet. There is a selfhosted mode setting in the wz_mini.conf that you can enable that patches icamera to use without internet. Do you have that enabled?

clee604 avatar Nov 01 '23 03:11 clee604

without internet how are you dealing with ntp for their timestamps?

jmbulan avatar Jan 14 '24 14:01 jmbulan