-
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
RTSP support #55
Comments
MediaExtractor doesn't support RTSP. You have to make a rtsp-renderer by yourself. |
Can you elaborate? |
+1, Any advancement on this? |
Actually, RTSP is not so popular unlike HLS or Progressive download. It's not worthy to put resource on this. |
Yeah we were looking at talking to ipcams most of which use rtsp. On Thu, 21 May 2015 07:52 Ood Tseng notifications@github.com wrote:
|
There are few open source projects are for rtsp, Need RTSP , SDP , RTP/RTCP parser
|
Right. We have no plans to commit resources to this in the near future. If someone wanted to add a high quality, relatively self contained component that adds support, then we'd happily take that as a pull request. |
I would rather suggest wrapping a well-tested and actively maintained library such as live555 (under LGPL) for this purpose? It includes RTSP, SDP, RTP, RTCP functionality, relevant payload formats as well as support for RTP over RTSP (TCP streaming). Or is there a preference to write all the code in JAVA/are there any other reasons to not go this route? |
We currently also do not have the resources for this, but if we were to undertake the task of wrapping live555 in a JNI layer, would you be willing to support us in integrating the component into exoplayer? |
We would be interested in supporting it if the work was done. On Fri, 3 Jul 2015 09:31 miseri notifications@github.com wrote:
|
A couple of things to keep in mind:
|
Hello i want to do live stream from one external camera. Camera is providing only RTSP stream. I was try to use "ExoPlayer" but its getting failed. Can you please help me out. |
Rtsp doesn't work with exoplayer. On Thu, 11 Feb 2016, 09:30 Anshumansharma12 notifications@github.com
|
I have a project @ http://net7mma.codeplex.com/ which can provide a solution for Rtp and Rtsp playback. The project is Mono / Android compatible and is very CPU and Memory Efficient. There is a RtspServer as well as RtspClient and RtpClient implementations. You can integrate any supported codec which is accessible through MediaCodec or you can implement your own. |
Dear @ojw28, may I ask for your advise on the following: I'm trying to integrate live555 with Exoplayer2 & would like to get the architecture sorted out. Here's the rough structure:
My questions:
|
I'm trying to implement RTSP playback in Exoplayer, using live555.
|
Are you sending the periodic rtsp keepalives? if not, the server will El 7 oct. 2016 9:48 p. m., "dzualeks" notifications@github.com escribió: I'm trying to implement RTSP playback in Exoplayer, using live555.
— |
tresvecesseis, thank you for reply. No, problem not on RTSP server side. It works until 'local server' buffer queue overflows and live555 send TEARDOWN by self.
To avoid situation when 'client' connected to 'wrapper' but freezed by some reason, I'm limit length of buffer queue in wrapper. But I must return to your queston: my live555 wrapper stops working by buffer queue overflow. When >128 buffers with stream data waits in client's queue - wrapper close connection by self. This is what happens when Exoplayer stops receive data from RTSPDataSource. Also, when I dug into ExoPlayer sources, I see that "freeze" occured in ExtractorMediaPeriod class, subclass ExtractingLoadable, load() method. This line of code: loadCondition.block(); When Exoplayer plays MP4 file from disk or from network source - no problem, no freezes 8-O |
I have my own rtsp data source that connect directly to the RTSP server and El 8 oct. 2016 8:42 a. m., "dzualeks" notifications@github.com escribió:
|
tresvecesseis, thank you again. |
Yep, we plan to contribute the RTSP extractor but it´s no generic enough to be useful to others in its current form (we have hardcoded some weird behaviours of our RTSP servers) so we are trying to make the datasource standards compliant before submission. In any case, I will try to strip the propietary bits and have something to show you in the next few days. From: dzualeks notifications@github.com tresvecesseis, thank you again. — |
Would love to help in making the RTSP Extractor more generic. If you have On Sat, 8 Oct 2016 at 18:56 tresvecesseis notifications@github.com wrote:
|
Sorry for silence. I'm stupid. |
Would love to see this impl! On Wed, 12 Oct 2016, 14:23 dzualeks, notifications@github.com wrote:
|
Want to leave here my request for RTSP too! Its a standard that is used by a HUGE amount of cameras on the market. |
would love to know if any progress too! I'm working on a impl of RTSP streaming player with scale/direction control by using Android's Media Player with TextureView, but it just not good enough. |
Ok, sounds good. FYI, you probably know about it already, but the live555 RTSP server (http://www.live555.com/) implements the interleaved mode and has been tested and debugged over many years. It is really solid. I found it to be really useful to test my RTP over RTSP implementation against it. |
@portizb don't sure where to ask. So ask here. |
I saw 2.9.0 was released today, but no mention of RTSP support. Reading through the entire issue exchange here it sounds like there has been some significant progress on its development, though still missing a bit or two. @tresvecesseis or @portizb Would you mind providing any kind of status on this? I'm mid-way through my third project needing low-latency (<300ms) playback, with this latest needing multicast support. The previous ones I've been able to painfully hobble along with GStreamer, but its just not worth the effort on Android and the NDK. I've found a couple of "pure java" alternatives, but I'd love to use my limited, but reliable exoplayer experience here. Likewise, if I can contribute to its maintenance/development, I'm happy to. |
Are there any updates? |
@floschu We are very busy working on other video projects. I hope that soon I can come back here. Thank you all! |
Hi, is ExoPlayer296 support RTSP? on it |
Thank you for this great addition to ExoPlayer. Tried it and it works great! What eventually worked for me was defining a playback speed greater than 1. this results in an almost real-time video stream - amazing! Is this is the correct approach for achieving this result? My biggest problem so far is that the player occasionally freezes for quite a long time (even up to a minute), then the stream continues with a very long delay, which is weird because the buffers were set very low (much lower than the observed delay). How can that be? Thanks! |
Please, can you help to me with example of playing rtsp sream via exoplayer? Just simple example. |
@IgorMan2 ExoPlayer sort of has support for RTSP in the pull request #3854. To playback a rtsp media follow the steps below: Clone the rtsp dev branch: Open Android Studio and open the RTSP ExoPlayer2 project from your local git (dev-v2-rtsp). Run demo app included. Hope you enjoy. |
@portizb please, can you provide any hints on the low latency issue? .. I'm also working to reduce the latency as much as I can. Currently I'm getting values around 1sec and below (I have to do some measurements to get the exact value). First I tried using a default allocator with minimum values such as following:
but I couldn't get times below 1sec with this approach. Now I'm trying to use my own loadControl class. I was wondering if you are using any kind of buffering at RTP level. Reading the code I can see that you use the following to read from the socket:
The MAX_PACKET_SIZE is 65507, so you are reading at most this value. In my case this is more or less the size of a frame. After this you use the RtpSamplesQueue to enqueue the RTP packets, but this queue doesn't seem to have a predefined value. Could this lead to some buffering that could be increasing the streaming latency? This is from one side, on the other side I was reading this article about startup latency in ExoPlayer. It seems that if nothing is done the startup could consume a good amount of time (130 milliseconds as explained by the article author when decoders are reused). In this particular case I understand that the decoder must be prepared during RTSP session negotiation, is this correct? Thank you very much for this great contribution and for your help. |
@rkachach Are you testing with the latest changes on the dev-v2-rtsp branch? Please, you keep follow the pull request #3854 Your doubts are answered on: |
references: google/ExoPlayer#55 google/ExoPlayer#3854 https://github.com/tresvecesseis/ExoPlayer/tree/dev-v2-rtsp * commit = 865ced05b6a1c817d0f2a5f0381b185c4c29bf82 * date = May 22, 2019 summary: * RTSP support has been an open/unresolved issue for years * pull request 3854 includes new libraries to add this functionality - brilliant! - judging by the comments thread, this may be merged very soon * I didn't want to wait - removed dependency for stable library at remote host - added libraries from repo for PR: * core * ui * rtsp * rtp * sdp - replaced Gradle build scripts - migrated dependencies to androidx - removed unit tests - removed javadoc assets * to my surprise, it works really REALLY well - my code still needs a ton of polish * lifecycle: - release all instances of `PlayerView` when closing Activity * revisit sizing of videos in `RecyclerView` - handle config changes * either, explicitly recalc dimensions * or, allow the layout to recalc automatically * remove the playback controls, and respond to touch events * etc.. - nevertheless, this is the first build that was able to successfully show RTSP video streams in a vertical list view * RecyclerView w/ LinearLayoutManager - eventually, this same methodology can be applied to a grid view * RecyclerView w/ GridLayoutManager
Add logging for level shifts.
Does anyone know if widevine DRM works with the current implementation of this RTSP support ? |
http://developer.android.com/guide/appendix/media-formats.html says that RTSP is supported but when trying to access an RTSP stream the MediaExtractor fails.
The text was updated successfully, but these errors were encountered: