<div dir="ltr">imx6 is capable of more than one hardware encoding at the same time...<div><br></div><div><span style="margin:0px;padding:0px;border:0px;font-weight:700;font-size:15px;font-family:"helvetica neue",helvetica,arial,"lucida grande",sans-serif;vertical-align:baseline;color:rgb(0,0,128)"><span style="margin:0px;padding:0px;border:0px;font-weight:inherit;font-style:inherit;font-size:14pt;font-family:inherit;vertical-align:baseline">*</span> There is a limit for the number of pipelines which can be run simultaneously, for high resolution input files, at most two for 1080p and four for 720p.</span><br><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-10-14 9:54 GMT+01:00 Thornton, Keith <span dir="ltr"><<a href="mailto:keith.thornton@zeiss.com" target="_blank">keith.thornton@zeiss.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="DE" link="blue" vlink="purple">
<div class="m_-6917263313859717756WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">Hi, why do you not just encode once and then tee so that you can write to file on one branch and stream using the other branch. Do you need different sizes or framerates,
 or do you just need to puch the second branch through H264parse to recode it from avc to byte-stream<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">Regards<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">Keith<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Von:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> gstreamer-devel [mailto:<a href="mailto:gstreamer-devel-bounces@lists.freedesktop.org" target="_blank">gstreamer-devel-<wbr>bounces@lists.freedesktop.org</a>]
<b>Im Auftrag von </b>??<br>
<b>Gesendet:</b> Donnerstag, 13. Oktober 2016 16:32<br>
<b>An:</b> Discussion of the development of and with GStreamer <<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<wbr>freedesktop.org</a>><br>
<b>Betreff:</b> Re: A question about h264 encoder<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Actually, we need to use both the SW and HW encoder at the same time. And we want the SW encoder for streaming and HW encoder for storage.<u></u><u></u></p>
<div>
<p class="MsoNormal">The SW encoder can have more options and parameters to control and change, especially for a low delay. That's why we want to use SW for real time streaming to client.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">The HW encoder will only be used for on board sd card storage of capture video.<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">2016-10-13 16:17 GMT+02:00 Tonu Jaansoo <<a href="mailto:tonu.jaansoo@gmail.com" target="_blank">tonu.jaansoo@gmail.com</a>>:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<div>
<p class="MsoNormal">Why would you want to NOT use HW encoder, if it is available and working? As it was pointed out, CPU can't handle encoding the stream in realtime from source such as as a camera. (thats why there is HW encoder)<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">Tõnu<u></u><u></u></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On 13 Oct 2016, at 14:58, <span lang="ZH-CN" style="font-family:SimSun">
张若</span> <<a href="mailto:zr92zr@gmail.com" target="_blank">zr92zr@gmail.com</a>> wrote:<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Anyway, thanks!<u></u><u></u></p>
<div>
<p class="MsoNormal">But.. the board has both HW and SW 264 encoder on it. There is no problem to use x264enc.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">The problem is with videorate. If I use videorate and x264enc without setting drop-only as true, there will be problems while streaming. But that works fine without videorate, or works fine with using imxvpuenc_h264 instead.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I don't know why. I think that could be some problems with framerate, either with camera or encoder.<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">2016-10-13 14:26 GMT+02:00 Nuno Mota <<a href="mailto:mundumelga@gmail.com" target="_blank">mundumelga@gmail.com</a>>:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p>It is quite simple.<u></u><u></u></p>
<p>imxvpuenc_h264 uses imx hardware encoder.<br>
x264enc uses the cpu, so It's software encoder. You wont be able to use it on an ARM CPU. Imx just cant handle it.
<u></u><u></u></p>
<p>Check "top" and you will se the cpu load/usage...<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<p class="MsoNormal">On Oct 13, 2016 1:17 PM, "<span lang="ZH-CN" style="font-family:SimSun">张若</span>" <<a href="mailto:zr92zr@gmail.com" target="_blank">zr92zr@gmail.com</a>> wrote:<u></u><u></u></p>
</div>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<div>
<p class="MsoNormal">I found the solution myself. But still not understand the reason thoroughly.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The problem is with the videorate, it needs to be set with drop-only=true, especially for the board. Otherwise, it seems to duplicate several frames and cause a large delay as well. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">But I still don't why does this happen? and why there is no problem while using imxvpuenc_h264?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Hope somebody could explain that!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">2016-10-13 11:32 GMT+02:00 <span lang="ZH-CN" style="font-family:SimSun">
张若</span> <<a href="mailto:zr92zr@gmail.com" target="_blank">zr92zr@gmail.com</a>>:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I am working on the imx6 board. There are two h264/x264 encoder, HW encoder named imxvpuenc_h264 and SW encoder named x264enc. I tried both of them. But problem appears.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The pipeline looks like this: (the video camera capture is 720p)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">imxv4l2videosrc -> capsfilter1 -> videoscale -> videorate -> videoconvert -> capsfilter2 -> imxvpuenc_h264 (or x264enc) -> queue -> h264parse -> mpegtsmux -> rtpmp2tpay -> udpsink<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">While using imxvpuenc_h264, there is no large latency, but using x264enc will cause a really large latency (sometimes around 10s and frame stucks).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">When I set "capsfilter2" to lower resolution such as 320x240, the latency comes much shorter for x264enc. On the other hand, if I remove the "videoscale -> videorate -> videoconvert" part while using x264enc, there almost no latency for
 the streaming.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">For x264enc, I set "tune=zerolatency, key-int-max=32, bframes=0, speed-preset=1, bitrate=4000 (may changes from 1000 to 10000)".<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I don't know the reason why it happens and how can I deal with that. Please help!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks in advance!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><u></u><u></u></p>
</blockquote>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><u></u><u></u></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>

<br>______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><br>
<br></blockquote></div><br></div>