-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Shall we play any kind of rtsp url by using this ExoPlayer? #9346
Comments
ExoPlayer should be able to play the URI. Could you try playing the RTSP link with our demo app? Just change any of the URIs in to your URI, and run the demo app. My initial guess: have you set
in your |
Yes @claincly, i have set Somehow we are able to resolve the BTW, i have cloned and run this code and provided my Rtsp Url in the media.exolist.json file. Here the problem comes. My IP Camera streams in the H.264(video) and PCMA-8 bit(audio) formats. Due to the PCMA audio format, we are unable to build tracks and hence no streaming. Logs:
we did not find any PCMA reader to parse g711-alaw (pcma) related RTP packets and extracts individual samples. Or else is there any conversion to convert this pcma into our desired AAC and/or AC3 MimeType? Please suggest the way to overcome this, Thanks in advance!!! |
There are two things here -
ExoPlayer/library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspTrackTiming.java Line 89 in 02f7aaf
For G711, you need to add an |
Hi @claincly, thanks for your tremendous support. ExoPlayer/library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspTrackTiming.java Line 89 in 02f7aaf
After removing this, strange again new issue arrived. Logs for reference:
ExoPlayer/library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMediaPeriod.java Line 516 in 02f7aaf
If we leave about the Audio, playing video is still nightmare for me. Scenario 2 Even we tried with Authentication, rtsp://xxxx:xxxx@192.168.0.13:554/11, Still same Logs:
Could you please let me know how this uri scheme is missing with rtsp:// prefix, may i know we are missing something to form this uri scheme with proper prefix. Really appreciated your support and need your help!!! |
Can you use scenario 1 and comment out line 511-519 of RtspMediaPeriod and see if it plays? |
Hi @claincly, We are able to see live video in player by commenting the line 511-519 of RtspMediaPeriod code. All this happens after customizing the ExoPlayer library App. I have included ExoPlayerLib/2.15.0 in my App and it is not working. So to make it work like this in my App, do i need to make this as library and include in my App or do i need to make changes in the existing calling APIs? My main requirement is to take direct feed into the player with the given RTSP MediaSource. Thank you !!! |
Sorry I don't understand, if you get it work, it's good then. I'm not sure about the part of "include in my app"? I think what you mean is how can you keep using the latest version of ExoPlayer and still keep this change? As an aside, we will be rolling out a patch to support this. |
"include in my app" - means we have developed an app to stream RTSP and we are trying to use ExoPlayer in this to stream RTSP. "I think what you mean is how can you keep using the latest version of ExoPlayer and still keep this change?" - YES, you are correct. I wanted to check if there is a way to use latest ExoPlayer libraries and keep this change, so the stream works. It's great to hear that you are rolling out a patch for this issue, Could you please let me know timeline of the patch release. Thanks a lot for your help @claincly. |
We don't have a rigid timeline for this, but I suspect it'll be out soon. I would think forking ExoPlayer will be the easiest option. And since this is more of a git-usage issue rather than an ExoPlayer issue, I'll close it for now. Feel free to re-open if you have further questions! |
Some server will send partial URIs in the RTP-Info header, while the RTSP spec requires absolute URLs. Issue: #9346 #exofixit PiperOrigin-RevId: 395452741
Some server will send partial URIs in the RTP-Info header, while the RTSP spec requires absolute URLs. Issue: #9346 PiperOrigin-RevId: 395452741
HI Team, I am using this ExoPlayer and try to load and play Rtsp content from different sources. Some of the Rtsp urls are playing properly. But some of the Urls are not playing throwing me "Source error".
If we generate Rtsp url form Rtsp url generator app and/or from other streaming engine portal, it will be working as expected.
But if we generate url from real IP Camera like rtsp://192.168.0.26:554/11, with these kind of urls we are getting Source error and unable to stream.
The same url rtsp://192.168.0.26:554/11 is playing in Android VLC player without fail.
But we want to go with ExoPlayer because it provides extra surface to record the stream, but VLC is not.
Below is the Exception:
ExoPlayerImplInternal: Playback error
ExoPlayerImplInternal: com.google.android.exoplayer2.ExoPlaybackException:
ExoPlayerImplInternal: at com.google.android.exoplayer2.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:624)
ExoPlayerImplInternal: at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:600)
ExoPlayerImplInternal: at android.os.Handler.dispatchMessage(Handler.java:103)
ExoPlayerImplInternal: at android.os.Looper.loop(Looper.java:237)
ExoPlayerImplInternal: at android.os.HandlerThread.run(HandlerThread.java:67)
ExoPlayerImplInternal: Caused by: java.net.ConnectException: failed to connect to /192.168.0.26 (port 5540) from /:: (port 46404): connect failed: ECONNREFUSED (Connection refused)
ExoPlayerImplInternal: at libcore.io.IoBridge.connect(IoBridge.java:143)
ExoPlayerImplInternal: at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142)
ExoPlayerImplInternal: at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390)
ExoPlayerImplInternal: at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
ExoPlayerImplInternal: at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
ExoPlayerImplInternal: at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
ExoPlayerImplInternal: at java.net.Socket.connect(Socket.java:621)
ExoPlayerImplInternal: at java.net.Socket.connect(Socket.java:570)
ExoPlayerImplInternal: at java.net.Socket.(Socket.java:450)
ExoPlayerImplInternal: at java.net.Socket.(Socket.java:218)
ExoPlayerImplInternal: at javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:279)
ExoPlayerImplInternal: at com.google.android.exoplayer2.source.rtsp.RtspClient.getSocket(RtspClient.java:248)
ExoPlayerImplInternal: at com.google.android.exoplayer2.source.rtsp.RtspClient.start(RtspClient.java:157)
ExoPlayerImplInternal: at com.google.android.exoplayer2.source.rtsp.RtspMediaPeriod.prepare(RtspMediaPeriod.java:144)
ExoPlayerImplInternal: at com.google.android.exoplayer2.source.MaskingMediaPeriod.prepare(MaskingMediaPeriod.java:145)
ExoPlayerImplInternal: at com.google.android.exoplayer2.ExoPlayerImplInternal.maybeUpdateLoadingPeriod(ExoPlayerImplInternal.java:1965)
ExoPlayerImplInternal: at com.google.android.exoplayer2.ExoPlayerImplInternal.updatePeriods(ExoPlayerImplInternal.java:1945)
ExoPlayerImplInternal: at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:944)
ExoPlayerImplInternal: at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:482)
ExoPlayerImplInternal: ... 3 more
ExoPlayerImplInternal: Caused by: android.system.ErrnoException: connect failed: ECONNREFUSED (Connection refused)
ExoPlayerImplInternal: at libcore.io.Linux.connect(Native Method)
ExoPlayerImplInternal: at libcore.io.ForwardingOs.connect(ForwardingOs.java:95)
ExoPlayerImplInternal: at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:136)
ExoPlayerImplInternal: at libcore.io.ForwardingOs.connect(ForwardingOs.java:95)
ExoPlayerImplInternal: at libcore.io.IoBridge.connectErrno(IoBridge.java:157)
ExoPlayerImplInternal: at libcore.io.IoBridge.connect(IoBridge.java:135)
Not getting exact reason behind this... is there any problem with the Url or ExoPlayer?
Please help me on this, to understand more on Rtsp with ExoPlayer.
Any help is appreciated...
Thanks in advance
The text was updated successfully, but these errors were encountered: