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

ERROR: unable to open RTSP for listening / Cannot assign requested address #1143

Open
stbuerger opened this issue May 28, 2024 · 4 comments
Open
Labels
question Further information is requested

Comments

@stbuerger
Copy link

Trying to use a RTSP (h.265) camera (Steinel L620) stream in browser with go2rtc-1.9.2 I only get errors on address.
The errors only appear when using a URL of type "ffmpeg:rtsp://MYIP:554/MYPATH" -- whereas "rtsp://MYIP:554/MYPATH" doesn't give errors - but Chrome&FF browser do not support h.265 with WebRTC an therefor I need to use ffmpeg for transcoding to h.264.

with go2rtc.yaml:

streams:
  L620HT: 
    - "ffmpeg:rtsp://192.168.1.63:554/user=admin&password=MYSECRET&channel=1&stream=0.sdp#video=h264#audio=opus"
log:
  level: info
  api: debug
  rtsp: debug
  streams: debug
  webrtc: debug
  exec: debug

running go2rtc and and just using web-ui/"probe" or access "stream" URL results in:

21:42:31.990 INF go2rtc platform=linux/amd64 revision=b2399f3 version=1.9.2
21:42:31.990 INF config path=/home/stefan/go2rtc/go2rtc.yaml
21:42:31.991 INF [rtsp] listen addr=:8554
21:42:31.991 INF [api] listen addr=:1984
21:42:31.991 INF [webrtc] listen addr=:8555/tcp
21:42:59.265 DBG [webrtc] new consumer src=L620HT
21:42:59.267 DBG [exec] run cmd="ffmpeg -hide_banner -v error -allowed_media_types video+audio -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_flags prefer_tcp -i rtsp://192.168.1.63:554/user=admin&password=MYSECRET&channel=1&stream=0.sdp -c:v libx264 -g 50 -profile:v high -level:v 4.1 -preset:v superfast -tune:v zerolatency -pix_fmt:v yuv420p -c:a libopus -application:a lowdelay -min_comp 0 -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://127.0.0.1:8554/802bfa2f1f149eaa99fddbcbc83395c8" url="exec:ffmpeg -hide_banner -v error -allowed_media_types video+audio -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_flags prefer_tcp -i rtsp://192.168.1.63:554/user=admin&password=MYSECRET&channel=1&stream=0.sdp -c:v libx264 -g 50 -profile:v high -level:v 4.1 -preset:v superfast -tune:v zerolatency -pix_fmt:v yuv420p -c:a libopus -application:a lowdelay -min_comp 0 -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://127.0.0.1:8554/802bfa2f1f149eaa99fddbcbc83395c8"
[rtsp @ 0x5572ab117040] Unable to open RTSP for listening
rtsp://192.168.1.63:554/user=admin&password=MYSECRET&channel=1&stream=0.sdp: Cannot assign requested address
21:42:59.352 DBG [webrtc] add consumer error="streams: exec: [rtsp @ 0x5572ab117040] Unable to open RTSP for listening\nrtsp://192.168.1.63:554/user=admin&password=MYSECRET&channel=1&stream=0.sdp: Cannot assign requested address\n"

Interesting other information:
FFPLAY works OK as ..

ffplay -hide_banner -v error -allowed_media_types video+audio -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_flags prefer_tcp -i "rtsp://192.168.1.63:554/user=admin&password=MYSECRET&channel=1&stream=0.sdp"

Any hints what I could be doing wrong here or how I can further debug this.

@AlexxIT AlexxIT added the question Further information is requested label May 29, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented May 29, 2024

FFmpeg 4 not supported

@stbuerger
Copy link
Author

FFmpeg 4 not supported

Sorry - what does that mean - any suggestion for a work around ?

@AlexxIT
Copy link
Owner

AlexxIT commented May 29, 2024

Update ffmpeg version

@stbuerger
Copy link
Author

stbuerger commented May 30, 2024

OK - switched to docker and had success with Chrome, while FF (125.0.3) now - with MSE is OK - but with WEBRTC complains:
webrtc/offer : unable to populate media section, RTPSender created with no codecs.
LOG:
5/30/2024, 1:39:53 PM error undefined error=unable to populate media section, RTPSender created with no codecs caller=github.com/AlexxIT/go2rtc/internal/webrtc/webrtc.go:183
PROBE:

producers	
0	
type	"RTSP passive producer"
url	"rtsp://127.0.0.1:8554/802bfa2f1f149eaa99fddbcbc83395c8"
remote_addr	"127.0.0.1:33822"
user_agent	"ffmpeg/go2rtc"
sdp	"v=0\r\no=- 0 0 IN IP4 127.0.0.1\r\ns=RTSP Session\r\nc=IN IP4 127.0.0.1\r\nt=0 0\r\na=tool:libavformat 60.16.100\r\nm=video 0 RTP/AVP 96\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z2QAKay0A8ARPyzUBAQFAAADAAEAAAMADI8YMqA=,aO8Pyw==; profile-level-id=640029\r\na=control:streamid=0\r\nm=audio 0 RTP/AVP 97\r\nb=AS:64\r\na=rtpmap:97 opus/48000/2\r\na=control:streamid=1\r\n"
medias	
0	"video, recvonly, H.264 High 4.1"
1	"audio, recvonly, OPUS/48000/2"
receivers	
0	"96 H264, bytes=0, senders=1"
1	"97 OPUS/48000/2, bytes=0, senders=1"
consumers	
0	
type	"probe"
remote_addr	"192.168.1.15:39916"
user_agent	"Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0"
medias	
0	"video, sendonly, ALL"
1	"audio, sendonly, ALL"
2	"audio, recvonly, ANY"
senders	
0	"96 H264, bytes=0, receivers=1"
1	"97 OPUS/48000/2, bytes=0, receivers=1"

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

No branches or pull requests

2 participants