I'm trying to stream live video from my android phone to a desktop RTSP server on my PC. The streamed video can be played in another device. I'm using H.264 video encoder, so the SDP returned by the server (as the reply of DESCRIBE
request) should contain the profile-level-id
and sprop-parameter-sets
fields.
The Spydroid project shows how to extract these info from a dummy file recorded to SD card by parsing it (from the avcC
block). But I cannot do it like that. In Spydroid, the media recorder and the RTSP server are on the same device, so the server can always record a test file with the same configuration as the recorder before streaming. But I'm streaming the video directly from the phone to the remote server as an RTP stream.
So my question is:
- How can I provide these values to the server maintaining the protocols?
- Is there any way to find out these two fields from the RTP stream?
Edit:
I'm using android phones to generate the streams, but the server can receive RTP stream from any source. So, is there any generic way to get these values?