<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr">Le jeu. 11 oct. 2018 04 h 48, Dengke Du <<a href="mailto:dengke.du@windriver.com" target="_blank" rel="noreferrer">dengke.du@windriver.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On 2018年10月11日 15:46, Antonio Ospite wrote:<br>
> On Thu, 11 Oct 2018 09:53:32 +0800<br>
> Dengke Du <<a href="mailto:dengke.du@windriver.com" rel="noreferrer noreferrer" target="_blank">dengke.du@windriver.com</a>> wrote:<br>
><br>
>> On 2018年10月10日 21:13, Nicolas Dufresne wrote:<br>
> [...]<br>
>>>> You are doing capture, software decode, software encode on a single<br>
>>>> thread, on the slowest PI. You should look forward using raw<br>
>>>> capture and omxh264enc, or doing directly encoded capture using<br>
>>>> rpicamsrc.<br>
> [...]<br>
>> So using the USB camera on raspberry pi zero wifi was a bad choice.<br>
>><br>
> As Nicolas already said, try to avoid all the software decoding and<br>
> encoding.<br>
><br>
> This means:<br>
><br>
> 1. Instead of MJPEG, use raw video from the webcam, it supports it, this<br>
> removes the need for jpeg decoding. A pixelformat conversion from<br>
> YUYV to one accepted by the encoder could still be needed but it<br>
> should be faster than JPEG decoding. (Check if USB bandwidth becomes<br>
> a problem, tho).<br>
><br>
> 2. Instead of x264enc, which is the element which uses the most CPU, try<br>
> the hardware accelerated alternatives like omxh264enc, and if it is<br>
> not available on your installation, look up how to install it and<br>
> configure it (e.g. GPU RAM settings).<br>
><br>
> The pipeline becomes something like:<br>
><br>
> test-launch "( v4l2src ! video/x-raw ! queue ! videoconvert ! omxh264enc ! rtph264pay name=pay0 pt=96 )"<br>
><br>
> Ciao,<br>
> Antonio<br>
><br>
root@raspberrypi0-wifi:~# GST_DEBUG=3 test-launch "( v4l2src ! <br>
video/x-raw ! queue ! videoconvert ! omxh264enc ! rtph264pay name=pay0 <br>
pt=96 )"<br>
stream ready at rtsp://<a href="http://127.0.0.1:8554/test" rel="noreferrer noreferrer noreferrer" target="_blank">127.0.0.1:8554/test</a><br>
OMX-Cannot open OpenMAX registry file /home/root/.omxregister<br>
OMX-A Component loader constructor fails. Exiting<br>
0:00:03.376066000 369 0xb5c064c0 ERROR omx <br>
gstomx.c:162:gst_omx_core_acquire: Failed to initialize core <br>
'/usr/lib/libomxil-bellagio.so.0': </blockquote></div></div><div dir="auto"><br></div><div dir="auto">When you build gst-omx, you need to specify the target, since OMX on RPi is incompatible with anything else (all OMX implementation are in fact incompatible with each other).</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">0x80001000<br>
0:00:03.378567000 369 0xb5c064c0 WARN videoencoder <br>
gstvideoencoder.c:1627:gst_video_encoder_change_state:<omxh264enc-omxh264enc0> <br>
error: Failed to open encoder<br>
0:00:03.384602000 369 0xb5c064c0 WARN rtspmedia <br>
rtsp-media.c:2970:start_preroll: failed to preroll pipeline<br>
0:00:03.386592000 369 0xb5c064c0 WARN rtspmedia <br>
rtsp-media.c:3092:start_prepare: failed to preroll pipeline<br>
0:00:03.388589000 369 0x1b08490 WARN rtspmedia <br>
rtsp-media.c:2991:wait_preroll: failed to preroll pipeline<br>
0:00:03.389947000 369 0x1b08490 WARN rtspmedia <br>
rtsp-media.c:3295:gst_rtsp_media_prepare: failed to preroll pipeline<br>
0:00:03.399707000 369 0x1b08490 ERROR rtspclient <br>
rtsp-client.c:1044:find_media: client 0x1b12088: can't prepare media<br>
0:00:03.410922000 369 0x1b08490 ERROR rtspclient <br>
rtsp-client.c:2899:handle_describe_request: client 0x1b12088: no media<br>
<br>
Maybe something wrong with "/home/root/.omxregister"?<br>
</blockquote></div></div></div>