retina icon indicating copy to clipboard operation
retina copied to clipboard

Unexpected error about paring RTP-Info param when parsing `PLAY` response.

Open ZXY595 opened this issue 4 months ago • 3 comments

I am writing a rtsp client using retina, the rtsp stream I want to play can be played correctly by the ffplay cmd. But I got this error:

Retina error: Ok response to PLAY CSeq=4: RTP-Info param has no =\n\nconn: 192.168.1.100:48652(me)->
192.168.1.19:554@2025-08-22T15:04:30.060155727Z\nmsg: 768@2025-08-22T15:04:30.067052744Z"

After reading some the code, let's focus: https://github.com/scottlamb/retina/blob/d1e505570e00ad2a3acf4e88499ce6e1cd20a92e/src/client/parse.rs#L626C2-L630C20 And I print s, it is: s = "url=rtsp://192.168.1.19:554/0/main/trackID=0;seq=0;rtptime=0;" s.split(';')

https://github.com/scottlamb/retina/blob/d1e505570e00ad2a3acf4e88499ce6e1cd20a92e/src/client/parse.rs#L672C8-L675C72 I print the part:

part = "seq=0"
part = "rtptime=0"
part = ""

And the part = "" raise the error: RTP-Info param has no =. Does this implementations is right?

ZXY595 avatar Aug 22 '25 15:08 ZXY595

According to the grammar in RFC 2326 section 12.33, there should not be a trailing ;:

   RTP-Info        = "RTP-Info" ":" 1#stream-url 1*parameter
   stream-url      = "url" "=" url
   parameter       = ";" "seq" "=" 1*DIGIT
                   | ";" "rtptime" "=" 1*DIGIT

...but altering Retina to allow this anyway seems harmless enough.

scottlamb avatar Oct 26 '25 23:10 scottlamb

For the changelog, what camera/rtsp server is this?

scottlamb avatar Oct 26 '25 23:10 scottlamb

For the changelog, what camera/rtsp server is this?

Well, it is the camera from laureii, which runs a RTSP server inside it. And i have solved my problem by use another video protocol, i think this is a problem with the implementation of the RTSP protocol by the camera. Thanks for your reply to this issue :)

ZXY595 avatar Oct 28 '25 07:10 ZXY595