Skip to content

Cannot play rtsp stream #9544

Open
Open

Description

@LupuFlaviu

I've integrated the library in a simple test app where I just want to play a rtsp stream. When I try to play this public rtsp stream (rtsp://demo:demo@ipvmdemo.dyndns.org:5541/onvif-media/media.amp?profile=profile_1_h264&sessiontimeout=60&streamtype=unicast) that uses DIGEST authentication I get a "DESCRIBE 503" error. I've posted some logs below, maybe they are more helpful. Sometimes the stream is played, but most of the times I get the error above. It's very strange.
Using rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov works fine.
Can someone have a look and point out the problem and possible solutions to fix it? Thank you
rtsp-fail.txt

Activity

  1. andrewlewis commented on Oct 8, 2021

    @andrewlewis
    Collaborator

    @claincly Please could you take a look?

  2. claincly commented on Oct 8, 2021

    @claincly
    Contributor

    In general a 5xx error signals some sort of server error.

    But in order to investigate on our end,please provide a log of RTSP messages.

    The easiest way is to use the RtspMediaSource.Factory method setDebugLoggingEnabled()

  3. LupuFlaviu commented on Oct 8, 2021

    @LupuFlaviu
    Author

    I'm keen to think the same, that the server is the problem but I wanted to double check, maybe something is missing/done wrong in the ExoPlayer. Or does someone have other rtsp streams to share? Preferably with authentication.

    I cannot find the setDebugLoggingEnabled() method if I get the dependency from the Google Maven repository. Should I add it as a module of my app? In that case, what branch should I use?

    Also I think for best debugging you can simply try to add "rtsp://demo:demo@ipvmdemo.dyndns.org:5541/onvif-media/media.amp?profile=profile_1_h264&sessiontimeout=60&streamtype=unicast" url to your ExoPlayer sample app and try to play the stream. It should give you the same error. Try a few times as it may be the case it works sometimes :)

  4. claincly commented on Oct 8, 2021

    @claincly
    Contributor

    I'll try the link thanks!

    For future reference, this is how to build exoplayer using that factory method:

         SimpleExoPlayer player =
              new ExoPlayer.Builder(/* context= */ this)
                  .setMediaSourceFactory(new RtspMediaSource.Factory().setDebugLoggingEnabled(true))
                  .build()
    
  5. LupuFlaviu commented on Oct 9, 2021

    @LupuFlaviu
    Author

    Got you the logs that you asked for.
    rtsp-logs-enabled.txt

  6. LupuFlaviu commented on Oct 12, 2021

    @LupuFlaviu
    Author

    @claincly I also found another possible problem. When using Basic authentication, the header is constructed as "Authorization: QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
    Shouldn't it be "Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" as stated here https://en.wikipedia.org/wiki/Basic_access_authentication ?

  7. NicolasGodfather commented on Apr 20, 2022

    @NicolasGodfather

    Should it be: "Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==", why missing word "Basic" ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions