[Live-devel] 100% cpu usage when 1 or more client connects to RTSP server
Shaan Nobee
shaan.nobee at mauritiustelecom.com
Mon Mar 9 22:30:05 PDT 2015
Hello Ross,
Thanks for the quick response.
1. Actually it seems that reuseFirstSource variable is not used in the original testOnDemandRTSP for the UDP mpegts example(and in my code too). I left it accidentally when modifying the code. Anyway as you mentioned, it's probably not related to the cpu usage problem but I will double check it.
2. OK thanks for the tip! I'll test the steaming with the .ts file and see if it occurs again.
Thanks!
Shaan
Shaan Nobee
- Corporate Office
Tel: +2302037117 | Mob: +23052518816 | Fax: +2302116996
shaan.nobee at mauritiustelecom.com<mailto:shaan.nobee at mauritiustelecom.com>
www.mauritiustelecom.com<http://www.mauritiustelecom.com/> | www.orange.mu<http://www.orange.mu/> | [Orange on Facebook] <http://www.facebook.com/orangemauritius?ref=hl> | [Orange on Twitter] <http://https//twitter.com/OrangeMauritius>
[Mauritius Telecom]<http://www.mauritiustelecom.com/> [Orange Mauritius] <http://www.orange.mu/>
This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Mauritius Telecom - Orange is not liable for messages that have been modified, changed or falsified.
-------- Original Message --------
From: Ross Finlayson <finlayson at live555.com>
Sent: Tuesday, March 10, 2015 04:35 AM
To: LIVE555 Streaming Media - development & use <live-devel at ns.live555.com>
Subject: Re: [Live-devel] 100% cpu usage when 1 or more client connects to RTSP server
Boolean reuseFirstSource = False;
FYI, because your input source is a live stream, you should change this from “False” to “True”, so that multiple clients can connect to the RTSP server to receive the stream, without the input stream being recreated each time. (This, however, has nothing to do with your 100% CPU problem, which I unfortunately can’t explain; see below.)
I've got nine audio streams that I'm pulling in via ffmpeg and then re-encoding them to AAC-LC and pushing to udp://127.0.0.1:port_num?pkt_size=1316 (where port_num is replaced by respective port number) The first stream is being pushed to port 10000, the second one to 10001, third one to 10002, etc.
Example for first stream:
ffmpeg -i remotestream [...codec options...] -f mpegts udp://127.0.0.1:10000?pkt_size=1316
I've modified testOnDemandRTSPServer.cpp as shown below. (taken from live555-latest.tar.gz downloaded today - 8 March 2015)
I launch my ffmpeg instances & the rtsp server and connect to it via VLC/another rtsp client.
It works, I do hear the audio stream, however the issue is that as soon as one client connects, the RTSP server uses 100% of the CPU.
As soon as the client disconnects, the CPU usage falls back to normal. Any idea of what could be wrong?
Unfortunately not; what you’re doing looks correct. Do you also see this if you have only one input stream, rather than nine?
Another thing you could try, to attempt to figure out what might be wrong:
- Run “ffmpeg” as before, to generate a Transport Stream, but output the result into a *file* (named “test.ts”), rather than UDP packets.
- Then run “testOnDemandRTSPServer”, and try playing the “mpeg2TransportStreamTest” stream. Do you still see 100% CPU utilization even in this case?
Another thing you might check is that your “ffmpeg” command is generating correct PCR timestamps into the Transport Stream.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20150310/491454d2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo-fb.jpg
Type: image/jpeg
Size: 899 bytes
Desc: logo-fb.jpg
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20150310/491454d2/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo-twitter.jpg
Type: image/jpeg
Size: 1046 bytes
Desc: logo-twitter.jpg
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20150310/491454d2/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo-mt.png
Type: image/png
Size: 5883 bytes
Desc: logo-mt.png
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20150310/491454d2/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo.gif
Type: image/gif
Size: 504 bytes
Desc: logo.gif
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20150310/491454d2/attachment.gif>
More information about the live-devel
mailing list