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
[email protected]<mailto:[email protected]>
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 <[email protected]>
Sent: Tuesday, March 10, 2015 04:35 AM
To: LIVE555 Streaming Media - development & use <[email protected]>
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/

_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to