<div dir="ltr">Hi Yiran Li,<br><br>We found such memory issues for 32-bit builds even with 4K content. It is very natural for a 32 bit build to fail for high resolution videos. We have a bitbucket issue pointing to this (<a href="https://bitbucket.org/multicoreware/x265/issues/310/memory-error-crash-in-32-bit-compiler-for">https://bitbucket.org/multicoreware/x265/issues/310/memory-error-crash-in-32-bit-compiler-for</a>). <br><br>Thanks,<div>Santhoshini</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 6, 2017 at 9:42 AM, YIRAN LI <span dir="ltr"><<a href="mailto:mrfun.china@gmail.com" target="_blank">mrfun.china@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">Hi Pradeep,</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">I'm now using x265.exe to reproduce this issue and yes I was able to reproduce it.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">The thing is, x265.exe only accepts .yuv or y4m which store uncompressed data so even only 1 second long clip takes more than 1 GB so I can't upload them.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">If you want, you can use MSPaint to create a 8K jpg, then use ffmpeg command to create a 1 second clip, here is the command line:</div><div class="gmail_default"><font face="georgia, serif" color="#cc0000"><i> ffmpeg.exe -framerate 30 -loop 1 -i 0001.jpg -t 1 -pix_fmt yuv420p a.y4m</i></font><br></div><div class="gmail_default"><font face="georgia, serif" color="#cc0000"><i><br></i></font></div><div class="gmail_default"><font color="#000000" face="georgia, serif">Once created, you can use x265.exe to convert it:</font></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><br></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">$ x265.exe --input a.y4m -o a.mp4</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">y4m [info]: 8192x4096 fps 30/1 i420p8 sar 1:1 frames 0 - 29 of 30</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">raw [info]: output file: a.mp4</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: HEVC encoder version 2.3</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: build info [Windows][GCC 5.4.0][32 bit] 8bit</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: Main profile, Level-6 (Main tier)</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: Thread pool created using 4 threads</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: Slices : 1</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: frame threads / pool features : 2 / wpp(64 rows)</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: Coding QT: max CU size, min CU size : 64 / 8</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 2</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: Keyframe min / max / scenecut / bias: 25 / 250 / 40 / 5.00</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: References / ref-limit cu / depth : 3 / on / on</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: AQ: mode / str / qg-size / cu-tree : 1 / 1.0 / 32 / 1</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: Rate Control / qCompress : CRF-28.0 / 0.60</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: tools: rd=3 psy-rd=2.00 rskip signhide tmvp strong-intra-smoothing</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [info]: tools: lslices=8 deblock sao</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font face="georgia, serif"><div class="gmail_default"><font color="#000000">x265 [error]: </font><font color="#ff0000">malloc of size 37871616 failed</font></div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">x265 [error]: memory allocation failure, aborting encode</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default"><br></div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">encoded 0 frames</div></font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font color="#000000" face="georgia, serif"><div class="gmail_default">aborted at input frame 15, output frame 0</div><div class="gmail_default"><br></div></font></div></blockquote></blockquote><font color="#000000" face="georgia, serif"><div class="gmail_default" style="font-family:georgia,serif;display:inline">I've tried almost all possible options:</div></font><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><i><font color="#cc0000">x265.exe --input <div class="gmail_default" style="font-family:georgia,serif;display:inline">a</div>.y4m -F 1 --lookahead-threads 1 --rc-lookahead 0 --bframes 0 --no-b-pyramid --ref 1 -o a.mp4</font></i></div><div><i><font color="#cc0000"><br></font></i></div></blockquote></blockquote><font color="#000000">I<div class="gmail_default" style="font-family:georgia,serif;display:inline">'m not familiar with these parameters, could you tell me what possible problems/disadvantages will the generated file have by</div></font><div><font color="#000000"><div class="gmail_default" style="font-family:georgia,serif;display:inline">setting ref = 1, bframe = 0?</div></font></div><div><font color="#000000"><div class="gmail_default" style="font-family:georgia,serif;display:inline"><br></div></font></div><div><font color="#000000"><div class="gmail_default" style="font-family:georgia,serif;display:inline">Great thanks</div></font></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-04-06 13:35 GMT+10:00 Pradeep Ramachandran <span dir="ltr"><<a href="mailto:pradeep@multicorewareinc.com" target="_blank">pradeep@multicorewareinc.com</a>></span><wbr>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">In general, I would recommend against a 32-bit build due to the fact that several of our assembly optimizations (10-bit and 12-bit, in particular) work only for 64-bit which would considerably restrict your encoding speed. This is especially true for 8K where there is so many bits to deal with!<div><br></div><div>If you can share with us the command-line that you are trying, along with a sample clip, we can try to reproduce the failure from our side.</div></div><div class="gmail_extra"><br clear="all"><div><div class="m_-926689753616688820m_5131502292526099836gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Pradeep Ramachandran, PhD<div>Solution Architect at <a href="http://www.multicorewareinc.com/" style="font-size:12.8px" target="_blank">www.multicorewareinc.com/</a></div><div>Adjunct Faculty at<a href="http://www.cse.iitm.ac.in" target="_blank"> www.cse.iitm.ac.in</a>/</div><div><a href="http://pradeeprama.info/" style="font-size:12.8px" target="_blank">pradeeprama.info/</a><br></div><div><span style="font-size:12.8px">Ph: <a href="tel:+91%2099627%2082018" value="+919962782018" target="_blank">+91 99627 82018</a></span><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote"><div><div class="m_-926689753616688820h5">On Thu, Apr 6, 2017 at 6:22 AM, YIRAN LI <span dir="ltr"><<a href="mailto:mrfun.china@gmail.com" target="_blank">mrfun.china@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-926689753616688820h5"><div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">Hi guys,</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">I'm writing a program which can encode video using X265 API. It's a 32 bit program.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">When the program runs to encode a 8K video, I can see every time encoder_encode is called, the program eats about 100MB so that after 12 frames are sent to encoder and when encoder_encode is called for another frame, encoder_encode returns failure. (at this time, about 1.5GB in total is consumed by the encoder).</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">I guess it's caused by memory limit so compiled everything to 64bit, this time everything went well and I could see maximum memory consumption is about 6GB.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">But I still need to fix the problem on 32bit because a lot of customers use 32 bit version. Just want to know, is there any option, to make encoder hold less frames or what ever option that can make encoder consume less memory?</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">Thanks for suggestion.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif"><br></div></div>
<br></div></div>______________________________<wbr>_________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/l<wbr>istinfo/x265-devel</a><br>
<br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/l<wbr>istinfo/x265-devel</a><br>
<br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/<wbr>listinfo/x265-devel</a><br>
<br></blockquote></div><br></div>