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

Fix send audio to RTSP (cuts out after 30 seconds) #659

Open
aneisch opened this issue Sep 30, 2023 · 6 comments
Open

Fix send audio to RTSP (cuts out after 30 seconds) #659

aneisch opened this issue Sep 30, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@aneisch
Copy link

aneisch commented Sep 30, 2023

Trying to determine if this is an Amcrest AD410 issue or something I need to tweak with my config. If I play an audio file through Go2rtc to my AD410 it plays fine for ~30 seconds and then stops. It looks like the teardown at 2023-09-29 20:05:49.866056059 might be requested by the camera?

This same issue does not appear during a normal 2-way audio session between the camera and a mobile device.

2023-09-29 20:05:19.707760372  20:05:19.707 TRC [api] POST /api/streams?dst=front_door_twoway&src=ffmpeg:http://10.0.1.22:8123/media/audio/audio.mp3?authSig%3DeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkN2RhM2I0YWMzM2Q0MjNkYWJlNGUxOWZmNThjYzc5MyIsInBhdGgiOiIvbWVkaWEvYXVkaW8vc3Bvb2t5Lm1wMyIsInBhcmFtcyI6W10sImlhdCI6MTY5NjAzNTkxOSwiZXhwIjoxNjk2MTIyMzE5fQ.R7LV8bp9R9Qt3FfbAvfqOOgeZTbHnaNK6ZHSJTyX6cg%23audio%3Dpcma%23input%3Dfile 172.18.0.1:55504
2023-09-29 20:05:19.710969963  20:05:19.710 TRC [rtsp] client request:
2023-09-29 20:05:19.710981140  DESCRIBE rtsp://10.0.0.34:554/cam/realmonitor?channel=1&subtype=1 RTSP/1.0
2023-09-29 20:05:19.710985745  Accept: application/sdp
2023-09-29 20:05:19.710991139  Require: www.onvif.org/ver20/backchannel
2023-09-29 20:05:19.710995662  User-Agent: go2rtc/1.7.1
2023-09-29 20:05:19.710999822  CSeq: 1
2023-09-29 20:05:19.711003802  
2023-09-29 20:05:19.711007709  
2023-09-29 20:05:19.721004201  20:05:19.720 TRC [rtsp] client response:
2023-09-29 20:05:19.721013402  RTSP/1.0 401 Unauthorized
2023-09-29 20:05:19.721017738  Cseq: 1
2023-09-29 20:05:19.721024382  Www-Authenticate: Digest realm="Login to Z17AF015CB543", nonce="446ffe0f1003167b9fbf501c4cd86ea3"
2023-09-29 20:05:19.721028952  
2023-09-29 20:05:19.721033765  
2023-09-29 20:05:19.721459902  20:05:19.721 TRC [rtsp] client request:
2023-09-29 20:05:19.721468077  DESCRIBE rtsp://10.0.0.34:554/cam/realmonitor?channel=1&subtype=1 RTSP/1.0
2023-09-29 20:05:19.721471179  User-Agent: go2rtc/1.7.1
2023-09-29 20:05:19.721473994  CSeq: 2
2023-09-29 20:05:19.721491168  Authorization: Digest username="admin", realm="Login to Z17AF015CB543", nonce="446ffe0f1003167b9fbf501c4cd86ea3", uri="rtsp://10.0.0.34:554/cam/realmonitor?channel=1&subtype=1", response="fb6fca2eab0c40e5dc9515c0c8310f1b"
2023-09-29 20:05:19.721495821  Accept: application/sdp
2023-09-29 20:05:19.721501021  Require: www.onvif.org/ver20/backchannel
2023-09-29 20:05:19.721505466  
2023-09-29 20:05:19.721508691  
2023-09-29 20:05:19.745004098  20:05:19.744 TRC [rtsp] client response:
2023-09-29 20:05:19.745013754  RTSP/1.0 200 OK
2023-09-29 20:05:19.745019700  Content-Base: rtsp://10.0.0.34:554/cam/realmonitor?channel=1&subtype=1/
2023-09-29 20:05:19.745024751  Cache-Control: must-revalidate
2023-09-29 20:05:19.745029559  Content-Length: 732
2023-09-29 20:05:19.745034459  Content-Type: application/sdp
2023-09-29 20:05:19.745038771  Cseq: 2
2023-09-29 20:05:19.745043238  X-Accept-Dynamic-Rate: 1
2023-09-29 20:05:19.745055758  
2023-09-29 20:05:19.745059881  v=0
2023-09-29 20:05:19.745064613  o=- 2257715149 2257715149 IN IP4 0.0.0.0
2023-09-29 20:05:19.745068805  s=Media Server
2023-09-29 20:05:19.745072702  c=IN IP4 0.0.0.0
2023-09-29 20:05:19.745076725  t=0 0
2023-09-29 20:05:19.745081032  a=control:*
2023-09-29 20:05:19.745085929  a=packetization-supported:DH
2023-09-29 20:05:19.745090665  a=rtppayload-supported:DH
2023-09-29 20:05:19.745094927  a=range:npt=now-
2023-09-29 20:05:19.745099359  a=x-packetization-supported:IV
2023-09-29 20:05:19.745103531  a=x-rtppayload-supported:IV
2023-09-29 20:05:19.745108002  m=video 0 RTP/AVP 96
2023-09-29 20:05:19.745112483  a=control:trackID=0
2023-09-29 20:05:19.745117149  a=framerate:15.000000
2023-09-29 20:05:19.745121554  a=rtpmap:96 H264/90000
2023-09-29 20:05:19.745127720  a=fmtp:96 packetization-mode=1;profile-level-id=42001E;sprop-parameter-sets=Z0IAHukBaCTQgAAB9IAAOqcCAA==,aMqPIAA=
2023-09-29 20:05:19.745132080  a=recvonly
2023-09-29 20:05:19.745136651  m=audio 0 RTP/AVP 97
2023-09-29 20:05:19.745140947  a=control:trackID=1
2023-09-29 20:05:19.745145260  a=rtpmap:97 MPEG4-GENERIC/8000
2023-09-29 20:05:19.745151060  a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1588
2023-09-29 20:05:19.745155144  a=recvonly
2023-09-29 20:05:19.745159489  m=audio 0 RTP/AVP 8
2023-09-29 20:05:19.745163722  a=control:trackID=5
2023-09-29 20:05:19.745167812  a=rtpmap:8 PCMA/8000
2023-09-29 20:05:19.745171816  a=sendonly
2023-09-29 20:05:19.745175581  
2023-09-29 20:05:19.745187206  20:05:19.744 DBG [exec] run url="exec:ffmpeg -hide_banner -re -i http://10.0.1.22:8123/media/audio/audio.mp3?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkN2RhM2I0YWMzM2Q0MjNkYWJlNGUxOWZmNThjYzc5MyIsInBhdGgiOiIvbWVkaWEvYXVkaW8vc3Bvb2t5Lm1wMyIsInBhcmFtcyI6W10sImlhdCI6MTY5NjAzNTkxOSwiZXhwIjoxNjk2MTIyMzE5fQ.R7LV8bp9R9Qt3FfbAvfqOOgeZTbHnaNK6ZHSJTyX6cg -c:a pcm_alaw -ar:a 8000 -ac:a 1 -vn -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp {output}"
2023-09-29 20:05:19.780093275  Input #0, mp3, from 'http://10.0.1.22:8123/media/audio/audio.mp3?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkN2RhM2I0YWMzM2Q0MjNkYWJlNGUxOWZmNThjYzc5MyIsInBhdGgiOiIvbWVkaWEvYXVkaW8vc3Bvb2t5Lm1wMyIsInBhcmFtcyI6W10sImlhdCI6MTY5NjAzNTkxOSwiZXhwIjoxNjk2MTIyMzE5fQ.R7LV8bp9R9Qt3FfbAvfqOOgeZTbHnaNK6ZHSJTyX6cg':
2023-09-29 20:05:19.780268955    Metadata:
2023-09-29 20:05:19.780391473      major_brand     : mp42
2023-09-29 20:05:19.780499662      minor_version   : 0
2023-09-29 20:05:19.780608676      compatible_brands: isommp42
2023-09-29 20:05:19.780717117      encoder         : Lavf56.40.101
2023-09-29 20:05:19.780991852    Duration: 00:02:38.30, start: 0.025057, bitrate: 128 kb/s
2023-09-29 20:05:19.781290782    Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s
2023-09-29 20:05:19.781377742      Metadata:
2023-09-29 20:05:19.781489148        encoder         : Lavc56.60
2023-09-29 20:05:19.781941529  Stream mapping:
2023-09-29 20:05:19.782337078    Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_alaw (native))
2023-09-29 20:05:19.782504002  Press [q] to stop, [?] for help
2023-09-29 20:05:19.791939679  20:05:19.791 TRC [rtsp] server request:
2023-09-29 20:05:19.791948611  OPTIONS rtsp://127.0.0.1:8554/226987b156a19ba2c2e11705093374ec RTSP/1.0
2023-09-29 20:05:19.791953046  User-Agent: ffmpeg/go2rtc
2023-09-29 20:05:19.791956668  Cseq: 1
2023-09-29 20:05:19.791960367  
2023-09-29 20:05:19.791963767  
2023-09-29 20:05:19.791967778  20:05:19.791 TRC [rtsp] server response:
2023-09-29 20:05:19.791971122  RTSP/1.0 200 OK
2023-09-29 20:05:19.791975177  Public: OPTIONS, SETUP, TEARDOWN, DESCRIBE, PLAY, PAUSE, ANNOUNCE, RECORD
2023-09-29 20:05:19.791978530  Cseq: 1
2023-09-29 20:05:19.791982022  
2023-09-29 20:05:19.791985457  
2023-09-29 20:05:19.792657494  20:05:19.792 TRC [rtsp] server request:
2023-09-29 20:05:19.792665006  ANNOUNCE rtsp://127.0.0.1:8554/226987b156a19ba2c2e11705093374ec RTSP/1.0
2023-09-29 20:05:19.792669200  Content-Length: 161
2023-09-29 20:05:19.792673435  Content-Type: application/sdp
2023-09-29 20:05:19.792677361  Cseq: 2
2023-09-29 20:05:19.792681286  User-Agent: ffmpeg/go2rtc
2023-09-29 20:05:19.792684885  
2023-09-29 20:05:19.792688568  v=0
2023-09-29 20:05:19.792692537  o=- 0 0 IN IP4 127.0.0.1
2023-09-29 20:05:19.792696072  s=No Name
2023-09-29 20:05:19.792699984  c=IN IP4 127.0.0.1
2023-09-29 20:05:19.792715224  t=0 0
2023-09-29 20:05:19.792719947  a=tool:libavformat LIBAVFORMAT_VERSION
2023-09-29 20:05:19.792724106  m=audio 0 RTP/AVP 8
2023-09-29 20:05:19.792728076  b=AS:64
2023-09-29 20:05:19.792732211  a=control:streamid=0
2023-09-29 20:05:19.792736013  
2023-09-29 20:05:19.792740643  20:05:19.792 TRC [rtsp] server response:
2023-09-29 20:05:19.792744616  RTSP/1.0 200 OK
2023-09-29 20:05:19.792748051  Cseq: 2
2023-09-29 20:05:19.792751898  
2023-09-29 20:05:19.792755730  
2023-09-29 20:05:19.793472125  20:05:19.793 TRC [rtsp] server request:
2023-09-29 20:05:19.793482588  SETUP rtsp://127.0.0.1:8554/226987b156a19ba2c2e11705093374ec/streamid=0 RTSP/1.0
2023-09-29 20:05:19.793490130  Transport: RTP/AVP/TCP;unicast;interleaved=0-1;mode=record
2023-09-29 20:05:19.793496247  Cseq: 3
2023-09-29 20:05:19.793503662  User-Agent: ffmpeg/go2rtc
2023-09-29 20:05:19.793509232  
2023-09-29 20:05:19.793514772  
2023-09-29 20:05:19.793521532  20:05:19.793 TRC [rtsp] server response:
2023-09-29 20:05:19.793527268  RTSP/1.0 200 OK
2023-09-29 20:05:19.793533956  Transport: RTP/AVP/TCP;unicast;interleaved=0-1
2023-09-29 20:05:19.793539643  Cseq: 3
2023-09-29 20:05:19.793546418  Session: 75056592;timeout=60
2023-09-29 20:05:19.793552185  
2023-09-29 20:05:19.793558043  
2023-09-29 20:05:19.794486525  20:05:19.794 TRC [rtsp] server request:
2023-09-29 20:05:19.794493156  RECORD rtsp://127.0.0.1:8554/226987b156a19ba2c2e11705093374ec RTSP/1.0
2023-09-29 20:05:19.794496729  Session: 75056592
2023-09-29 20:05:19.794500353  Range: npt=0.000-
2023-09-29 20:05:19.794503697  Cseq: 4
2023-09-29 20:05:19.794507435  User-Agent: ffmpeg/go2rtc
2023-09-29 20:05:19.794510612  
2023-09-29 20:05:19.794513760  
2023-09-29 20:05:19.794552593  20:05:19.794 TRC [rtsp] server response:
2023-09-29 20:05:19.794582083  RTSP/1.0 200 OK
2023-09-29 20:05:19.794586402  Cseq: 4
2023-09-29 20:05:19.794591234  Session: 75056592
2023-09-29 20:05:19.794595435  
2023-09-29 20:05:19.794599545  
2023-09-29 20:05:19.794743010  20:05:19.794 DBG [exec] run launch=49.762374ms
2023-09-29 20:05:19.794943810  20:05:19.794 TRC [rtsp] client request:
2023-09-29 20:05:19.794949908  SETUP rtsp://10.0.0.34:554/cam/realmonitor?channel=1&subtype=1/trackID=5 RTSP/1.0
2023-09-29 20:05:19.794954440  Transport: RTP/AVP/TCP;unicast;interleaved=4-5
2023-09-29 20:05:19.794958772  CSeq: 3
2023-09-29 20:05:19.794969134  Authorization: Digest username="admin", realm="Login to Z17AF015CB543", nonce="446ffe0f1003167b9fbf501c4cd86ea3", uri="rtsp://10.0.0.34:554/cam/realmonitor?channel=1&subtype=1/trackID=5", response="02a7a98e26902619eff05505208ee671"
2023-09-29 20:05:19.794973866  
2023-09-29 20:05:19.794977137  
2023-09-29 20:05:19.795408681  Output #0, rtsp, to 'rtsp://127.0.0.1:8554/226987b156a19ba2c2e11705093374ec':
2023-09-29 20:05:19.795413151    Metadata:
2023-09-29 20:05:19.795442135      major_brand     : mp42
2023-09-29 20:05:19.795447838      minor_version   : 0
2023-09-29 20:05:19.795475477      compatible_brands: isommp42
2023-09-29 20:05:19.795481034      encoder         : Lavf59.27.100
2023-09-29 20:05:19.795545799    Stream #0:0: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
2023-09-29 20:05:19.795550122      Metadata:
2023-09-29 20:05:19.795679075        encoder         : Lavc59.37.100 pcm_alaw
2023-09-29 20:05:19.814700631  size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
20:05:19.814 TRC [rtsp] client response:
2023-09-29 20:05:19.814707644  RTSP/1.0 200 OK
2023-09-29 20:05:19.814711177  X-Dynamic-Rate: 1
2023-09-29 20:05:19.814714963  Cseq: 3
2023-09-29 20:05:19.814718933  Session: 5777009920823;timeout=60
2023-09-29 20:05:19.814722715  Transport: RTP/AVP/TCP;unicast;interleaved=10-11;ssrc=354B7136
2023-09-29 20:05:19.814726243  
2023-09-29 20:05:19.814729735  
2023-09-29 20:05:19.815795087  20:05:19.815 TRC [rtsp] client request:
2023-09-29 20:05:19.815801902  PLAY rtsp://10.0.0.34:554/cam/realmonitor?channel=1&subtype=1/ RTSP/1.0
2023-09-29 20:05:19.815805470  CSeq: 4
2023-09-29 20:05:19.815810988  Authorization: Digest username="admin", realm="Login to Z17AF015CB543", nonce="446ffe0f1003167b9fbf501c4cd86ea3", uri="rtsp://10.0.0.34:554/cam/realmonitor?channel=1&subtype=1/", response="66e6cf728383d1233fda47b3eaa5a4d7"
2023-09-29 20:05:19.815814384  Session: 5777009920823
2023-09-29 20:05:19.815817495  
2023-09-29 20:05:19.815820735  
2023-09-29 20:05:19.817259190  20:05:19.817 TRC [api] GET /api/streams?src=front_door_twoway 172.18.0.1:55504
2023-09-29 20:05:19.853882811  20:05:19.853 TRC [rtsp] client response:
2023-09-29 20:05:19.853888751  RTSP/1.0 200 OK
2023-09-29 20:05:19.853890717  Cseq: 4
2023-09-29 20:05:19.853892716  Session: 5777009920823
2023-09-29 20:05:19.853894811  Rtp-Info: url=trackID=5;seq=0;rtptime=0
2023-09-29 20:05:19.853896545  
2023-09-29 20:05:19.853898176  
2023-09-29 20:05:24.049770595  size=N/A time=00:00:00.52 bitrate=N/A speed=1.02x    
size=N/A time=00:00:01.01 bitrate=N/A speed=   1x    
size=N/A time=00:00:01.54 bitrate=N/A speed=1.02x    
size=N/A time=00:00:02.03 bitrate=N/A speed=1.01x    
size=N/A time=00:00:02.53 bitrate=N/A speed=   1x    
size=N/A time=00:00:03.05 bitrate=N/A speed=1.01x    
size=N/A time=00:00:03.55 bitrate=N/A speed=   1x    
size=N/A time=00:00:04.04 bitrate=N/A speed=   1x    
20:05:24.049 TRC [api] GET /api/streams 127.0.0.1:34412
2023-09-29 20:05:41.267118410  size=N/A time=00:00:04.54 bitrate=N/A speed=   1x    
size=N/A time=00:00:05.06 bitrate=N/A speed=   1x    
size=N/A time=00:00:05.56 bitrate=N/A speed=   1x    
size=N/A time=00:00:06.05 bitrate=N/A speed=   1x    
size=N/A time=00:00:06.58 bitrate=N/A speed=   1x    
size=N/A time=00:00:07.07 bitrate=N/A speed=   1x    
size=N/A time=00:00:07.60 bitrate=N/A speed=   1x    
size=N/A time=00:00:08.09 bitrate=N/A speed=   1x    
size=N/A time=00:00:08.61 bitrate=N/A speed=   1x    
size=N/A time=00:00:09.11 bitrate=N/A speed=   1x    
size=N/A time=00:00:09.61 bitrate=N/A speed=   1x    
size=N/A time=00:00:10.10 bitrate=N/A speed=   1x    
size=N/A time=00:00:10.63 bitrate=N/A speed=   1x    
size=N/A time=00:00:11.12 bitrate=N/A speed=   1x    
size=N/A time=00:00:11.62 bitrate=N/A speed=   1x    
size=N/A time=00:00:12.11 bitrate=N/A speed=   1x    
size=N/A time=00:00:12.64 bitrate=N/A speed=   1x    
size=N/A time=00:00:13.13 bitrate=N/A speed=   1x    
size=N/A time=00:00:13.63 bitrate=N/A speed=   1x    
size=N/A time=00:00:14.15 bitrate=N/A speed=   1x    
size=N/A time=00:00:14.65 bitrate=N/A speed=   1x    
size=N/A time=00:00:15.17 bitrate=N/A speed=   1x    
size=N/A time=00:00:15.67 bitrate=N/A speed=   1x    
size=N/A time=00:00:16.16 bitrate=N/A speed=   1x    
size=N/A time=00:00:16.69 bitrate=N/A speed=   1x    
size=N/A time=00:00:17.18 bitrate=N/A speed=   1x    
size=N/A time=00:00:17.68 bitrate=N/A speed=   1x    
size=N/A time=00:00:18.20 bitrate=N/A speed=   1x    
size=N/A time=00:00:18.70 bitrate=N/A speed=   1x    
size=N/A time=00:00:19.19 bitrate=N/A speed=   1x    
size=N/A time=00:00:19.72 bitrate=N/A speed=   1x    
size=N/A time=00:00:20.21 bitrate=N/A speed=   1x    
size=N/A time=00:00:20.74 bitrate=N/A speed=   1x    
size=N/A time=00:00:21.23 bitrate=N/A speed=   1x    
20:05:41.266 TRC [rtsp] client request:
2023-09-29 20:05:41.267134703  OPTIONS rtsp://10.0.0.36:554/cam/realmonitor?channel=1&subtype=1&authbasic=64/ RTSP/1.0
2023-09-29 20:05:41.267137053  CSeq: 6
2023-09-29 20:05:41.267140789  Authorization: Digest username="admin", realm="Login to AA7E03413EEC704C", nonce="b1b041c0-07ab-49be-afea-3294be63b45d", uri="rtsp://10.0.0.36:554/cam/realmonitor?channel=1&subtype=1&authbasic=64/", response="1d4d8f16cf1a875ac4bbbeb5ecd22a22"
2023-09-29 20:05:41.267142831  Session: 2502462725
2023-09-29 20:05:41.267144607  
2023-09-29 20:05:41.267146304  
2023-09-29 20:05:41.276204536  20:05:41.276 TRC [rtsp] client response:
2023-09-29 20:05:41.276210214  RTSP/1.0 200 OK
2023-09-29 20:05:41.276212460  Cseq: 6
2023-09-29 20:05:41.276215723  Public: OPTIONS, DESCRIBE, ANNOUNCE, SETUP, PLAY, PAUSE, TEARDOWN, GET_PARAMETER, SET_PARAMETER, REDIRECT, RECORD
2023-09-29 20:05:41.276217998  Server: Rtsp Server/3.0
2023-09-29 20:05:41.276220221  
2023-09-29 20:05:41.276222169  
2023-09-29 20:05:41.325963468  20:05:41.325 TRC [rtsp] client request:
2023-09-29 20:05:41.325969557  OPTIONS rtsp://10.0.0.36:554/cam/realmonitor?channel=1&subtype=0&authbasic=64/ RTSP/1.0
2023-09-29 20:05:41.325972027  CSeq: 6
2023-09-29 20:05:41.325976555  Authorization: Digest username="admin", realm="Login to AA7E03413EEC704C", nonce="326939fe-5a6f-4792-989e-a877ac1389c0", uri="rtsp://10.0.0.36:554/cam/realmonitor?channel=1&subtype=0&authbasic=64/", response="24019e8d517cef127caf14f9dc409894"
2023-09-29 20:05:41.325978689  Session: 2366455785
2023-09-29 20:05:41.325980738  
2023-09-29 20:05:41.325982791  
2023-09-29 20:05:41.342492671  20:05:41.342 TRC [rtsp] client response:
2023-09-29 20:05:41.342498292  RTSP/1.0 200 OK
2023-09-29 20:05:41.342500753  Cseq: 6
2023-09-29 20:05:41.342504216  Public: OPTIONS, DESCRIBE, ANNOUNCE, SETUP, PLAY, PAUSE, TEARDOWN, GET_PARAMETER, SET_PARAMETER, REDIRECT, RECORD
2023-09-29 20:05:41.342506864  Server: Rtsp Server/3.0
2023-09-29 20:05:41.342509261  
2023-09-29 20:05:41.342511518  
2023-09-29 20:05:46.324091612  size=N/A time=00:00:21.75 bitrate=N/A speed=   1x    
size=N/A time=00:00:22.25 bitrate=N/A speed=   1x    
size=N/A time=00:00:22.75 bitrate=N/A speed=   1x    
size=N/A time=00:00:23.27 bitrate=N/A speed=   1x    
size=N/A time=00:00:23.77 bitrate=N/A speed=   1x    
size=N/A time=00:00:24.26 bitrate=N/A speed=   1x    
size=N/A time=00:00:24.76 bitrate=N/A speed=   1x    
size=N/A time=00:00:25.28 bitrate=N/A speed=   1x    
size=N/A time=00:00:25.80 bitrate=N/A speed=   1x    
size=N/A time=00:00:26.30 bitrate=N/A speed=   1x    
20:05:46.323 TRC [rtsp] server request:
2023-09-29 20:05:46.324098021  OPTIONS rtsp://127.0.0.1:8554/ptz_wifi RTSP/1.0
2023-09-29 20:05:46.324100575  Cseq: 7
2023-09-29 20:05:46.324103165  User-Agent: FFmpeg Frigate/0.13.0-0858859
2023-09-29 20:05:46.324105494  Session: 84717880
2023-09-29 20:05:46.324107635  
2023-09-29 20:05:46.324109689  
2023-09-29 20:05:46.324135172  20:05:46.324 TRC [rtsp] server response:
2023-09-29 20:05:46.324137415  RTSP/1.0 200 OK
2023-09-29 20:05:46.324139292  Cseq: 7
2023-09-29 20:05:46.324141654  Session: 66742341
2023-09-29 20:05:46.324143581  
2023-09-29 20:05:46.324145624  
2023-09-29 20:05:46.324225860  20:05:46.324 TRC [rtsp] server request:
2023-09-29 20:05:46.324228630  OPTIONS rtsp://127.0.0.1:8554/ptz_wifi RTSP/1.0
2023-09-29 20:05:46.324230710  Cseq: 7
2023-09-29 20:05:46.324233308  User-Agent: FFmpeg Frigate/0.13.0-0858859
2023-09-29 20:05:46.324235457  Session: 10038225
2023-09-29 20:05:46.324237701  
2023-09-29 20:05:46.324239640  
2023-09-29 20:05:46.324285420  20:05:46.324 TRC [rtsp] server response:
2023-09-29 20:05:46.324287846  RTSP/1.0 200 OK
2023-09-29 20:05:46.324294029  Cseq: 7
2023-09-29 20:05:46.324296225  Session: 50284842
2023-09-29 20:05:46.324298178  
2023-09-29 20:05:46.324300207  
2023-09-29 20:05:46.349147267  20:05:46.348 TRC [rtsp] server request:
2023-09-29 20:05:46.349156356  OPTIONS rtsp://127.0.0.1:8554/ptz_wifi_sub RTSP/1.0
2023-09-29 20:05:46.349158816  Session: 13558327
2023-09-29 20:05:46.349161033  Cseq: 7
2023-09-29 20:05:46.349163473  User-Agent: FFmpeg Frigate/0.13.0-0858859
2023-09-29 20:05:46.349165508  
2023-09-29 20:05:46.349167535  
2023-09-29 20:05:46.349169995  20:05:46.348 TRC [rtsp] server response:
2023-09-29 20:05:46.349172274  RTSP/1.0 200 OK
2023-09-29 20:05:46.349174361  Session: 19144500
2023-09-29 20:05:46.349176335  Cseq: 7
2023-09-29 20:05:46.349178435  
2023-09-29 20:05:46.349180421  
2023-09-29 20:05:46.349712944  20:05:46.349 TRC [rtsp] server request:
2023-09-29 20:05:46.349717959  OPTIONS rtsp://127.0.0.1:8554/ptz_wifi_sub RTSP/1.0
2023-09-29 20:05:46.349720147  Cseq: 7
2023-09-29 20:05:46.349722688  User-Agent: FFmpeg Frigate/0.13.0-0858859
2023-09-29 20:05:46.349724883  Session: 87477521
2023-09-29 20:05:46.349726933  
2023-09-29 20:05:46.349728991  
2023-09-29 20:05:46.349731579  20:05:46.349 TRC [rtsp] server response:
2023-09-29 20:05:46.349733785  RTSP/1.0 200 OK
2023-09-29 20:05:46.349735739  Cseq: 7
2023-09-29 20:05:46.349737841  Session: 75658700
2023-09-29 20:05:46.349739748  
2023-09-29 20:05:46.349741798  
2023-09-29 20:05:49.866042247  size=N/A time=00:00:26.80 bitrate=N/A speed=   1x    
size=N/A time=00:00:27.32 bitrate=N/A speed=   1x    
size=N/A time=00:00:27.81 bitrate=N/A speed=   1x    
size=N/A time=00:00:28.31 bitrate=N/A speed=   1x    
size=N/A time=00:00:28.81 bitrate=N/A speed=   1x    
size=N/A time=00:00:29.33 bitrate=N/A speed=   1x    
size=N/A time=00:00:29.83 bitrate=N/A speed=   1x    
20:05:49.865 TRC [rtsp] client request:
2023-09-29 20:05:49.866056059  TEARDOWN rtsp://10.0.0.34:554/cam/realmonitor?channel=1&subtype=1/ RTSP/1.0
2023-09-29 20:05:49.866062509  CSeq: 5
2023-09-29 20:05:49.866075189  Authorization: Digest username="admin", realm="Login to Z17AF015CB543", nonce="446ffe0f1003167b9fbf501c4cd86ea3", uri="rtsp://10.0.0.34:554/cam/realmonitor?channel=1&subtype=1/", response="4a54f9473eb7a89c3e8f5d366bc7db52"
2023-09-29 20:05:49.866081169  Session: 5777009920823
2023-09-29 20:05:49.866086510  
2023-09-29 20:05:49.866091536  
2023-09-29 20:05:49.877981907  av_interleaved_write_frame(): Broken pipe
2023-09-29 20:05:49.877993778  size=N/A time=00:00:30.11 bitrate=N/A speed=   1x    
2023-09-29 20:05:49.878002724  video:0kB audio:235kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
2023-09-29 20:05:49.879145534  Conversion failed!
2023-09-29 20:05:49.882631061  20:05:49.882 TRC [exec] close url="exec:ffmpeg -hide_banner -re -i http://10.0.1.22:8123/media/audio/audio.mp3?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkN2RhM2I0YWMzM2Q0MjNkYWJlNGUxOWZmNThjYzc5MyIsInBhdGgiOiIvbWVkaWEvYXVkaW8vc3Bvb2t5Lm1wMyIsInBhcmFtcyI6W10sImlhdCI6MTY5NjAzNTkxOSwiZXhwIjoxNjk2MTIyMzE5fQ.R7LV8bp9R9Qt3FfbAvfqOOgeZTbHnaNK6ZHSJTyX6cg -c:a pcm_alaw -ar:a 8000 -ac:a 1 -vn -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp {output}"
@calisro
Copy link

