v4l2src lost frames on raspberrypi zero wifi

Dengke Du dengke.du at windriver.com
Thu Oct 11 08:42:40 UTC 2018



On 2018年10月11日 15:46, Antonio Ospite wrote:
> On Thu, 11 Oct 2018 09:53:32 +0800
> Dengke Du <dengke.du at windriver.com> wrote:
>
>> On 2018年10月10日 21:13, Nicolas Dufresne wrote:
> [...]
>>>> 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.
> [...]
>> So using the USB camera on raspberry pi zero wifi was a bad choice.
>>
> As Nicolas already said, try to avoid all the software decoding and
> encoding.
>
> This means:
>
> 1. Instead of MJPEG, use raw video from the webcam, it supports it, this
>     removes the need for jpeg decoding. A pixelformat conversion from
>     YUYV to one accepted by the encoder could still be needed but it
>     should be faster than JPEG decoding. (Check if USB bandwidth becomes
>     a problem, tho).
>
> 2. Instead of x264enc, which is the element which uses the most CPU, try
>     the hardware accelerated alternatives like omxh264enc, and if it is
>     not available on your installation, look up how to install it and
>     configure it (e.g. GPU RAM settings).
>
> The pipeline becomes something like:
>
> test-launch "( v4l2src ! video/x-raw ! queue ! videoconvert ! omxh264enc ! rtph264pay name=pay0 pt=96 )"
>
> Ciao,
>     Antonio
>
root at raspberrypi0-wifi:~# GST_DEBUG=3 test-launch "( v4l2src ! 
video/x-raw ! queue ! videoconvert ! omxh264enc ! rtph264pay name=pay0 
pt=96 )"
stream ready at rtsp://127.0.0.1:8554/test
OMX-Cannot open OpenMAX registry file /home/root/.omxregister
OMX-A Component loader constructor fails. Exiting
0:00:03.376066000   369 0xb5c064c0 ERROR                    omx 
gstomx.c:162:gst_omx_core_acquire: Failed to initialize core 
'/usr/lib/libomxil-bellagio.so.0': 0x80001000
0:00:03.378567000   369 0xb5c064c0 WARN            videoencoder 
gstvideoencoder.c:1627:gst_video_encoder_change_state:<omxh264enc-omxh264enc0> 
error: Failed to open encoder
0:00:03.384602000   369 0xb5c064c0 WARN               rtspmedia 
rtsp-media.c:2970:start_preroll: failed to preroll pipeline
0:00:03.386592000   369 0xb5c064c0 WARN               rtspmedia 
rtsp-media.c:3092:start_prepare: failed to preroll pipeline
0:00:03.388589000   369  0x1b08490 WARN               rtspmedia 
rtsp-media.c:2991:wait_preroll: failed to preroll pipeline
0:00:03.389947000   369  0x1b08490 WARN               rtspmedia 
rtsp-media.c:3295:gst_rtsp_media_prepare: failed to preroll pipeline
0:00:03.399707000   369  0x1b08490 ERROR             rtspclient 
rtsp-client.c:1044:find_media: client 0x1b12088: can't prepare media
0:00:03.410922000   369  0x1b08490 ERROR             rtspclient 
rtsp-client.c:2899:handle_describe_request: client 0x1b12088: no media

Maybe something wrong with "/home/root/.omxregister"?


More information about the gstreamer-devel mailing list