[Live-devel] Live555 proxy server set/control streaming fps

2014-08-01 Thread Dnyanesh Gate
Hello,

I am new in live555 development. I am using live555 proxy server for
streaming live and recorded video. I am able to stream recorded video,
but facing an issue with that. I have a 15fps recoreded video file,
but live555 is streaming it with 30fps (VLC stats). VLS show fast
forward video.

I am refering testOnDemandServer.cpp file for streaming video and audio files.
How can I set/control streaming fps. Please help me with controlling
streaming fps.

--
Thanks & Regards,
DnyaneshG.
___
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


[Live-devel] File streaming session getting closed before eof received on client side

2014-08-11 Thread Dnyanesh Gate
Hello All,

I am refering testVideoOnDemand.cpp source for streaming h264 file. I
am able to open stream from vlc player, but rtsp server close session
before EOF receives on client side. I have a raw h264 file of length
30 seconds, but client plays video up to 25 seconds. When I check the
source for ByteStreamFileSource, I found that server close session as
soon as it found feof(), but client is stll receiving frames and
doesn't reached to EOF. For 30 seconds video it skip last 3-4 seconds
of video, but for larger video files, more number of frames will be
skipped, this is my concern. This happens because (read from file FPS)
is greater than (streaming FPS).

How can I get to know that all frames has been sent to client
successfully and then I can call handleClosure()?
What you guys will suggest me to overcome this problem?

Here is link for file I am using for testing:
https://www.dropbox.com/s/qwip5p9ij68fpm3/stream1.h264

--
Thanks & Regards,
DnyaneshG.
___
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


[Live-devel] RTCPInstance error: Hit limit when reading incoming packet over TCP. Increase "maxRTCPPacketSize"

2014-08-20 Thread Dnyanesh Gate
Hello,

I am working on Live555 proxy server. I have one camera connected to
proxy server and able to open its live stream from proxy server in
first attempt.
But as soon as I disconnect client (openRTSP/VLC), proxy server
started giving this error RTCPInstance error: Hit limit when reading
incoming packet over TCP. Increase "maxRTCPPacketSize".
When I checked the last command sent by proxy server was PAUSE
command, but PAUSE command is not supported by my camera, so I change
it to TEARDOWN just for cross check.
But it still give above error on client disconnection. I did also
tried to open live stream
("rtsp://streaming1.osu.edu/media2/ufsap/ufsap.mov") which support
PAUSE command, but still no success. after 2-3 attempts it again
started giving above error.

Can you please suggest me anything on this.
--
Thanks & Regards,
DnyaneshG.
___
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


[Live-devel] RTSP over TLS

2014-09-21 Thread Dnyanesh Gate
Hi,

I am working on special case where UDP is blocked and only outgoing
port 443 is opened. So that RTSP client only able to open RTSP stream
over SSL connection. I can pass socket descriptor of pre established
SSL connection to RTSPClient class, but SSL calls are not implemented
in groupsock to read encrypted packets.

Is there any way to write custom wrapper over groupsock?
Can anybody suggest me on how to add such support with/without making
changes in live555?

--
Thanks & Regards,
DnyaneshG.
___
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


[Live-devel] RTSP URL format for a Swann 806 network camera

2014-10-31 Thread Dnyanesh Gate
Hi,

We do use some swann network cameras for our products.
Did you tried this url rtsp://admin:12345@ip_address/stream1?
We use this url in our player.

--
Thanks & Regards,
DnyaneshG.
___
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


[Live-devel] Proxy server delete ServerMediaSession after all client disconnected.

2015-01-16 Thread Dnyanesh Gate
Hi Ross,
I am using Live555 as a streaming media server and using REGISTER command
feature to access cameras which are behind firewall.
I am able to do that, but our camera doesn't support PAUSE command. Proxy
server is sending PAUSE command when all RTSP clients are disconnected.
I wish to send TEARDOWN command and delete that ServerMediaSession from
proxy server.
I did tried to delete session by using following code snippet

void ProxyServerMediaSubsession::closeStreamSource(FramedSource*
inputSource) {
  if (verbosityLevel() > 0) {
envir() << *this << "::closeStreamSource()\n";
  }
  // Because there's only one input source for this 'subsession'
(regardless of how many downstream clients are proxying it),
  // we don't close the input source here.  (Instead, we wait until *this*
object gets deleted.)
  // However, because (as evidenced by this function having been called) we
no longer have any clients accessing the stream,
  // then we "PAUSE" the downstream proxied stream, until a new client
arrives:
  if (fHaveSetupStream) {
ProxyServerMediaSession* const sms =
(ProxyServerMediaSession*)fParentSession;
ProxyRTSPClient* const proxyRTSPClient = sms->fProxyRTSPClient;
if (proxyRTSPClient->fLastCommandWasPLAY) { // so that we send only one
"PAUSE"; not one for each subsession
//
proxyRTSPClient->sendPauseCommand(fClientMediaSubsession.parentSession(),
NULL, proxyRTSPClient->auth());

proxyRTSPClient->sendTeardownCommand(fClientMediaSubsession.parentSession(),
NULL, proxyRTSPClient->auth());
  proxyRTSPClient->fLastCommandWasPLAY = False;

sms->fOurRTSPServer->deleteServerMediaSession((ProxyServerMediaSession*)sms);
}
  }
}

Sometimes this code work, but sometimes it doesn't.
Can you please suggest me what is the better way to delete
ServerMediaSession when there is no client connected to proxy server for
specific stream?
--
Thanks & Regards,
DnyaneshG.
___
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


[Live-devel] Proxy server multiprocess/multithreaded streaming.

2015-01-22 Thread Dnyanesh Gate
Dear Live555 Team,

I have been using live555 proxy server to stream 1000+ streams. I have
deployed it on quad core Intel Xeon server.
The server is working fine, but Its suffering from serious problem. For 100
streams and connected one client for each stream, one of the core is
getting 100% utilized and other cores remain idle.
So that it couldn't go beyond 100 streams and also degrade its performance.

I had been searching for multiprocess or multi threaded solution on mailing
list. But didn't found anything helpful.
People and FAQ did mentioned that to create TaskScheduler and RTSPClient in
its own process or thread on client side.
But I am not getting how to do it on server side. ProxyServerMediaSession
and ProxyRTSPClient doesn't allow to subclass.

Is it possible to create new process and handle ProxyServerMediaSession and
all its client within that process ?
So that when all client disconnected or camera got disconnected I can close
session and clients and exit from that process.

Can you guys please give me some guide lines on this.

--
Thanks & Regards,
DnyaneshG.
___
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


[Live-devel] Too many open file descriptors.

2015-02-06 Thread Dnyanesh Gate
Hi All,

Somehow I am able to add multi threading support in our server by
subclassing RTSPServer with minor changes in it. Now I am able to handle
more than 200 connections (200 back end and 200 front end streams).

But right now I am facing some other problem. Because our camera's are
behind firewall, we can not access streams over UDP. So that we do it by
RTP over TCP only. When client or camera connects to proxy server over TCP
and starts streaming over TCP, live555 still creates pair of UDP sockets
(for RTP and RTCP) and ofcourse they never get used. This way live555
server open 3 fds per connection. Which eventually after more clients
connected exceeds system "max open files" limit and then stops accepting
new connections.

So if we consider there are 400 connections ( 200 cameras + 200 clients ) *
3 = 1200 file descriptors are open.

I did also tried raising system limits, but then select() call has its own
limits. It breaks if file descriptor exceeds 1024.

Do you have any suggestion on this unnecessary opened sockets?
Is it possible to create UDP sockets only when needed?

--
Thanks & Regards,
DnyaneshG.
___
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


[Live-devel] Too many open file descriptors.

2015-02-06 Thread Dnyanesh Gate
Hi Ross,

For now to fix this issue, I have closed the sockets as soon as they are no
need. This fix my issue, but disable the server's ability to stream over
UDP. This is not concern yet; because we are not using UDP streaming for
now.

Regarding threading support, I did FAQ about threading, But I think single
thread is not well enough to support 1000+ connections at a time. I haven't
added any thread inside library. I have managed this on application server
side and having its own taskScheduler() for each stream. So that
ProxyServerMediaSession and its all clients will be polled in their own
thread. No ProxyServerMediaSession and its RTSPClientConnection interfere
with other, so that concurrency will get maintained.
I hope you are excited to see what I had done to achieve this.

Regarding consulting, I did already conveyed my superiors about this, they
will contact you soon. I am able to get only 400 connections working, but
our requirement is to support 1000+.

--
Thanks & Regards,
DnyaneshG.
___
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


[Live-devel] Memory leak in ProxyServerMediaSession

2015-07-30 Thread Dnyanesh Gate
Hi,

Found a memory leak in class ProxyServerMediaSession. This leak grows with
more number of cameras registered to live555ProxyServer.

class PresentationTimeSessionNormalizer is derived class of Medium. So that
whenever object of class PresentationTimeSessionNormalizer is created, it
creates its new entry in HashTable.
But when ~ProxyServerMediaSession() is called
fPresentationTimeSessionNormalizer object is freed using delete operator
instead of Medium::close(); Because of this its entry is not removed from
HashTable and because HashTable is not empty, unable to reclaim
UsageEnvironment at end.

If live555ProxyServer has only one UsageEnvironment object, then its not an
issue, but if there are multiple UsageEnvironment objects (created when new
stream registered and reclaimed when stream disconnected), then it
generates memory leak per camera stream. This memory leak were causing a
crash in our live555ProxyServer after too many registering and
de-regestering camera streams.

Here is valgrind result (live.2015.07.23.tar.gz
)
1. ProxyServerMediaSession.cpp:134  : delete
fPresentationTimeSessionNormalizer;
==13119== LEAK SUMMARY:
==13119==definitely lost: 1,040 bytes in 1 blocks
==13119==indirectly lost: 171 bytes in 5 blocks

(FIX)
2. ProxyServerMediaSession.cpp:134  :
Medium::close(fPresentationTimeSessionNormalizer);
==12990== LEAK SUMMARY:
==12990==definitely lost: 0 bytes in 0 blocks
==12990==indirectly lost: 0 bytes in 0 blocks

Please check whether this is a valid fix or not.
I hope this fix may help for live555 stability.
--
Thanks & Regards,
DnyaneshG.
___
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel