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
SDP Mime Types are not case-insensitive #35
Comments
Please note, the original comment does not handle RTSP streams that have been relayed: In this case, I added it to be the first thing this function checks for. if strings.Contains(value, "MPEG4") {
value = strings.ToLower(value)
} Admittedly, this is not the true solution to this problem. If anything, this should be raised to the FFMPEG developers, or whichever library they currently use that is responsible for this. My only exposure to Go at this point has been through your library; I'd love to make a PR to fix this but I don't quite have the understanding needed to make sure it passes coverage correctly. Where this leaves usThat being said - The information mentioned in the opening comment allows a Windows Media Foundation software (AVPRO in Unity) to correctly decode audio in RTSP streams generated by this library. This happens whenever a server using this would ingest a stream of another format, such as RTMP. The changes noted in this comment allow successful relay of an RTSP stream to the same Media Foundation program, correcting an irregularity in a common stream producer. I'd like to hear your thoughts on this - is "Garbage In, Garbage Out" acceptable, or should there be effort to help with compatibility? |
Hello, since the specification always mentions Please note that this solves the issue only for RTSP streams that have been generated from the ground, for instance RTMP / HLS streams that are converted into RTSP inside rtsp-simple-server, or GStreamer RTP streams that are used in the client-publish example. Regarding relayed RTSP streams, at the moment their SDP is left untouched in rtsp-simple-server, and the best solution consists in editing the software that generates them, but i'm evaluating the possibility of inserting a filter inside the server to fix erroneous SDPs. |
Anyway, this issue doesn't concern gortsplib anymore (it's now a rtsp-simple-server enhancement). |
This issue is being locked automatically because it has been closed for more than 6 months. |
Per findings in RenderHeads/UnityPlugin-AVProVideo#653 , the MIME type in an SDP is not treated as case-insensitive.
Some implementations, such as Media Foundation, have issues with this.
In particular, the "mpeg4-generic" MIME must be lowercase
See here:
https://github.com/aler9/gortsplib/blob/8be64d9cf6ddeee1ec0560ad467724770de928c0/track.go#L152
https://github.com/aler9/gortsplib/blob/8be64d9cf6ddeee1ec0560ad467724770de928c0/track.go#L185
And in your test script
https://github.com/aler9/gortsplib/blob/bd1b88226edb8b088996c522a80b96068d5570ee/track_test.go#L493
https://github.com/aler9/gortsplib/blob/bd1b88226edb8b088996c522a80b96068d5570ee/track_test.go#L522
The text was updated successfully, but these errors were encountered: