<html><body><div style="color:#000; background-color:#fff; font-family:lucida console, sans-serif;font-size:13px"><div id="yui_3_16_0_1_1438784113797_196698">Thanks, reducing the number of threads did the trick!</div><div id="yui_3_16_0_1_1438784113797_196698">So I'm guessing that for each extra thread there can be an additional frame held in memory which causes the memory increase?</div><div style="font-family: lucida console, sans-serif; font-size: 13px;" id="yui_3_16_0_1_1438784113797_196703"><div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;" id="yui_3_16_0_1_1438784113797_196702"><div class="y_msg_container" id="yui_3_16_0_1_1438784113797_196705"><br></div><div class="y_msg_container" id="yui_3_16_0_1_1438784113797_196705">Mike<br>-----Original Message-----<br>From: x264-devel [mailto:<a ymailto="mailto:x264-devel-bounces@videolan.org" href="mailto:x264-devel-bounces@videolan.org">x264-devel-bounces@videolan.org</a>] On Behalf Of BugMaster<br>Sent: 06 August 2015 19:43<br>To: Mailing list for x264 developers <<a ymailto="mailto:x264-devel@videolan.org" href="mailto:x264-devel@videolan.org" id="yui_3_16_0_1_1438784113797_196717">x264-devel@videolan.org</a>><br>Subject: Re: [x264-devel] x264 reducing memory usage<br><br>On Thu, 6 Aug 2015 09:48:42 +0000 (UTC), mike toon wrote:<br>> Hi all,<br><br>> I am developing an rtsp/rtp streaming server for which I am using<br>> x264 with the ffmpeg codec libraries for real time encoding of HD<br>> video. I had tuned the encoder for zero latency, however the<br>> 'sliced-threads' option that this applies was causing an issue for the<br>> client consuming the stream. This option appears to reduce the memory<br>> usage significantly in the region of 50%, any ideas why this should be the case?.<br>> The memory overhead is causing issues for my server especially when<br>> encoding multiple streams and I need to try and reduce this. Are there<br>> any additional tricks that I might be able to employ to reduce the<br>> memory overhead of the x264 encoder?<br><br>> The following shows my current codec settings<br><br>> x264 - core 140 - H.264/MPEG-4 AVC codec - Copyright 2003-2013 -<br>> <a href="http://www.videolan.org/x264.html" target="_blank" id="yui_3_16_0_1_1438784113797_196839">http://www.videolan.org/x264.html </a>- options: cabac=0 ref=1<br>> deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1 psy_rd=1.00:0.00<br>> mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0<br>> deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6<br>> lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0<br>> bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=10<br>> keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=0 rc=cbr<br>> mbtree=0 bitrate=1024 ratetol=1.0 qcomp=0.60 qpmin=1 qpmax=31<br>> qpstep=4 vbv_maxrate=1024 vbv_bufsize=1280 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00.<br><br>> Many thanks,<br><br>> mike<br><br>Memory overhead in frame-based threading is proportional to the number of threads so if you want to lower memory use than lower number of threads. Another memory hog features (like rc-lookahead, sync-lookahead, b-frames and refs) are already at minimum according to your settings.<br id="yui_3_16_0_1_1438784113797_196816"><br>_______________________________________________<br>x264-devel mailing list<br><a ymailto="mailto:x264-devel@videolan.org" href="mailto:x264-devel@videolan.org">x264-devel@videolan.org</a><br><a href="https://mailman.videolan.org/listinfo/x264-devel" target="_blank" id="yui_3_16_0_1_1438784113797_196814">https://mailman.videolan.org/listinfo/x264-devel</a><br><br>______________________________________________________________________<br>This email has been scanned by the Symantec Email Security.cloud service.<br>For more information please visit <a href="http://www.symanteccloud.com/" target="_blank">http://www.symanteccloud.com </a>______________________________________________________________________<br><br><br>Digital Barriers e-Mail Confidentiality and Disclaimer<br><br>This message contains confidential information and is intended only for the individual named. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.<br><br>Digital Barriers plc is a company registered in England and Wales. Registered number: 7149547. Registered office: Cargo Works, 1-2 Hatfields, London SE1 9PG, United Kingdom. For further information about Digital Barriers, please visit http://www.digitalbarriers.com/.<br><br>______________________________________________________________________<br>This email has been scanned by the Symantec Email Security.cloud service.<br>For more information please visit <a href="http://www.symanteccloud.com/" target="_blank">http://www.symanteccloud.com</a><br>______________________________________________________________________<br><br></div> </div> </div>  </div></body></html>