Greetings to all, I hope you can help me with this.
Problem:
I have an RTP stream that I multicast on my private network (WiFi). I would like to use multiple Android tables to display the stream. The number of tablets cannot be limited, and the quality should not deteriorate with an increase in the number of customers. This explains why I need multicast and not unicast.
Approach:
Theoretically, when creating an RTSP or HTTP stream on the server side, I should be able to serve the video for my clients. However, I understand that the server will take a performance hit when too many clients connect at the same time, which I should avoid. Ideally, I would like all clients to just listen to the same multicast. Thus, the number of clients will not affect server performance. [NOTE. The IP address is local and the TTL is set to 0/1, so there is no danger of clogging anything other than my own network using multicast packets.]
Implementation
In order to implement the above approach, I thought of writing a multicast client in Android that receives RTP packets and lines along with the stream. I tried this with a JPEG payload and it works very well. However, the problem with JPEGs is that calling BitmapFactory.decodeByteArray to decode each frame is very expensive (almost 100 ms!), Which greatly limits the frame rate. The network load is also quite high, as JPEG is not a good video streaming protocol.
What I would like to do is to do for the video what I already did for the images, that is, to sew a stream of useful data (for example, MPEG4) from RTP packets and transfer it to "something." Initially, I thought that VideoView would work with a raw input stream, but I was wrong, VV only seems to work with rtsp or http url (right?).
Solution
Now, what are my options? I would like not to configure the RTSP server from the raw RTP stream and serve all the tablets for the above reasons. I looked over 2 days and checked all the solutions proposed on SO and on the network, but nothing seemed to apply to my problem (in most cases it was an RTSP or unicast URL, but I don't think I can use this) so I thought it was time to ask this question.
Any help is much appreciated!
amuses