calisro commented Oct 4, 2023

I'm curious what your config actually looks like for this and how its called?

and AD410 also does this with simple post commands with curl. I would have thought it would have played it via the same method as a 2 way audio call which doesn't seem to cut off. I was also going to look into this so am interested in the answer and your setup.

curl -vvv --user 'admin:xxxxxxxx' \
  --limit-rate 8K \
  --expect100-timeout 18 \
  --connect-timeout 15 \
  --no-keepalive \
  --max-time 20 \
  -F "file=@/config/halloween.al;type=Audio/G.711A" \
  -H "Content-Type: Audio/G.711A" \
  -H "content-length: 9999999" \
  "http://10.100.1.143/cgi-bin/audio.cgi?action=postAudio&httptype=singlepart&channel=1" >> $LOG 2>&1

@aneisch
Copy link
Author

aneisch commented Oct 4, 2023

It's odd that a two-way WebRTC session does not time out.

https://FQDN/live/webrtc/webrtc.html?src=front_door_twoway&media=video+audio+microphone

  streams:
    front_door_twoway:
      - rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1 # Connect to substream for lower bandwidth
      - "ffmpeg:rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0#audio=opus"

@AlexxIT AlexxIT added the bug Something isn't working label Oct 5, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Oct 5, 2023

I can see this 30 sec timeout
https://github.com/AlexxIT/go2rtc/blob/0424b1a92a902011b3b2e113cbfc7a0a172fa52e/pkg/rtsp/conn.go#L119C23-L119C23

Will try to fix it.

@AlexxIT AlexxIT added this to the v1.7.2 milestone Oct 5, 2023
@AlexxIT AlexxIT changed the title Audio file through go2rtc to AD410 cuts out after 30 seconds Fix send audio to RTSP (cuts out after 30 seconds) Oct 11, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Oct 14, 2023

https://github.com/AlexxIT/go2rtc/releases/tag/v1.8.0

@AlexxIT AlexxIT closed this as completed Oct 14, 2023
felipecrs pushed a commit to felipecrs/go2rtc that referenced this issue Oct 20, 2023
@aneisch
Copy link
Author

aneisch commented Oct 23, 2023

Definitely better but seeing cutoff at 60s now. Maybe this is more expected? Not sure what the best way to troubleshoot or provide more info would be.

size=N/A time=00:00:59.06 bitrate=N/A speed=   1x    
size=N/A time=00:00:59.58 bitrate=N/A speed=   1x    
size=N/A time=00:01:00.08 bitrate=N/A speed=   1x    
22:30:15.751 TRC [api] GET /api/streams?src=front_door_twoway 172.18.0.1:46574
2023-10-22 22:30:15.853113286  22:30:15.853 TRC [rtsp] client request:
2023-10-22 22:30:15.853118032  TEARDOWN rtsp://10.0.0.34:554/cam/realmonitor?channel=1&subtype=1/ RTSP/1.0
2023-10-22 22:30:15.853121848  Authorization: Digest username="admin", realm="Login to Z17AF015CB543", nonce="xx", uri="rtsp://10.0.0.34:554/cam/realmonitor?channel=1&subtype=1/", response="xx"
2023-10-22 22:30:15.853123918  Session: 7773310140780
2023-10-22 22:30:15.853125713  CSeq: 5
2023-10-22 22:30:15.853127445  
2023-10-22 22:30:15.853129109  
2023-10-22 22:30:15.860578214  av_interleaved_write_frame(): Broken pipe
2023-10-22 22:30:15.860766313  size=N/A time=00:01:00.26 bitrate=N/A speed=   1x    
2023-10-22 22:30:15.860841077  video:0kB audio:471kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
2023-10-22 22:30:15.862083298  Conversion failed!
2023-10-22 22:30:15.865521123  22:30:15.864 TRC [exec] close url="exec:ffmpeg -hide_banner -re -i http://10.0.1.22:8123/media/audio/600s.mp3?authSig=Xxx -c:a pcm_alaw -ar:a 8000 -ac:a 1 -vn -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp {output}"

@AlexxIT AlexxIT reopened this Oct 23, 2023
@AlexxIT AlexxIT modified the milestones: v1.8.0, v1.8.2 Oct 24, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Oct 30, 2023

Maybe you can provide me access to stream? You can send it in PM
https://github.com/AlexxIT/go2rtc/wiki/Tunnel-RTSP-camera-to-Intenet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants