mercredi 26 août 2015

LIVE555 RTSP Stream on Amazon AWS EC2 Public IP

I've written an application which streams a .h264 file via RTSP using the LIVE555 library. This application is based on the testOnDemandRTSPServer.cpp.

I set up this application on an Amazon AWS EC2 instance having Windows Server 2012 R2 installed.

Problem: The Amazon AWS EC2 instance has two IPs. One private IP and one public IP (http://ift.tt/1d3PQqZ).

The LIVE555 RTSP Stream can only be accessed by the private IP. How can I tell LIVE555 to start the stream on the public IP so I can access it remotely?

//...
char const* streamName = "h264ESVideoTest";
char const* inputFileName = "test.264";
ServerMediaSession* sms
  = ServerMediaSession::createNew(*env, streamName, streamName,
                  'Description...');
sms->addSubsession(H264VideoFileServerMediaSubsession
           ::createNew(*env, inputFileName, false));
rtspServer->addServerMediaSession(sms);
char* url = rtspServer->rtspURL(sms); // Private IP which can't be used remotely!

I already disabled the Amazon AWS EC2 instance's firewall by allowing all traffic on all ports for all protocols.




Aucun commentaire:

Enregistrer un commentaire