Closed t0ny-peng closed 11 months ago
From this issue, it seems I should add -rtsp_transport tcp
to ffprobe
and that does give me the correct info:
$ ffprobe -rtsp_transport tcp rtsp://10.0.0.2:41191/70dfb386e3d5ddce
ffprobe version 6.0 Copyright (c) 2007-2023 the FFmpeg developers
built with Apple clang version 14.0.3 (clang-1403.0.22.14.1)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.0_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
Input #0, rtsp, from 'rtsp://10.0.0.2:41191/70dfb386e3d5ddce':
Metadata:
title : Session streamed by "TP-LINK RTSP Server"
comment : stream2
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuv420p(progressive), 2304x1296, 15 fps, 20 tbr, 90k tbn
Stream #0:1: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
I'm not sure if this is the reason, since ffmpeg -i rtsp://10.0.0.2:41191/70dfb386e3d5ddce -y video.jpg
can still get the stream into picture.
However, updating the go2rtc
config like this doesn't help and generate similar error:
go2rtc:
streams:
Living_Room:
- ffmpeg:rtsp://rtsp:10.0.0.2:41191/70dfb386e3d5ddce#rtsp_transport=tcp
Backyard_1:
- ffmpeg:rtsp://rtsp:10.0.0.2:37379/b3aa516a03a5a8b9#rtsp_transport=tcp
Backyard_2:
- ffmpeg:rtsp://rtsp:10.0.0.2:46179/c87906b1b941a6bc#rtsp_transport=tcp
Front_Door:
- ffmpeg:rtsp://rtsp:10.0.0.2:39735/1cb7b361dabc365f#rtsp_transport=tcp
webrtc:
candidates:
- 10.0.0.2:8555
- stun:8555
2023-12-07 00:55:26.894895208 00:55:26.894 ERR github.com/AlexxIT/go2rtc/cmd/streams/producer.go:53 > error="exec: exit status 1" url=ffmpeg:rtsp://rtsp:10.0.0.2:37379/b3aa516a03a5a8b9#rtsp_transport=tcp
2023-12-07 00:55:26.899330576 00:55:26.899 ERR github.com/AlexxIT/go2rtc/cmd/streams/producer.go:53 > error="exec: exit status 1" url=ffmpeg:rtsp://rtsp:10.0.0.2:39735/1cb7b361dabc365f#rtsp_transport=tcp
2023-12-07 00:55:26.899337483 00:55:26.899 ERR github.com/AlexxIT/go2rtc/cmd/streams/producer.go:53 > error="exec: exit status 1" url=ffmpeg:rtsp://rtsp:10.0.0.2:41191/70dfb386e3d5ddce#rtsp_transport=tcp
2023-12-07 00:55:26.915116143 00:55:26.915 ERR github.com/AlexxIT/go2rtc/cmd/streams/producer.go:53 > error="exec: exit status 1" url=ffmpeg:rtsp://rtsp:10.0.0.2:39735/1cb7b361dabc365f#rtsp_transport=tcp
I believe this has already been fixed and go2rtc just needs to be updated https://docs.frigate.video/configuration/advanced#custom-go2rtc-version
Hi Nick. Thanks for the reply. I downloaded the new go2rtc 1.8.4 and made sure it's used by Frigate. However I'm still seeing the exec: exit status 1
error. IIUC, go2rtc
is doing fork
and exec
ffmpeg
to receive the stream data, and it does not work well with the Scrypted stream. Do you know if there a way to turn on verbose error message? Otherwise, the only error information is the return code 1. Thanks!
Btw, I can use rtsp://10.0.0.2:41191/70dfb386e3d5ddce
in the inputs
of the camera without any problem, but then I cannot use the Frigate lovelace card with go2rtc
provider to get the lowest latency
go2rtc:
streams:
Living_Room:
- rtsp://rtsp:10.0.0.2:41191/70dfb386e3d5ddce#rtsp_transport=tcp
Backyard_1:
- rtsp://rtsp:10.0.0.2:37379/b3aa516a03a5a8b9#rtsp_transport=tcp
Backyard_2:
- rtsp://rtsp:10.0.0.2:46179/c87906b1b941a6bc#rtsp_transport=tcp
Front_Door:
- rtsp://rtsp:10.0.0.2:39735/1cb7b361dabc365f#rtsp_transport=tcp
webrtc:
candidates:
- 10.0.0.2:8555
- stun:8555
you can enable
go2rtc:
log:
exec: trace
to get more info
As I poke around, it seems that go2rtc
does not play well with the rebroadcast Tapo camera streams, while it's perfectly fine with my old Amcrest PoE camera.
Related Frigate error that the go2rtc
server returns 404 for Tapo cameras.
2023-12-08 10:54:38.007822881 [2023-12-08 10:54:38] ffmpeg.Front_Door.record ERROR : [rtsp @ 0x55f4d40ce0c0] method DESCRIBE failed: 404 Not Found
2023-12-08 10:54:38.007876693 [2023-12-08 10:54:38] ffmpeg.Front_Door.record ERROR : rtsp://127.0.0.1:8554/Front_Door: Server returned 404 Not Found
2023-12-08 10:54:38.007932189 [2023-12-08 10:54:38] watchdog.Front_Door INFO : Terminating the existing ffmpeg process...
2023-12-08 10:54:38.007976432 [2023-12-08 10:54:38] watchdog.Front_Door INFO : Waiting for ffmpeg to exit gracefully...
2023-12-08 10:54:38.024870985 10:54:38.024 WRN [rtsp] error="streams: EOF" stream=Front_Door
2023-12-08 10:54:38.051949321 [2023-12-08 10:54:38] ffmpeg.Backyard_1.record ERROR : [rtsp @ 0x55a73b6250c0] method DESCRIBE failed: 404 Not Found
2023-12-08 10:54:38.052036410 [2023-12-08 10:54:38] ffmpeg.Backyard_1.record ERROR : rtsp://127.0.0.1:8554/Backyard_1: Server returned 404 Not Found
2023-12-08 10:54:38.052094202 [2023-12-08 10:54:38] watchdog.Backyard_1 INFO : Terminating the existing ffmpeg process...
2023-12-08 10:54:38.052147494 [2023-12-08 10:54:38] watchdog.Backyard_1 INFO : Waiting for ffmpeg to exit gracefully...
2023-12-08 10:54:38.065552987 10:54:38.065 WRN [rtsp] error="streams: EOF" stream=Backyard_1
2023-12-08 10:54:38.067589785 [2023-12-08 10:54:38] ffmpeg.Living_Room.record ERROR : [rtsp @ 0x55b0a65a30c0] method DESCRIBE failed: 404 Not Found
2023-12-08 10:54:38.067678648 [2023-12-08 10:54:38] ffmpeg.Living_Room.record ERROR : rtsp://127.0.0.1:8554/Living_Room: Server returned 404 Not Found
2023-12-08 10:54:38.067754521 [2023-12-08 10:54:38] watchdog.Living_Room INFO : Terminating the existing ffmpeg process...
2023-12-08 10:54:38.067824259 [2023-12-08 10:54:38] watchdog.Living_Room INFO : Waiting for ffmpeg to exit gracefully...
Related go2rtc
error:
10:55:05.947 ERR github.com/AlexxIT/go2rtc/internal/mjpeg/init.go:166 > error="streams: EOF"
10:55:08.048 WRN [rtsp] error="streams: EOF" stream=Front_Door
10:55:08.092 WRN [rtsp] error="streams: EOF" stream=Backyard_1
The solution I found, though seeming completely unrelated, is to set the RTSP Parser
in the camera stream page to FFmpeg(UDP)
, albeit already said to be the default option.
Closing this ticket now as it's solved.
Describe the problem you are having
I'm using Scrypted as the main "Receiver" of the camera stream, and rebroadcast it to be used by Frigate go2rtc setup, to save bandwidth from the cameras. However,
go2rtc
is not able to use thertsp
stream provided by Scrypted.The rebroadcast RTSP stream URL is
rtsp://10.0.0.2:37379/b3aa516a03a5a8b9
, which can be opened by VLC on my laptop.Version
0.12.1-367d724
Frigate config file
Relevant log output
FFprobe output from your camera
Frigate stats
No response
Operating system
Proxmox
Install method
Docker Compose
Coral version
PCIe
Network connection
Wired
Camera make and model
Tplink C210
Any other information that may be helpful
No response