When started streaming cpu usage for single stream is 1.5% but withing 1
hours it raised to 7.2%
And also see memory used it dramatically increasing.
Kindly need solution for this issue. Why it is happening??
On Tue, Mar 10, 2020 at 3:53 PM Carl Eugen Hoyos <[hidden email]> wrote:
> Am Di., 10. März 2020 um 09:15 Uhr schrieb karthik <[hidden email] > >:
> > But am facing memory consumption issue within 2 hours all RAM memories
> > full and streams are jerking to play.
> > What is the solution for this problem.
> Did you already try to reduce the thread count?
> Carl Eugen
> ffmpeg-user mailing list
> [hidden email] > https://ffmpeg.org/mailman/listinfo/ffmpeg-user >
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
> When started streaming cpu usage for single stream is 1.5%
> but withing 1 hours it raised to 7.2%
> And also see memory used it dramatically increasing.
First things first:
If you want support on this mailing list, find out what top-posting
means and avoid it.
Please test current FFmpeg git head, try to simplify your command
line (is the issue reproducible with testsrc input?) and provide the
simplified command line together with the complete, uncut console
output so we can try to reproduce your issue.
After confirming that the issue is only reproducible with network
input, please test network input with simplified (file) output.
So it starts out like this:
> top - 11:02:19 up 16:48, 3 users, load average: 0.04, 0.01, 0.00
> KiB Mem : 16423264 total, 14990164 free, 642272 used, 790828 buff/cache
> KiB Swap: 999420 total, 999420 free, 0 used. 15408016 avail Mem
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 5979 root 20 0 76104 23360 10300 R 2.2 0.1 0:00.50 ffmpeg
And looks like this in an hour..
> top - 11:59:05 up 17:45, 3 users, load average: 0.82, 0.56, 0.24
> KiB Mem : 16423264 total, 11981684 free, 645936 used, 3795644 buff/cache
> KiB Swap: 999420 total, 999420 free, 0 used. 15363132 avail Mem
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 5979 root 20 0 76104 23360 10300 S 2.0 0.1 1:09.99 ffmpeg
> 6305 root 20 0 49120 4044 3188 R 0.3 0.0 0:00.02 top
> In one hour of duration it used memory is gradually increasing.
> Kindly give us solution for this.
In ~1hr buff/cache used (probably buffers mostly) increased by (3795644-790828)KiB=3004816KiB
So an average of about 900KiB/s
I assume this only happens when streaming with ffmpeg?
It does look like they are closely related if so,
> And console output of the streaming as follows
> root@TESTING-FFMPEG:/var/www/html/hls/live/mobile/testing# ffmpeg -threads
> 1 -i udp://22.214.171.124:1026 -c:v copy -c:a copy -f mpegts
The stream bitrate reaches ~1000kB/s which is similar so it’s probably the disk buffer that’s taking up the memory.
But if you look at the available memory, it only drops from 15408016 KiB to 15363132KiB, about 50MB. If you start another program that requires a lot of memory, that buffer would probably be cleared immediately.
The other situation where you are downloading the stream and starting a dozen transcoding jobs is different, in that case that memory is taken.
What I mean is this doesn’t seem out of the ordinary at all.
Yes, if I use filters and scaling means again it will take lots of
Without any type of trans coding also it taking available memory .
I need to stream Live data, so If I start another streamer again
memory will increases rapidly [For 1 hour it almost taken 50MB of memory ,
so if I run about 6 streams within in a day it will takes lots of memory]
If I Increase memory also anyhow problem will come in any day because
of increasing in memory.
so How to clear used memory buffer information ??
How to solve this issue ?? What I have done wrong any solution for this
> Yes, if I use filters and scaling means again it will take lots of
> Without any type of trans coding also it taking available memory .
> I need to stream Live data, so If I start another streamer again
> memory will increases rapidly [For 1 hour it almost taken 50MB of memory ,
> so if I run about 6 streams within in a day it will takes lots of memory]
> If I Increase memory also anyhow problem will come in any day because
> of increasing in memory.
> so How to clear used memory buffer information ??
> How to solve this issue ?? What I have done wrong any solution for
> this ??
>> ffmpeg-user mailing list
>> [hidden email] >> https://ffmpeg.org/mailman/listinfo/ffmpeg-user >>
>> To unsubscribe, visit link above, or email
>> [hidden email] with subject "unsubscribe".
Il giorno mar 17 mar 2020 alle ore 08:24 Ted Park <[hidden email]>
> So it starts out like this:
> > 5979 root 20 0 76104 23360 10300 R 2.2 0.1 0:00.50 ffmpeg
> And looks like this in an hour..
> > 5979 root 20 0 76104 23360 10300 S 2.0 0.1 1:09.99 ffmpeg
It seems to me that after an hour ffmpeg is still using 23M (within a
virtual space of 76MB)
Your free memory is lower only because maybe some other process has cached
filesystem objects in memory.
To check for a memory leak of ffmpeg look at the memory usage of the
process itself, for instance:
time && ps aux | grep ffmpeg | grep -v grep
...executed periodically on a terminal will be more effective that using
If the memory does not grow with the simple stream copy you used for this
test try to perform the test using your filter chain, I think the problem
if present is in something inside your filters, and it will not trigger for
sure without encoding at all.
Le informazioni contenute nella presente comunicazione e i relativi
allegati possono essere riservate e sono, comunque, destinate
esclusivamente alle persone o alla Società sopraindicati e non sono da
considerarsi comunicazioni personali, quindi eventuali risposte potranno
essere conosciute da persone appartenenti all’azienda. La diffusione,
distribuzione e/o copiatura del documento trasmesso da parte di qualsiasi
soggetto diverso dal destinatario è proibita ai sensi dell’art. 616 c.p. I
dati forniti verranno trattati ai sensi dell'art. 13 del Regolamento UE
2016/679 (normativa sulla privacy). Se ha ricevuto questo messaggio per
errore Ti preghiamo di distruggerlo e di informarci immediatamente
contattandoci mandando una mail a [hidden email] <mailto:[hidden email]>. Copia integrale dell’informativa potrà essere
visionata presso le nostre sedi.
Any information herein included (even
any attachments) shall be considered confidential and/or privileged
material and meant to be only for the abovementioned persons and/or
Company, therefore such communication is intended to be for the addressee
only. Such information is not personal, that is why this e-mail and any
replies may be known exclusively by people belonging to the company. It is
expressively not allowed communicate, disclose and/or copy any
documentation transmitted by a person other than the recipient, according
to the Italian Criminal Code, Section 616 and the Regulation EU 2016/679.
Your provided data are processed in accordance with Regulation EU 2016/679
(Data Protection Law), Section 13. A full copy of the relevant information
notice is available at the company’s registered office upon request. If you
received this in error, please destroy it and inform us immediately by
sending an e-mail to the following e-mail address [hidden email] <mailto:[hidden email]>. A full copy of the relevant information
notice is available at the company’s registered office upon request.
ffmpeg-user mailing list
[hidden email] https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".