Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

rtsp source ERR: Content-Length exceeds 4096 #136

Closed
zhaibin18 opened this issue Nov 27, 2020 · 9 comments
Closed

rtsp source ERR: Content-Length exceeds 4096 #136

zhaibin18 opened this issue Nov 27, 2020 · 9 comments
Labels
bug Something isn't working

Comments

@zhaibin18
Copy link

Which version are you using?

v0.12.1

Which operating system are you using?

Linux

Describe the problem

2020/11/27 13:36:54 [0/0/0] rtsp-simple-server v0.12.1
2020/11/27 13:36:54 [0/0/0] [UDP/RTP server] opened on :8002
2020/11/27 13:36:54 [0/0/0] [UDP/RTCP server] opened on :8003
2020/11/27 13:36:54 [0/0/0] [TCP server] opened on :8554
2020/11/27 13:36:54 [0/0/0] [path tv01] rtsp source started
2020/11/27 13:36:54 [0/0/0] [path tv01] connecting to rtsp source
2020/11/27 13:36:54 [0/0/0] [path tv01] rtsp source ERR: Content-Length exceeds 4096

Did you attach a network dump?

yes
4k_rtsp.zip

@aler9
Copy link
Member

aler9 commented Nov 27, 2020

Hello, thanks for reporting the issue, the maximum length of content of RTSP requests/responses has been increased from 4k to 128k - the fix will be included in the next release.
Meanwhile, you can use this nightly release

(removed)

@zhaibin18
Copy link
Author

thanks!there is no error about ‘Content-Length exceeds 4096’ but with error
’rtsp source ERR: sdp: invalid syntax b=RS:0 (b=RS:0)‘
rtsp_4k_02.zip

aler9 added a commit to bluenviron/gortsplib that referenced this issue Nov 28, 2020
aler9 added a commit that referenced this issue Nov 28, 2020
@aler9
Copy link
Member

aler9 commented Nov 28, 2020

Hello, your SDP is now supported, please try this nightly release

(removed)

@zhaibin18
Copy link
Author

there is another error:
2020/12/01 08:44:35 [0/0/0] rtsp-simple-server v0.12.2-4-g716e2ed
2020/12/01 08:44:35 [0/0/0] [UDP/RTP server] opened on :8002
2020/12/01 08:44:35 [0/0/0] [UDP/RTCP server] opened on :8003
2020/12/01 08:44:35 [0/0/0] [TCP server] opened on :8554
2020/12/01 08:44:35 [0/0/0] [path tv01] rtsp source started
2020/12/01 08:44:35 [0/0/0] [path tv01] connecting to rtsp source
2020/12/01 08:44:35 [0/0/0] [path tv01] rtsp source ERR: transport header: invalid ports (8052)
2020/12/01 08:44:40 [0/0/0] [path tv01] connecting to rtsp source
2020/12/01 08:44:40 [0/0/0] [path tv01] rtsp source ERR: transport header: invalid ports (8052)
rtsp_4k_03.zip

@aler9
Copy link
Member

aler9 commented Dec 6, 2020

@zhaibin18 i've fixed that too :)
rtsp-simple-server and the underlying libraries gortsplib and pion/sdp are implemented by following the official RFC specifications, it seems like your TV (is it a TV?) is using a highly irregular syntax. Never mind. Let's see if this is the final fix or more are required.

(removed)

@zhaibin18
Copy link
Author

@aler9 many thank for your update,the input is IPTV from my ISP, I use the latest build and there are still errors:
2020/12/07 11:58:32 [0/0/0] rtsp-simple-server v0.12.2-18-ga6c06d3
2020/12/07 11:58:32 [0/0/0] [UDP/RTP server] opened on :8002
2020/12/07 11:58:32 [0/0/0] [UDP/RTCP server] opened on :8003
2020/12/07 11:58:32 [0/0/0] [TCP server] opened on :8554
2020/12/07 11:58:32 [0/0/0] [path tv01] rtsp source started
2020/12/07 11:58:32 [0/0/0] [path tv01] connecting to rtsp source
2020/12/07 11:58:32 [0/0/0] [path tv01] rtsp source ERR: bad status code: 405 (Method Not Allowed)
rtst_4k_04.zip

@aler9
Copy link
Member

aler9 commented Dec 7, 2020

Hello, the client (rtsp-simple-server) is able to correctly setup the stream, but when it calls PLAY, the server (IPTV) suddenly replies with 405.

Here's what happens:

[client] DESCRIBE rtsp://61.135.88.174:554/PLTV/88888892/224/3221225968/10000100000000060000000000157831_0.smil?playseek=20201206090000-20201206100000 RTSP/1.0
[server] the stream has been moved to rtsp://61.135.88.174:554/refuse/unavailable_media.wmv
[client] DESCRIBE rtsp://61.135.88.174:554/refuse/unavailable_media.wmv
[server] ok, the path contains two tracks, one video, one application
[client] SETUP video
[server] ok
[client] SETUP application
[server] ok
[client] PLAY rtsp://61.135.88.174:554/refuse/unavailable_media.wmv
[server] 405 not allowed

Therefore, i have two hypothesis (which i can't verify since i don't have access to your IPTV):

  • since the server redirects the client to a path that ends with "refuse/unavailable_media.wmv", it means that the stream is not available at the moment or the client did a wrong setup
  • the client tries to setup both a video track and an application track, which contains a proprietary protocol; maybe it shouldn't setup the application track

Does the stream work with VLC? if this is the case, try attaching a network dump of 30 seconds of communication between the IPTV and VLC. Thanks

@zhaibin18
Copy link
Author

maybe something wrong with the ISP,I can not play the video from VLC, So please close the issue.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 1, 2023

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 1, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants