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

Wrong FPS for recordings [v2.8.x] #1159

Closed
JA16122000 opened this issue Apr 24, 2024 · 41 comments
Closed

Wrong FPS for recordings [v2.8.x] #1159

JA16122000 opened this issue Apr 24, 2024 · 41 comments

Comments

@JA16122000
Copy link

Now 2.8.1 is perfect
No more delay, but now ar my recordings wrong.
Cam 'voortuin' should be 30 minutes, but it is only 2.50 minutes
cam 'achtertuin' should also be 30 minutes, but is record in slowmotion and takes an hour to play.

So 1 is speedy forwarding recording, the otherone is in slomo 🤣

Originally posted by @JA16122000 in #1042 (reply in thread)

@mrlt8
Copy link
Owner

mrlt8 commented Apr 25, 2024

Looking into this. If you don't mind, can you post a short clip so I can inspect the FPS in the recording?

@JA16122000
Copy link
Author

voortuin_20240423_21_30_00.-.Trim.mp4
achtertuin_20240424_16_30_01.-.Trim.mp4

@JA16122000
Copy link
Author

It is not every clip, just a few.
i'm recording in 30 minutes clips:

            - RECORD_ALL=True
            - RECORD_PATH=/Record/{cam_name}
            - RECORD_FILE_NAME={cam_name}_%Y%m%d_%H_%M_%S
            - RECORD_LENGTH=1800   

@mrlt8
Copy link
Owner

mrlt8 commented Apr 25, 2024

Hmm, does this only happen when audio is enabled? If so, can you try AUDIO_CODEC=libopus?
Can you post the videoParm from the web-ui or /api/cam-name/fps from the web api?

Another option would be to set the FPS to -r 20 in ffmpeg with something like this (Note: audio should be disabled):

- FFMPEG_CMD=ffmpeg -hide_banner -loglevel info -fflags +flush_packets+nobuffer+genpts -flags +low_delay -thread_queue_size 8 -analyzeduration 32 -probesize 32 -f H264 -r 20 -i pipe:0 -map 0:v -c:v copy -max_muxing_queue_size 1 -max_delay 0.1 -rtbufsize 32 -f tee [use_fifo=1:fifo_options=attempt_recovery=1\\:drop_pkts_on_overflow=1:f=rtsp:rtsp_transport=tcp]rtsp://0.0.0.0:8554/{cam_name}|[onfail=ignore:f=segment:segment_time=60:segment_atclocktime=1:segment_format=mp4:reset_timestamps=1:strftime=1:use_fifo=1]/Record/{cam_name}/{cam_name}_%Y%m%d_%H_%M_%S.mp4

@JA16122000
Copy link
Author

Hmm, does this only happen when audio is enabled? If so, can you try AUDIO_CODEC=libopus? Can you post the videoParm from the web-ui or /api/cam-name/fps from the web api?

Another option would be to set the FPS to -r 20 in ffmpeg with something like this (Note: audio should be disabled):

- FFMPEG_CMD=ffmpeg -hide_banner -loglevel info -fflags +flush_packets+nobuffer+genpts -flags +low_delay -thread_queue_size 8 -analyzeduration 32 -probesize 32 -f H264 -r 20 -i pipe:0 -map 0:v -c:v copy -max_muxing_queue_size 1 -max_delay 0.1 -rtbufsize 32 -f tee [use_fifo=1:fifo_options=attempt_recovery=1\\:drop_pkts_on_overflow=1:f=rtsp:rtsp_transport=tcp]rtsp://0.0.0.0:8554/{cam_name}|[onfail=ignore:f=segment:segment_time=60:segment_atclocktime=1:segment_format=mp4:reset_timestamps=1:strftime=1:use_fifo=1]/Record/{cam_name}/{cam_name}_%Y%m%d_%H_%M_%S.mp4

i have no audio.

My docker-compose:


version: '2.4'
services:
    wyze-bridge:
        container_name: wyze-bridge
        restart: unless-stopped
        image: mrlt8/wyze-bridge:latest
        ports:
            - 1935:1935 # RTMP
            - 8554:8554 # RTSP
            - 8888:8888 # HLS
            - 5000:5000 # WEB-UI
            - 9997:9997 # Expose port for API
            - 8889:8889 # WebRTC
            - 8189:8189 # WebRTC/ICE
        environment:
            - API_ID=blablabla
            - API_KEY=blablabla
            - WYZE_EMAIL=blablabla@gmail.com
            - WYZE_PASSWORD=blablabla
            - WEB_AUTH=True
            - WEB_USERNAME=blablabla
            - WEB_PASSWORD=blablabla
            - WB_IP=192.168.178.78
            - NET_MODE=LAN
            - RECORD_ALL=True
            - RECORD_PATH=/Record/{cam_name}
            - RECORD_FILE_NAME={cam_name}_%Y%m%d_%H_%M_%S
            - RECORD_LENGTH=1800            
        volumes:
            - /mnt/usbhdd/Record/:/record/
            - ./tokens:/tokens/

@JA16122000
Copy link
Author

videoParm

{ "bitRate": "30", "fps": "20", "horizontalFlip": "1", "logo": "1", "resolution": "2", "time": "1", "type": "H264", "verticalFlip": "1" }

@JA16122000
Copy link
Author

http://j-mulderij.nl:5000/api/voortuin/fps

  |   -- | -- command | "fps" payload | "1,2,3,4,5,6,7,21,22,27,50" response | 20 status | "success" value | 20

============================

http://j-mulderij.nl:5000/api/achtertuin/fps

command | "fps" -- | -- payload | "1,2,3,4,5,6,7,21,22,27,50" response | 20 status | "success" value | 20

@JA16122000
Copy link
Author

The last few day's there seems no problems at all ...
I did not change anything 🤔

@JA16122000
Copy link
Author

I closed this to early.
Somehow, in the middle of nothin, recording freaks out en go fast for a few hours.
Later, it restores by itself.

Long time ago, i remember an ffmpeg command, to record (So day/night time was no issue)
What was that comment so i can try if that works better for me?

Am i the only one with this issue?

@JA16122000 JA16122000 reopened this May 2, 2024
@mrlt8
Copy link
Owner

mrlt8 commented May 2, 2024

Can you try the ffmpeg command I posted?

@JA16122000
Copy link
Author

Can you try the ffmpeg command I posted?

  • FFMPEG_CMD=ffmpeg -hide_banner -loglevel info -fflags +flush_packets+nobuffer+genpts -flags +low_delay -thread_queue_size 8 -analyzeduration 32 -probesize 32 -f H264 -r 20 -i pipe:0 -map 0:v -c:v copy -max_muxing_queue_size 1 -max_delay 0.1 -rtbufsize 32 -f tee [use_fifo=1:fifo_options=attempt_recovery=1\:drop_pkts_on_overflow=1:f=rtsp:rtsp_transport=tcp]rtsp://0.0.0.0:8554/{cam_name}|[onfail=ignore:f=segment:segment_time=60:segment_atclocktime=1:segment_format=mp4:reset_timestamps=1:strftime=1:use_fifo=1]/Record/{cam_name}/{cam_name}%Y%m%d%H_%M_%S.mp4

This one?

I'll try!

@JA16122000
Copy link
Author

JA16122000 commented May 2, 2024

[WyzeBridge] WARNING: invalid escape sequence '\:'
🚀 DOCKER-WYZE-BRIDGE v2.8.3 ARMV7L
[WyzeBridge] ♻️ Clearing local cache...
[WyzeBridge] Configuring LL-HLS
[WyzeBridge] 🔍 Could not find local cache for 'auth'
[WyzeBridge] ☁️ Fetching 'auth' from the Wyze API...
 * Serving Flask app 'frontend'
 * Debug mode: off
[WyzeBridge] WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:5000
 * Running on http://172.18.0.2:5000
[WyzeBridge] Press CTRL+C to quit
[WyzeBridge] 💾 Saving 'auth' to local cache...
[WyzeBridge] 🔍 Could not find local cache for 'user'
[WyzeBridge] ☁️ Fetching 'user' from the Wyze API...
[WyzeBridge] 💾 Saving 'user' to local cache...
[WyzeBridge] 🔍 Could not find local cache for 'cameras'
[WyzeBridge] ☁️ Fetching 'cameras' from the Wyze API...
[WyzeBridge] [API] Fetched [2] cameras
[WyzeBridge] 💾 Saving 'cameras' to local cache...
[WyzeBridge] [+] Adding Voortuin [HL_CAM3P]
[WyzeBridge] [+] Adding Achtertuin [HL_CAM3P]
[WyzeBridge] starting MediaMTX 1.1.1
[WyzeBridge] 🎬 2 streams enabled
[WyzeBridge] 🎉 Connecting to WyzeCam V3 Pro - Voortuin on 192.168.178.70
[WyzeBridge] 🎉 Connecting to WyzeCam V3 Pro - Achtertuin on 192.168.178.69
[achtertuin] 📡 Getting 180kb/s 2K stream (H264/10fps) via LAN mode (WiFi: 70%) FW: 4.58.12.9751 🔒
[voortuin] 📡 Getting 180kb/s 2K stream (H264/10fps) via LAN mode (WiFi: 46%) FW: 4.58.12.9751 🔒
[voortuin] WARNING: Skipping wrong frame_size at start of stream [frame_size=1]
[h264 @ 0xb6fcee20] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, h264, from 'pipe:0':
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 2560x1440, 10 tbr, 1200k tbn
Output #0, tee, to '[use_fifo=1:fifo_options=attempt_recovery=1\\:drop_pkts_on_overflow=1:f=rtsp:rtsp_transport=tcp]rtsp://0.0.0.0:8554/voortuin|[onfail=ignore:f=segment:segment_time=60:segment_atclocktime=1:segment_format=mp4:reset_timestamps=1:strftime=1:use_fifo=1]/Record/voortuin/voortuin_%Y%m%d_%H_%M_%S.mp4':
  Metadata:
    encoder         : Lavf60.3.100
  Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 2560x1440, q=2-31, 10 tbr, 20 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
[segment @ 0xb6ef1230] Opening '/Record/voortuin/voortuin_20240502_23_37_49.mp4' for writing
[segment @ 0xb6ef1230] Failed to open segment '/Record/voortuin/voortuin_20240502_23_37_49.mp4'
[WyzeBridge] ✅ '/voortuin stream is UP! (3/3)
[tee @ 0xb6efd220] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frame=    0 fps=0.0 q=-1.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    
[tee @ 0xb6efd220] Slave muxer #1 failed: No such file or directory, continuing with 1/2 slaves.
[achtertuin] WARNING: Skipping wrong frame_size at start of stream [frame_size=1]
frame=    5 fps=0.0 q=-1.0 size=N/A time=00:00:00.25 bitrate=N/A speed=0.491x    
[h264 @ 0xb6f8ae20] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, h264, from 'pipe:0':
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 2560x1440, 10 tbr, 1200k tbn
Output #0, tee, to '[use_fifo=1:fifo_options=attempt_recovery=1\\:drop_pkts_on_overflow=1:f=rtsp:rtsp_transport=tcp]rtsp://0.0.0.0:8554/achtertuin|[onfail=ignore:f=segment:segment_time=60:segment_atclocktime=1:segment_format=mp4:reset_timestamps=1:strftime=1:use_fifo=1]/Record/achtertuin/achtertuin_%Y%m%d_%H_%M_%S.mp4':
  Metadata:
    encoder         : Lavf60.3.100
  Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 2560x1440, q=2-31, 10 tbr, 20 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
frame=    0 fps=0.0 q=-1.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
[segment @ 0xb6ead220] Opening '/Record/achtertuin/achtertuin_20240502_23_37_50.mp4' for writing
[segment @ 0xb6ead220] Failed to open segment '/Record/achtertuin/achtertuin_20240502_23_37_50.mp4'
[WyzeBridge] ✅ '/achtertuin stream is UP! (3/3)
[achtertuin] [video] super slow
[achtertuin] WARNING: clear buffer
frame=   10 fps=9.4 q=-1.0 size=N/A time=00:00:00.50 bitrate=N/A speed=0.47x    
frame=    0 fps=0.0 q=-1.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frame=   12 fps=4.9 q=-1.0 size=N/A time=00:00:00.60 bitrate=N/A speed=0.245x    
frame=    0 fps=0.0 q=-1.0 size=       0kB time=00:00:00.50 bitrate=   0.0kbits/s speed=0.239x    
[tee @ 0xb6eb9240] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[tee @ 0xb6eb9240] Slave muxer #1 failed: No such file or directory, continuing with 1/2 slaves.
frame=    6 fps=2.0 q=-1.0 size=N/A time=00:00:00.80 bitrate=N/A speed=0.271x    
frame=   14 fps=4.1 q=-1.0 size=N/A time=00:00:00.70 bitrate=N/A speed=0.203x    
frame=   15 fps=3.4 q=-1.0 size=N/A time=00:00:00.75 bitrate=N/A speed=0.169x    
frame=   20 fps=4.9 q=-1.0 size=N/A time=00:00:01.50 bitrate=N/A speed=0.371x    
frame=   26 fps=5.2 q=-1.0 size=N/A time=00:00:01.80 bitrate=N/A speed=0.362x    
frame=   17 fps=3.1 q=-1.0 size=N/A time=00:00:00.85 bitrate=N/A speed=0.157x    
frame=   18 fps=2.8 q=-1.0 size=N/A time=00:00:00.90 bitrate=N/A speed=0.14x    
frame=   40 fps=6.6 q=-1.0 size=N/A time=00:00:02.50 bitrate=N/A speed=0.413x    
frame=   20 fps=2.7 q=-1.0 size=N/A time=00:00:01.00 bitrate=N/A speed=0.135x    
frame=   47 fps=6.7 q=-1.0 size=N/A time=00:00:02.80 bitrate=N/A speed=0.399x    
frame=   21 fps=2.5 q=-1.0 size=N/A time=00:00:01.05 bitrate=N/A speed=0.125x    
frame=   60 fps=7.4 q=-1.0 size=N/A time=00:00:03.50 bitrate=N/A speed=0.429x    
frame=   23 fps=2.4 q=-1.0 size=N/A time=00:00:01.15 bitrate=N/A speed=0.122x    
frame=   67 fps=7.2 q=-1.0 size=N/A time=00:00:03.85 bitrate=N/A speed=0.416x    
frame=   24 fps=2.3 q=-1.0 size=N/A time=00:00:01.20 bitrate=N/A speed=0.115x    
frame=   81 fps=8.0 q=-1.0 size=N/A time=00:00:04.50 bitrate=N/A speed=0.445x    
frame=   26 fps=2.3 q=-1.0 size=N/A time=00:00:01.30 bitrate=N/A speed=0.114x    
frame=   87 fps=7.6 q=-1.0 size=N/A time=00:00:04.85 bitrate=N/A speed=0.426x    
frame=   27 fps=2.2 q=-1.0 size=N/A time=00:00:01.35 bitrate=N/A speed=0.109x    
frame=  101 fps=8.2 q=-1.0 size=N/A time=00:00:05.50 bitrate=N/A speed=0.444x    
frame=   29 fps=2.2 q=-1.0 size=N/A time=00:00:01.45 bitrate=N/A speed=0.108x    
frame=  109 fps=8.2 q=-1.0 size=N/A time=00:00:05.95 bitrate=N/A speed=0.445x    
frame=   30 fps=2.1 q=-1.0 size=N/A time=00:00:01.50 bitrate=N/A speed=0.104x    
frame=  121 fps=8.6 q=-1.0 size=N/A time=00:00:06.50 bitrate=N/A speed=0.459x    
frame=   33 fps=2.1 q=-1.0 size=N/A time=00:00:01.60 bitrate=N/A speed=0.104x    
frame=  127 fps=8.3 q=-1.0 size=N/A time=00:00:06.85 bitrate=N/A speed=0.449x    
frame=   34 fps=2.1 q=-1.0 size=N/A time=00:00:01.65 bitrate=N/A speed= 0.1x    
frame=  140 fps=8.8 q=-1.0 size=N/A time=00:00:07.50 bitrate=N/A speed=0.47x    
frame=  145 fps=8.6 q=-1.0 size=N/A time=00:00:07.75 bitrate=N/A speed=0.461x    
frame=   35 fps=2.0 q=-1.0 size=N/A time=00:00:01.75 bitrate=N/A speed= 0.1x    
frame=  156 fps=9.0 q=-1.0 size=N/A time=00:00:08.20 bitrate=N/A speed=0.471x    
frame=   36 fps=2.0 q=-1.0 size=N/A time=00:00:01.80 bitrate=N/A speed=0.0977x    
frame=  161 fps=8.9 q=-1.0 size=N/A time=00:00:08.50 bitrate=N/A speed=0.468x    
frame=   38 fps=2.0 q=-1.0 size=N/A time=00:00:01.90 bitrate=N/A speed=0.0978x    
frame=  167 fps=8.7 q=-1.0 size=N/A time=00:00:08.85 bitrate=N/A speed=0.462x    
frame=   39 fps=1.9 q=-1.0 size=N/A time=00:00:01.95 bitrate=N/A speed=0.0955x    
frame=  180 fps=8.8 q=-1.0 size=N/A time=00:00:09.50 bitrate=N/A speed=0.467x    
frame=   41 fps=1.9 q=-1.0 size=N/A time=00:00:02.05 bitrate=N/A speed=0.0955x    
frame=  189 fps=8.8 q=-1.0 size=N/A time=00:00:09.95 bitrate=N/A speed=0.465x    
frame=   42 fps=1.9 q=-1.0 size=N/A time=00:00:02.10 bitrate=N/A speed=0.0936x    
frame=  201 fps=9.0 q=-1.0 size=N/A time=00:00:10.50 bitrate=N/A speed=0.471x    
frame=   44 fps=1.9 q=-1.0 size=N/A time=00:00:02.20 bitrate=N/A speed=0.094x    
frame=  209 fps=8.9 q=-1.0 size=N/A time=00:00:10.95 bitrate=N/A speed=0.468x    
frame=   45 fps=1.8 q=-1.0 size=N/A time=00:00:02.25 bitrate=N/A speed=0.092x    
frame=  220 fps=9.0 q=-1.0 size=N/A time=00:00:11.50 bitrate=N/A speed=0.472x    
frame=   47 fps=1.8 q=-1.0 size=N/A time=00:00:02.35 bitrate=N/A speed=0.0924x    
frame=  229 fps=9.1 q=-1.0 size=N/A time=00:00:11.95 bitrate=N/A speed=0.475x    
frame=   48 fps=1.8 q=-1.0 size=N/A time=00:00:02.40 bitrate=N/A speed=0.0909x    
frame=  241 fps=9.2 q=-1.0 size=N/A time=00:00:12.50 bitrate=N/A speed=0.478x    
frame=   50 fps=1.8 q=-1.0 size=N/A time=00:00:02.50 bitrate=N/A speed=0.0911x    
frame=  247 fps=9.1 q=-1.0 size=N/A time=00:00:12.85 bitrate=N/A speed=0.474x    
frame=   51 fps=1.8 q=-1.0 size=N/A time=00:00:02.55 bitrate=N/A speed=0.0896x    
frame=   52 fps=1.8 q=-1.0 size=N/A time=00:00:02.60 bitrate=N/A speed=0.0898x    
frame=  261 fps=9.3 q=-1.0 size=N/A time=00:00:13.50 bitrate=N/A speed=0.48x    
frame=  267 fps=9.1 q=-1.0 size=N/A time=00:00:13.85 bitrate=N/A speed=0.472x    
frame=   54 fps=1.8 q=-1.0 size=N/A time=00:00:02.70 bitrate=N/A speed=0.0887x    
frame=  279 fps=9.3 q=-1.0 size=N/A time=00:00:14.45 bitrate=N/A speed=0.481x    
frame=  285 fps=9.2 q=-1.0 size=N/A time=00:00:14.75 bitrate=N/A speed=0.478x    
frame=   56 fps=1.8 q=-1.0 size=N/A time=00:00:02.80 bitrate=N/A speed=0.089x    
frame=  293 fps=9.3 q=-1.0 size=N/A time=00:00:15.15 bitrate=N/A speed=0.483x    
frame=   57 fps=1.8 q=-1.0 size=N/A time=00:00:02.85 bitrate=N/A speed=0.0879x    
frame=  304 fps=9.4 q=-1.0 size=N/A time=00:00:15.65 bitrate=N/A speed=0.483x    
frame=   59 fps=1.8 q=-1.0 size=N/A time=00:00:02.95 bitrate=N/A speed=0.0882x    
frame=  311 fps=9.3 q=-1.0 size=N/A time=00:00:15.95 bitrate=N/A speed=0.477x    
frame=   60 fps=1.7 q=-1.0 size=N/A time=00:00:03.00 bitrate=N/A speed=0.0872x    
frame=  321 fps=9.4 q=-1.0 size=N/A time=00:00:16.45 bitrate=N/A speed=0.482x    
frame=   62 fps=1.7 q=-1.0 size=N/A time=00:00:03.10 bitrate=N/A speed=0.0874x    
frame=  326 fps=9.2 q=-1.0 size=N/A time=00:00:16.80 bitrate=N/A speed=0.477x    
frame=   63 fps=1.7 q=-1.0 size=N/A time=00:00:03.15 bitrate=N/A speed=0.0865x    
frame=  341 fps=9.4 q=-1.0 size=N/A time=00:00:17.45 bitrate=N/A speed=0.48x    
frame=   65 fps=1.7 q=-1.0 size=N/A time=00:00:03.25 bitrate=N/A speed=0.0867x    
frame=  348 fps=9.3 q=-1.0 size=N/A time=00:00:17.90 bitrate=N/A speed=0.478x    
frame=   66 fps=1.7 q=-1.0 size=N/A time=00:00:03.30 bitrate=N/A speed=0.0859x    
frame=  359 fps=9.3 q=-1.0 size=N/A time=00:00:18.45 bitrate=N/A speed=0.48x    
frame=   69 fps=1.7 q=-1.0 size=N/A time=00:00:03.40 bitrate=N/A speed=0.0862x    
frame=  369 fps=9.4 q=-1.0 size=N/A time=00:00:18.95 bitrate=N/A speed=0.481x    
frame=   70 fps=1.7 q=-1.0 size=N/A time=00:00:03.45 bitrate=N/A speed=0.0853x    
frame=  381 fps=9.4 q=-1.0 size=N/A time=00:00:19.45 bitrate=N/A speed=0.481x    
frame=   71 fps=1.7 q=-1.0 size=N/A time=00:00:03.55 bitrate=N/A speed=0.0857x    
frame=  389 fps=9.4 q=-1.0 size=N/A time=00:00:19.95 bitrate=N/A speed=0.482x    
frame=   72 fps=1.7 q=-1.0 size=N/A time=00:00:03.60 bitrate=N/A speed=0.0848x    
frame=  400 fps=9.5 q=-1.0 size=N/A time=00:00:20.45 bitrate=N/A speed=0.484x    
frame=   74 fps=1.7 q=-1.0 size=N/A time=00:00:03.70 bitrate=N/A speed=0.0852x    
frame=  407 fps=9.4 q=-1.0 size=N/A time=00:00:20.85 bitrate=N/A speed=0.481x    
frame=   75 fps=1.7 q=-1.0 size=N/A time=00:00:03.75 bitrate=N/A speed=0.0844x    
frame=  421 fps=9.5 q=-1.0 size=N/A time=00:00:21.45 bitrate=N/A speed=0.484x    
frame=   78 fps=1.7 q=-1.0 size=N/A time=00:00:03.85 bitrate=N/A speed=0.0848x    
frame=  430 fps=9.5 q=-1.0 size=N/A time=00:00:21.90 bitrate=N/A speed=0.483x    
frame=   79 fps=1.7 q=-1.0 size=N/A time=00:00:03.90 bitrate=N/A speed=0.084x    
frame=  439 fps=9.5 q=-1.0 size=N/A time=00:00:22.45 bitrate=N/A speed=0.486x    
frame=   80 fps=1.7 q=-1.0 size=N/A time=00:00:04.00 bitrate=N/A speed=0.0843x    
frame=  446 fps=9.4 q=-1.0 size=N/A time=00:00:22.80 bitrate=N/A speed=0.481x    
frame=   81 fps=1.7 q=-1.0 size=N/A time=00:00:04.05 bitrate=N/A speed=0.0836x    
frame=  460 fps=9.6 q=-1.0 size=N/A time=00:00:23.45 bitrate=N/A speed=0.488x    
frame=   83 fps=1.7 q=-1.0 size=N/A time=00:00:04.15 bitrate=N/A speed=0.084x    
frame=  465 fps=9.5 q=-1.0 size=N/A time=00:00:23.75 bitrate=N/A speed=0.484x    
frame=   84 fps=1.7 q=-1.0 size=N/A time=00:00:04.20 bitrate=N/A speed=0.0833x    
frame=  480 fps=9.6 q=-1.0 size=N/A time=00:00:24.45 bitrate=N/A speed=0.488x    
frame=  486 fps=9.5 q=-1.0 size=N/A time=00:00:24.80 bitrate=N/A speed=0.486x    
frame=   86 fps=1.7 q=-1.0 size=N/A time=00:00:04.30 bitrate=N/A speed=0.0836x    
frame=   87 fps=1.7 q=-1.0 size=N/A time=00:00:04.35 bitrate=N/A speed=0.0829x    
frame=  500 fps=9.6 q=-1.0 size=N/A time=00:00:25.45 bitrate=N/A speed=0.49x    
frame=  504 fps=9.5 q=-1.0 size=N/A time=00:00:25.70 bitrate=N/A speed=0.486x    
frame=   89 fps=1.7 q=-1.0 size=N/A time=00:00:04.45 bitrate=N/A speed=0.0833x    
frame=  513 fps=9.6 q=-1.0 size=N/A time=00:00:26.15 bitrate=N/A speed=0.49x    
frame=   90 fps=1.7 q=-1.0 size=N/A time=00:00:04.50 bitrate=N/A speed=0.0827x    
frame=  519 fps=9.6 q=-1.0 size=N/A time=00:00:26.45 bitrate=N/A speed=0.49x    
frame=   92 fps=1.7 q=-1.0 size=N/A time=00:00:04.60 bitrate=N/A speed=0.083x    
frame=  527 fps=9.5 q=-1.0 size=N/A time=00:00:26.75 bitrate=N/A speed=0.484x    
frame=   93 fps=1.6 q=-1.0 size=N/A time=00:00:04.65 bitrate=N/A speed=0.0824x    
frame=  541 fps=9.7 q=-1.0 size=N/A time=00:00:27.45 bitrate=N/A speed=0.491x    
frame=   95 fps=1.7 q=-1.0 size=N/A time=00:00:04.75 bitrate=N/A speed=0.0827x    
frame=  544 fps=9.5 q=-1.0 size=N/A time=00:00:27.70 bitrate=N/A speed=0.483x    
frame=   96 fps=1.6 q=-1.0 size=N/A time=00:00:04.80 bitrate=N/A speed=0.0821x    
frame=  560 fps=9.6 q=-1.0 size=N/A time=00:00:28.45 bitrate=N/A speed=0.487x    
frame=   98 fps=1.6 q=-1.0 size=N/A time=00:00:04.90 bitrate=N/A speed=0.0824x    
frame=  569 fps=9.6 q=-1.0 size=N/A time=00:00:28.95 bitrate=N/A speed=0.488x    
frame=   99 fps=1.6 q=-1.0 size=N/A time=00:00:04.95 bitrate=N/A speed=0.0819x    
frame=  579 fps=9.6 q=-1.0 size=N/A time=00:00:29.45 bitrate=N/A speed=0.49x    
frame=  586 fps=9.5 q=-1.0 size=N/A time=00:00:29.80 bitrate=N/A speed=0.486x    
frame=  102 fps=1.7 q=-1.0 size=N/A time=00:00:05.05 bitrate=N/A speed=0.0822x    
frame=  103 fps=1.6 q=-1.0 size=N/A time=00:00:05.10 bitrate=N/A speed=0.0812x    
frame=  600 fps=9.7 q=-1.0 size=N/A time=00:00:30.45 bitrate=N/A speed=0.49x    
frame=  104 fps=1.6 q=-1.0 size=N/A time=00:00:05.20 bitrate=N/A speed=0.0807x    
frame=  606 fps=9.6 q=-1.0 size=N/A time=00:00:30.80 bitrate=N/A speed=0.487x    
frame=  623 fps=9.8 q=-1.0 size=N/A time=00:00:31.60 bitrate=N/A speed=0.495x    
frame=  624 fps=9.7 q=-1.0 size=N/A time=00:00:31.65 bitrate=N/A speed=0.49x    
frame=  107 fps=1.6 q=-1.0 size=N/A time=00:00:05.35 bitrate=N/A speed=0.0818x    
frame=  630 fps=9.6 q=-1.0 size=N/A time=00:00:32.00 bitrate=N/A speed=0.489x    
frame=  108 fps=1.6 q=-1.0 size=N/A time=00:00:05.40 bitrate=N/A speed=0.0813x    
frame=  639 fps=9.6 q=-1.0 size=N/A time=00:00:32.45 bitrate=N/A speed=0.488x    
frame=  649 fps=9.6 q=-1.0 size=N/A time=00:00:32.95 bitrate=N/A speed=0.489x    
frame=  110 fps=1.6 q=-1.0 size=N/A time=00:00:05.50 bitrate=N/A speed=0.0816x    
frame=  111 fps=1.6 q=-1.0 size=N/A time=00:00:05.55 bitrate=N/A speed=0.0806x    
frame=  660 fps=9.6 q=-1.0 size=N/A time=00:00:33.45 bitrate=N/A speed=0.487x    
frame=  113 fps=1.6 q=-1.0 size=N/A time=00:00:05.65 bitrate=N/A speed=0.0807x    
frame=  671 fps=9.7 q=-1.0 size=N/A time=00:00:34.05 bitrate=N/A speed=0.491x    
frame=  115 fps=1.6 q=-1.0 size=N/A time=00:00:05.75 bitrate=N/A speed=0.0811x    
frame=  680 fps=9.6 q=-1.0 size=N/A time=00:00:34.45 bitrate=N/A speed=0.488x    
frame=  691 fps=9.7 q=-1.0 size=N/A time=00:00:35.05 bitrate=N/A speed=0.491x    
frame=  117 fps=1.6 q=-1.0 size=N/A time=00:00:05.85 bitrate=N/A speed=0.0803x    
frame=  699 fps=9.7 q=-1.0 size=N/A time=00:00:35.45 bitrate=N/A speed=0.49x    
frame=  708 fps=9.7 q=-1.0 size=N/A time=00:00:35.90 bitrate=N/A speed=0.489x    
frame=  119 fps=1.6 q=-1.0 size=N/A time=00:00:06.00 bitrate=N/A speed=0.0801x    
frame=  720 fps=9.7 q=-1.0 size=N/A time=00:00:36.45 bitrate=N/A speed=0.491x    
frame=  727 fps=9.7 q=-1.0 size=N/A time=00:00:36.85 bitrate=N/A speed=0.49x    
frame=  123 fps=1.6 q=-1.0 size=N/A time=00:00:06.15 bitrate=N/A speed=0.0805x    
frame=  739 fps=9.7 q=-1.0 size=N/A time=00:00:37.45 bitrate=N/A speed=0.492x    
frame=  745 fps=9.7 q=-1.0 size=N/A time=00:00:37.75 bitrate=N/A speed=0.49x    
frame=  125 fps=1.6 q=-1.0 size=N/A time=00:00:06.30 bitrate=N/A speed=0.0803x    
frame=  129 fps=1.6 q=-1.0 size=N/A time=00:00:06.45 bitrate=N/A speed=0.0814x    
frame=  760 fps=9.7 q=-1.0 size=N/A time=00:00:38.45 bitrate=N/A speed=0.493x    
frame=  765 fps=9.7 q=-1.0 size=N/A time=00:00:38.75 bitrate=N/A speed=0.49x    
frame=  132 fps=1.7 q=-1.0 size=N/A time=00:00:06.55 bitrate=N/A speed=0.0821x    
frame=  133 fps=1.7 q=-1.0 size=N/A time=00:00:06.60 bitrate=N/A speed=0.0821x    
frame=  779 fps=9.7 q=-1.0 size=N/A time=00:00:39.45 bitrate=N/A speed=0.493x    
frame=  134 fps=1.6 q=-1.0 size=N/A time=00:00:06.70 bitrate=N/A speed=0.0823x    
frame=  785 fps=9.6 q=-1.0 size=N/A time=00:00:39.75 bitrate=N/A speed=0.488x    
frame=  136 fps=1.6 q=-1.0 size=N/A time=00:00:06.75 bitrate=N/A speed=0.0819x    
frame=  801 fps=9.7 q=-1.0 size=N/A time=00:00:40.45 bitrate=N/A speed=0.492x    
frame=  138 fps=1.7 q=-1.0 size=N/A time=00:00:06.85 bitrate=N/A speed=0.0823x    
frame=  807 fps=9.7 q=-1.0 size=N/A time=00:00:40.85 bitrate=N/A speed=0.49x    
frame=  139 fps=1.6 q=-1.0 size=N/A time=00:00:06.90 bitrate=N/A speed=0.0817x    
frame=  820 fps=9.7 q=-1.0 size=N/A time=00:00:41.45 bitrate=N/A speed=0.491x    
frame=  141 fps=1.6 q=-1.0 size=N/A time=00:00:07.05 bitrate=N/A speed=0.0816x    
frame=  828 fps=9.7 q=-1.0 size=N/A time=00:00:41.90 bitrate=N/A speed=0.491x    
frame=  145 fps=1.7 q=-1.0 size=N/A time=00:00:07.20 bitrate=N/A speed=0.0827x    
frame=  840 fps=9.7 q=-1.0 size=N/A time=00:00:42.45 bitrate=N/A speed=0.49x    
frame=  147 fps=1.7 q=-1.0 size=N/A time=00:00:07.30 bitrate=N/A speed=0.0825x    
frame=  850 fps=9.7 q=-1.0 size=N/A time=00:00:43.00 bitrate=N/A speed=0.492x    
frame=  149 fps=1.7 q=-1.0 size=N/A time=00:00:07.45 bitrate=N/A speed=0.0833x    
frame=  860 fps=9.7 q=-1.0 size=N/A time=00:00:43.45 bitrate=N/A speed=0.49x    
frame=  151 fps=1.7 q=-1.0 size=N/A time=00:00:07.55 bitrate=N/A speed=0.0835x    
frame=  871 fps=9.7 q=-1.0 size=N/A time=00:00:44.05 bitrate=N/A speed=0.493x    
frame=  155 fps=1.7 q=-1.0 size=N/A time=00:00:07.75 bitrate=N/A speed=0.0848x    
frame=  880 fps=9.7 q=-1.0 size=N/A time=00:00:44.45 bitrate=N/A speed=0.491x    
frame=  158 fps=1.7 q=-1.0 size=N/A time=00:00:07.85 bitrate=N/A speed=0.0852x    
frame=  890 fps=9.7 q=-1.0 size=N/A time=00:00:45.00 bitrate=N/A speed=0.493x    
frame=  161 fps=1.7 q=-1.0 size=N/A time=00:00:08.10 bitrate=N/A speed=0.0872x    
frame=  164 fps=1.8 q=-1.0 size=N/A time=00:00:08.20 bitrate=N/A speed=0.0878x    
frame=  900 fps=9.7 q=-1.0 size=N/A time=00:00:45.45 bitrate=N/A speed=0.491x    
frame=  167 fps=1.8 q=-1.0 size=N/A time=00:00:08.30 bitrate=N/A speed=0.0879x    
frame=  910 fps=9.7 q=-1.0 size=N/A time=00:00:46.00 bitrate=N/A speed=0.493x    
frame=  170 fps=1.8 q=-1.0 size=N/A time=00:00:08.50 bitrate=N/A speed=0.0891x    
frame=  920 fps=9.7 q=-1.0 size=N/A time=00:00:46.45 bitrate=N/A speed=0.491x    
frame=  172 fps=1.8 q=-1.0 size=N/A time=00:00:08.60 bitrate=N/A speed=0.0892x    
frame=  930 fps=9.7 q=-1.0 size=N/A time=00:00:47.00 bitrate=N/A speed=0.493x    
frame=  175 fps=1.8 q=-1.0 size=N/A time=00:00:08.80 bitrate=N/A speed=0.0903x    
frame=  939 fps=9.7 q=-1.0 size=N/A time=00:00:47.45 bitrate=N/A speed=0.492x    
frame=  180 fps=1.8 q=-1.0 size=N/A time=00:00:09.00 bitrate=N/A speed=0.0914x    
frame=  950 fps=9.8 q=-1.0 size=N/A time=00:00:48.00 bitrate=N/A speed=0.493x    
frame=  183 fps=1.8 q=-1.0 size=N/A time=00:00:09.15 bitrate=N/A speed=0.092x    
frame=  959 fps=9.7 q=-1.0 size=N/A time=00:00:48.45 bitrate=N/A speed=0.491x    
frame=  971 fps=9.8 q=-1.0 size=N/A time=00:00:49.05 bitrate=N/A speed=0.494x    
frame=  186 fps=1.9 q=-1.0 size=N/A time=00:00:09.30 bitrate=N/A speed=0.0926x    
frame=  188 fps=1.9 q=-1.0 size=N/A time=00:00:09.40 bitrate=N/A speed=0.0929x    
frame=  979 fps=9.7 q=-1.0 size=N/A time=00:00:49.45 bitrate=N/A speed=0.491x    
frame=  190 fps=1.9 q=-1.0 size=N/A time=00:00:09.50 bitrate=N/A speed=0.0931x    
frame=  993 fps=9.8 q=-1.0 size=N/A time=00:00:50.10 bitrate=N/A speed=0.494x    
frame=  192 

@mrlt8
Copy link
Owner

mrlt8 commented May 2, 2024

can you try:

- FFMPEG_CMD=ffmpeg -hide_banner -loglevel error -fflags +flush_packets+nobuffer+genpts -flags +low_delay -thread_queue_size 8 -analyzeduration 32 -probesize 32 -f H264 -r 20 -i pipe:0 -map 0:v -c:v copy -max_muxing_queue_size 1 -max_delay 0.1 -rtbufsize 32 -f tee [use_fifo=1:fifo_options=attempt_recovery=1\\:drop_pkts_on_overflow=1:f=rtsp:rtsp_transport=tcp]rtsp://0.0.0.0:8554/{cam_name}|[onfail=ignore:f=segment:segment_time=60:segment_atclocktime=1:segment_format=mp4:reset_timestamps=1:strftime=1:use_fifo=1]/record/Record/{cam_name}/{cam_name}_%Y%m%d_%H_%M_%S.mp4

@JA16122000
Copy link
Author

can you try:

- FFMPEG_CMD=ffmpeg -hide_banner -loglevel error -fflags +flush_packets+nobuffer+genpts -flags +low_delay -thread_queue_size 8 -analyzeduration 32 -probesize 32 -f H264 -r 20 -i pipe:0 -map 0:v -c:v copy -max_muxing_queue_size 1 -max_delay 0.1 -rtbufsize 32 -f tee [use_fifo=1:fifo_options=attempt_recovery=1\\:drop_pkts_on_overflow=1:f=rtsp:rtsp_transport=tcp]rtsp://0.0.0.0:8554/{cam_name}|[onfail=ignore:f=segment:segment_time=60:segment_atclocktime=1:segment_format=mp4:reset_timestamps=1:strftime=1:use_fifo=1]/record/Record/{cam_name}/{cam_name}_%Y%m%d_%H_%M_%S.mp4

`🚀 DOCKER-WYZE-BRIDGE v2.8.3 ARMV7L

[WyzeBridge] ♻️ Clearing local cache...

[WyzeBridge] Configuring LL-HLS

[WyzeBridge] 🔍 Could not find local cache for 'auth'

[WyzeBridge] ☁️ Fetching 'auth' from the Wyze API...

  • Serving Flask app 'frontend'

  • Debug mode: off

[WyzeBridge] WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.

[WyzeBridge] Press CTRL+C to quit

[WyzeBridge] 💾 Saving 'auth' to local cache...

[WyzeBridge] 🔍 Could not find local cache for 'user'

[WyzeBridge] ☁️ Fetching 'user' from the Wyze API...

[WyzeBridge] 💾 Saving 'user' to local cache...

[WyzeBridge] 🔍 Could not find local cache for 'cameras'

[WyzeBridge] ☁️ Fetching 'cameras' from the Wyze API...

[WyzeBridge] [API] Fetched [2] cameras

[WyzeBridge] 💾 Saving 'cameras' to local cache...

[WyzeBridge] [+] Adding Voortuin [HL_CAM3P]

[WyzeBridge] [+] Adding Achtertuin [HL_CAM3P]

[WyzeBridge] starting MediaMTX 1.1.1

[WyzeBridge] 🎬 2 streams enabled

[WyzeBridge] 🎉 Connecting to WyzeCam V3 Pro - Voortuin on 192.168.178.70

[WyzeBridge] 🎉 Connecting to WyzeCam V3 Pro - Achtertuin on 192.168.178.69

[achtertuin] 📡 Getting 180kb/s 2K stream (H264/10fps) via LAN mode (WiFi: 70%) FW: 4.58.12.9751 🔒

[voortuin] 📡 Getting 180kb/s 2K stream (H264/10fps) via LAN mode (WiFi: 44%) FW: 4.58.12.9751 🔒

[voortuin] WARNING: Skipping wrong frame_size at start of stream [frame_size=1]

[achtertuin] WARNING: Skipping wrong frame_size at start of stream [frame_size=1]

[h264 @ 0xb6f6ce20] Stream #0: not enough frames to estimate rate; consider increasing probesize

Input #0, h264, from 'pipe:0':

Duration: N/A, bitrate: N/A

Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 2560x1440, 10 tbr, 1200k tbn

Output #0, tee, to '[use_fifo=1:fifo_options=attempt_recovery=1\:drop_pkts_on_overflow=1:f=rtsp:rtsp_transport=tcp]rtsp://0.0.0.0:8554/voortuin|[onfail=ignore:f=segment:segment_time=60:segment_atclocktime=1:segment_format=mp4:reset_timestamps=1:strftime=1:use_fifo=1]/Record/voortuin/voortuin_%Y%m%d_%H_%M_%S.mp4':

Metadata:

encoder         : Lavf60.3.100

Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 2560x1440, q=2-31, 10 tbr, 20 tbn

Stream mapping:

Stream #0:0 -> #0:0 (copy)

[segment @ 0xb6e8f230] Opening '/Record/voortuin/voortuin_20240503_00_20_28.mp4' for writing

[segment @ 0xb6e8f230] Failed to open segment '/Record/voortuin/voortuin_20240503_00_20_28.mp4'

[WyzeBridge] ✅ '/voortuin stream is UP! (3/3)

frame= 0 fps=0.0 q=-1.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A
frame= 0 fps=0.0 q=-1.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A
[h264 @ 0xb6fa6e20] Stream #0: not enough frames to estimate rate; consider increasing probesize

Input #0, h264, from 'pipe:0':

Duration: N/A, bitrate: N/A

Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 2560x1440, 10 tbr, 1200k tbn

Output #0, tee, to '[use_fifo=1:fifo_options=attempt_recovery=1\:drop_pkts_on_overflow=1:f=rtsp:rtsp_transport=tcp]rtsp://0.0.0.0:8554/achtertuin|[onfail=ignore:f=segment:segment_time=60:segment_atclocktime=1:segment_format=mp4:reset_timestamps=1:strftime=1:use_fifo=1]/Record/achtertuin/achtertuin_%Y%m%d_%H_%M_%S.mp4':

Metadata:

encoder         : Lavf60.3.100

Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 2560x1440, q=2-31, 10 tbr, 20 tbn

[segment @ 0xb6ec9220] Opening '/Record/achtertuin/achtertuin_20240503_00_20_29.mp4' for writing

Stream mapping:

Stream #0:0 -> #0:0Failed to open segment '/Record/achtertuin/achtertuin_20240503_00_20_29.mp4'

(copy)

[WyzeBridge] ✅ '/achtertuin stream is UP! (3/3)

frame= 0 fps=0.0 q=-1.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A
frame= 0 fps=0.0 q=-1.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A
[tee @ 0xb6e9b220] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly

[tee @ 0xb6e9b220] Slave muxer #1 failed: No such file or directory, continuing with 1/2 slaves.

frame= 3 fps=1.8 q=-1.0 size=N/A time=00:00:01.10 bitrate=N/A speed=0.657x
[tee @ 0xb6ed5240] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly

frame= 1 fps=0.9 q=-1.0 size=N/A time=00:00:00.75 bitrate=N/A speed=0.641x
[tee @ 0xb6ed5240] Slave muxer #1 failed: No such file or directory, continuing with 1/2 slaves.

`

@JA16122000
Copy link
Author

Overall, since i've tried both '- FFMPEG_CMD=ffmpeg' commands, there are no recordings at all ?!? 🤣

@mrlt8
Copy link
Owner

mrlt8 commented May 3, 2024

a more basic path:

- FFMPEG_CMD=ffmpeg -hide_banner -loglevel info -fflags +flush_packets+nobuffer+genpts -flags +low_delay -thread_queue_size 8 -analyzeduration 32 -probesize 32 -f H264 -r 20 -i pipe:0 -map 0:v -c:v copy -max_muxing_queue_size 1 -max_delay 0.1 -rtbufsize 32 -f tee [use_fifo=1:fifo_options=attempt_recovery=1\\:drop_pkts_on_overflow=1:f=rtsp:rtsp_transport=tcp]rtsp://0.0.0.0:8554/{cam_name}|[onfail=ignore:f=segment:segment_time=60:segment_atclocktime=1:segment_format=mp4:reset_timestamps=1:strftime=1:use_fifo=1]/record/{cam_name}/{cam_name}_%Y%m%d_%H_%M_%S.mp4

@JA16122000
Copy link
Author

a more basic path:

- FFMPEG_CMD=ffmpeg -hide_banner -loglevel info -fflags +flush_packets+nobuffer+genpts -flags +low_delay -thread_queue_size 8 -analyzeduration 32 -probesize 32 -f H264 -r 20 -i pipe:0 -map 0:v -c:v copy -max_muxing_queue_size 1 -max_delay 0.1 -rtbufsize 32 -f tee [use_fifo=1:fifo_options=attempt_recovery=1\\:drop_pkts_on_overflow=1:f=rtsp:rtsp_transport=tcp]rtsp://0.0.0.0:8554/{cam_name}|[onfail=ignore:f=segment:segment_time=60:segment_atclocktime=1:segment_format=mp4:reset_timestamps=1:strftime=1:use_fifo=1]/record/{cam_name}/{cam_name}_%Y%m%d_%H_%M_%S.mp4

Will try this!

@JA16122000
Copy link
Author

exactly on 21:45 and 30 seconds (9u45m30s pm) just one camera (achtertuin) is going faster (night-time?)
The next file is also double speed

mrlt8 added a commit that referenced this issue May 4, 2024
@JA16122000
Copy link
Author

JA16122000 commented May 4, 2024

Exactly on 05::23 and 25 seconds (5u23m25s am) that exact same camera is going normal again.
The next file is also normal

while the other camera in the 'voortuin' is going superfast exactly on 01:13 and 48 seconds (1u13m48s am) superspeed til the next 2 recordings. They are going crazy fast as wel.

between 2u20m00s and 2u29m00s 'voortuin' is buffering to get normal speed and normal speed is back again at 2u29m00s am

changed command:

  • FFMPEG_CMD=ffmpeg -hide_banner -loglevel info -fflags +flush_packets+nobuffer+genpts -flags +low_delay -thread_queue_size 8 -analyzeduration 32 -probesize 32 -f H264 -r 20 -i pipe:0 -map 0:v -c:v copy -max_muxing_queue_size 1 -max_delay 0.1 -rtbufsize 32 -f tee [use_fifo=1:fifo_options=attempt_recovery=1\:drop_pkts_on_overflow=1:f=rtsp:rtsp_transport=tcp]rtsp://0.0.0.0:8554/{cam_name}|[onfail=ignore:f=segment:segment_time=60:segment_atclocktime=1:segment_format=mp4:reset_timestamps=1:strftime=1:use_fifo=1]/record/{cam_name}/{cam_name}%Y%m%d%H_%M_%S.mp4

to

  • FFMPEG_CMD=ffmpeg -hide_banner -loglevel info -fflags +flush_packets+nobuffer+genpts -flags +low_delay -thread_queue_size 8 -analyzeduration 32 -probesize 32 -f H264 -r 20 -i pipe:0 -map 0:v -c:v copy -max_muxing_queue_size 1 -max_delay 0.1 -rtbufsize 32 -f tee [use_fifo=1:fifo_options=attempt_recovery=1\:drop_pkts_on_overflow=1:f=rtsp:rtsp_transport=tcp]rtsp://0.0.0.0:8554/{cam_name}|[onfail=ignore:f=segment:segment_time=1800:segment_atclocktime=1:segment_format=mp4:reset_timestamps=1:strftime=1:use_fifo=1]/record/{cam_name}/{cam_name}%Y%m%d%H_%M_%S.mp4

so recordings ar 30 minutes instead of 1 minute

mrlt8 added a commit that referenced this issue May 4, 2024
@mrlt8 mrlt8 changed the title Now 2.8.1 is perfect but recordings seems to be wrong Wrong FPS for recordings [v2.8.x] May 4, 2024
@mrlt8
Copy link
Owner

mrlt8 commented May 4, 2024

@JA16122000 could you try the latest dev build without any custom ffmpeg commands?

@JA16122000
Copy link
Author

@JA16122000 could you try the latest dev build without any custom ffmpeg commands?

Will try!

[WyzeBridge] WARNING: invalid escape sequence ':'
🚀 DOCKER-WYZE-BRIDGE v2.8.3 ARMV7L DEV BUILD [2024-05-04t14:12:39.486z] 8aea9e9
[WyzeBridge] ♻️ Clearing local cache...
[WyzeBridge] Configuring LL-HLS
[WyzeBridge] 🔍 Could not find local cache for 'auth'
[WyzeBridge] ☁️ Fetching 'auth' from the Wyze API...

  • Serving Flask app 'frontend'
  • Debug mode: off
    [WyzeBridge] WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Running on all addresses (0.0.0.0)
  • Running on http://127.0.0.1:5000
  • Running on http://172.18.0.2:5000
    [WyzeBridge] Press CTRL+C to quit
    [WyzeBridge] 💾 Saving 'auth' to local cache...
    [WyzeBridge] 🔍 Could not find local cache for 'user'
    [WyzeBridge] ☁️ Fetching 'user' from the Wyze API...
    [WyzeBridge] 💾 Saving 'user' to local cache...
    [WyzeBridge] 🔍 Could not find local cache for 'cameras'
    [WyzeBridge] ☁️ Fetching 'cameras' from the Wyze API...
    [WyzeBridge] [API] Fetched [2] cameras
    [WyzeBridge] 💾 Saving 'cameras' to local cache...
    [WyzeBridge] [+] Adding Voortuin [HL_CAM3P]
    [WyzeBridge] [+] Adding Achtertuin [HL_CAM3P]
    [WyzeBridge] starting MediaMTX 1.1.1
    [WyzeBridge] 🎬 2 streams enabled
    [WyzeBridge] 🎉 Connecting to WyzeCam V3 Pro - Voortuin on 192.168.178.70
    [WyzeBridge] 🎉 Connecting to WyzeCam V3 Pro - Achtertuin on 192.168.178.69
    [achtertuin] 📡 Getting 180kb/s 2K stream (H264/20fps) via LAN mode (WiFi: 70%) FW: 4.58.12.9751 🔒
    [achtertuin] 📹 Will record 1800s mp4 clips to /record/achtertuin/
    [achtertuin] WARNING: Skipping wrong frame_size at start of stream [frame_size=1]
    [achtertuin] [video] super slow
    [achtertuin] WARNING: clear buffer
    [voortuin] 📡 Getting 180kb/s 2K stream (H264/20fps) via LAN mode (WiFi: 45%) FW: 4.58.12.9751 🔒
    [voortuin] 📹 Will record 1800s mp4 clips to /record/voortuin/
    [voortuin] WARNING: Skipping wrong frame_size at start of stream [frame_size=1]
    [WyzeBridge] ✅ '/voortuin stream is UP! (3/3)
    [WyzeBridge] ✅ '/achtertuin stream is UP! (3/3)

@JA16122000
Copy link
Author

@JA16122000 could you try the latest dev build without any custom ffmpeg commands?

Both camera's change recordingspeed, on different times.
You can see on both recordings on that specific time, there is a'n flip/glitch/something else going on.

It looks like it have something to do with the darkness sensors from both camera's?

exactly on 05:27 and 12 seconds (5u26m12s am) camera (achtertuin) is going slower (night-time?)
The next files is also half speed (even now while writing this)

NOTE: This night the bridge found an new DEV update and is used since 02:56 last night, sow the very last DEV update is used right now

==

exactly on 05:19 and 08 seconds (5u19m8s am) the other camera (voortuin) is going slower (night-time?)
The next files is also half speed (even now while writing this)

NOTE: This night the bridge found an new DEV update and is used since 02:56 last night, sow the very last DEV update is used right now

Achtertuin (See around 05:27:12):
https://github.com/mrlt8/docker-wyze-bridge/assets/112784196/9601f7b6-678a-46e3-a49c-c89a4f6bed07

Vooruin (See around 05:19:08):
https://github.com/mrlt8/docker-wyze-bridge/assets/112784196/e9d06e30-9898-4518-b501-246c27245753

@mrlt8
Copy link
Owner

mrlt8 commented May 5, 2024

Can you try setting the FPS to 20 via the webUI, then reboot each cam to see if that might help?

Edit: was the day/night recording fine on v2.6.x?

@JA16122000
Copy link
Author

JA16122000 commented May 5, 2024

Can you try setting the FPS to 20 via the webUI, then reboot each cam to see if that might help?

Edit: was the day/night recording fine on v2.6.x?

2.6.x was just fine (i think)

EDIT: There was a new 'dev' build and portainer just installed tis automaticly, so now the speed is normal.
We will see if this will change later this night in an hour of 3 ;)

@mrlt8
Copy link
Owner

mrlt8 commented May 8, 2024

Any changes with the current dev build @JA16122000 ?

@JA16122000
Copy link
Author

Any changes with the current dev build @JA16122000 ?

Hard to tell.
Last few days, when portainer found an new 'dev build' this instant download en installed that new version.
And so with that, also a new start of the bridge :P

But we will see and report if it stil is going on! :D

@JA16122000
Copy link
Author

Nope, still the same problem.

@mrlt8
Copy link
Owner

mrlt8 commented May 9, 2024

@JA16122000 can you try setting the FPS and doing a reboot via the WebUI:

http://localhost:5001/api/<cam-name>/fps/20
http://localhost:5001/api/<cam-name>/power/reboot

This seems to have cleared up some weird issues I had with one of my shared cameras.

Can you also disable auto updates temporarily so we can keep track of the build number that is having issues?

@JA16122000
Copy link
Author

power/reboot

I've paused automatic updates now, so build:
🚀 DOCKER-WYZE-BRIDGE v2.8.3 ARMV7L DEV BUILD [2024-05-09t15:08:05.461z] fe5d427
is the current build i'm using.

Did your commands only with another port (instead of 5001, i have used: 5000 with succes.)

192.168.178.78:5000/api/voortuin/fps/20
192.168.178.78:5000/api/achtertuin/fps/20
192.168.178.78:5000/api/voortuin/power/reboot
192.168.178.78:5000/api/achtertuin/power/reboot

@JA16122000
Copy link
Author

Last night, I opened the Wyze APP.

I then experienced 'disconnections' which caused the cameras to reconnect.

This resulted in (after the reconnection) the 'backyard' camera recording 1x slower (30 minutes, became 1 hour).

mrlt8 added a commit that referenced this issue May 12, 2024
* Sign motion event request #1125

* use device id instead of mac #1125

* remove wrong flags from mkfifo #1174

* less aggressive flush #1159 #1167

* Use K10052 for setting FPS #1161

* Refactor bits for going above 255 for quality

* Revert ffmpeg changes #1159 #1167

* version is obsolete

* default quality to hd180

* Update Wyze iOS App version from v2.44.5.3 to v2.50.6.1 (#1176)

* use struct pack

* Token based auth over the webUI

* Fix redirect for Home Assistant Ingress

* Use request headers to fix redirect for HA

* Change GET to POST for webhooks data

* Deprecate ifttt_webhook in favor of webhooks

* use yml for HA config and make credentials optional

* keep trying to identify audio #1172

* Snapshot on motion and push to mqtt #709 #970

* Add event time to motion message

* refactor auth

* EVENT_API option #1125

* Add additional headers  #1125

* Audio sync with higher bitrate

* Debug api request #1125

* Update api.py

* only debug on error

* Tweak audio sync

* don't raise error on lost frame

* clear buffer if out of sync

* Unique macs only #1125

Co-Authored-By: Cameron <32912464+kiwi-cam@users.noreply.github.com>

* Require auth by default and block non-ingress access #1181

* Allow non-ingress access with auth #1181

* Remove retain flag from commands #1182

* update webrtc to work with auth streams

* Add WB_API and rename WEB to WB #1181

WEB_USERNAME > WB_USERNAME
WEB_PASSWORD > WB_PASSWORD

* HA move /config/wyze-bridge/ to /config/

* Don't notify substream event and remove v2 #1125

* WebUI Auth related config for HA

* Don't retain discovery message? #1182

* Case sensitive credentials for WebUI

* changelog and readme

---------

Co-authored-by: Cameron <32912464+kiwi-cam@users.noreply.github.com>
@mrlt8
Copy link
Owner

mrlt8 commented May 12, 2024

Hmm, so it works fine until the app is opened?

@JA16122000
Copy link
Author

JA16122000 commented May 12, 2024

Hmm, so it works fine until the app is opened?

I don't think that's the issue.

Your previous suggestion #1159 (comment) indeed do what it's supposed to.

However, after a disconnect or reconnect, it fails.

Is it possible to have #1159 (comment) run automatically after each start?
I think that would be the solution.

@mrlt8
Copy link
Owner

mrlt8 commented May 12, 2024

sorry your links don't seem to work. Was it the /fps/20 command that helped? did you also need the power/restart command?

@JA16122000
Copy link
Author

sorry your links don't seem to work. Was it the /fps/20 command that helped? did you also need the power/restart command?

This worked:

============================

I've paused automatic updates now, so build:
🚀 DOCKER-WYZE-BRIDGE v2.8.3 ARMV7L DEV BUILD [2024-05-09t15:08:05.461z] fe5d427
is the current build i'm using.

Did your commands only with another port (instead of 5001, i have used: 5000 with succes.)

192.168.178.78:5000/api/voortuin/fps/20
192.168.178.78:5000/api/achtertuin/fps/20
192.168.178.78:5000/api/voortuin/power/reboot
192.168.178.78:5000/api/achtertuin/power/reboot

=============================

But however, after a disconnect or reconnect, it fails.

Is it possible to have above commands, run automatically after each (re)start?
I think that would be the solution.

@JA16122000
Copy link
Author

Today i've upgraded to 2.9.0 and did after the upgrade, above commands.
Auto update is off, so i will look how this is going for now ;)

@mrlt8
Copy link
Owner

mrlt8 commented May 13, 2024

hmm, I believe FORCE_FPS_CAM-NAME=20 should set the FPS on connect, however, it would be great if we could get this back to the way it was in 2.6.x.

@JA16122000
Copy link
Author

JA16122000 commented May 13, 2024

hmm, I believe FORCE_FPS_CAM-NAME=20 should set the FPS on connect, however, it would be great if we could get this back to the way it was in 2.6.x.

So this will be:

FORCE_FPS_VOORTUIN=20
FORCE_FPS_ACHTERTUIN=20

?

I could try this like the old way?

@JA16122000
Copy link
Author

JA16122000 commented May 14, 2024

Using: 2.9.1

I did use force_fps_camname=20 but this is not working @mrlt8 :(
See screenshot

huh

@mrlt8
Copy link
Owner

mrlt8 commented May 14, 2024

I believe the videoParm only gets sent on connection to the camera, so it probably wouldn't update even if you manually changed the fps.

@mrlt8
Copy link
Owner

mrlt8 commented May 18, 2024

is this still an issue with 2.9.2? the dev branch has an updated mediamtx which can do the recording for us.

@JA16122000
Copy link
Author

is this still an issue with 2.9.2? the dev branch has an updated mediamtx which can do the recording for us.

Monitoring every day!
Looks like there is now no issue :D
I'll close this issue and will re-open it, when it's going wrong again ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants