<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 2018年10月10日 21:13, Nicolas Dufresne
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:a4a5ee397db14036f855f1c5b5de5b5aff56ce93.camel@ndufresne.ca">
<pre wrap="">Le mercredi 10 octobre 2018 à 13:53 +0800, Dengke Du a écrit :
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">You are doing capture, software decode, software encode on a single
thread, on the slowest PI. You should look forward using raw
capture and omxh264enc, or doing directly encoded capture using
rpicamsrc.
</pre>
</blockquote>
<pre wrap="">
Thanks, but my device was USB camera, not raspberrypi camera module,
does rpicamsrc working?
</pre>
</blockquote>
<pre wrap="">
Only with Rasperry Pi Camera. Then try the other suggestion, which is
to at try and leverage HW decoder/encoder. I don't know if the Pi Zero
have multiple core, but you can also introduce queues in the pipeline
to distribute the load.
You can also reduce the framerate using "v4l2src ! videorate !
image/jpeg,framerate=5/1" to try and accommodate your small CPU. Just
run "top" on the side, both on your PC and your Pi, you'll see the
massive difference in CPU usage.</pre>
</blockquote>
<br>
I using:<br>
-----------------------------------------------------------------------------------------------------<br>
test-launch "( v4l2src ! videorate ! image/jpeg ! jpegdec !
queue ! x264enc tune=zerolatency ! rtph264pay name=pay0 pt=96 )"<br>
-----------------------------------------------------------------------------------------------------<br>
on Raspberry pi zero wifi<br>
When the client connect to the Raspberry, I use top command show:<br>
-----------------------------------------------------------------------------------------------------<br>
309 root 20 0 102428 34276 9600 S 97.1 9.0 4:56.59
test-launch<br>
-----------------------------------------------------------------------------------------------------<br>
The program exhaust almost the cpu.<br>
-----------------------------------------------------------------------------------------------------<br>
cat /proc/cpuinfo | grep processor<br>
0<br>
-----------------------------------------------------------------------------------------------------<br>
So using the USB camera on raspberry pi zero wifi was a bad choice.<br>
<br>
<blockquote type="cite"
cite="mid:a4a5ee397db14036f855f1c5b5de5b5aff56ce93.camel@ndufresne.ca">
<pre wrap="">
Nicolas
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>