v4l2src lost frames on raspberrypi zero wifi

Dengke Du dengke.du at windriver.com
Thu Oct 11 01:53:32 UTC 2018



On 2018年10月10日 21:13, Nicolas Dufresne wrote:
> Le mercredi 10 octobre 2018 à 13:53 +0800, Dengke Du a écrit :
>>> 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.
>>   
>> Thanks, but my device was USB camera, not raspberrypi camera module,
>> does rpicamsrc working?
> 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.

I using:
-----------------------------------------------------------------------------------------------------
     test-launch "( v4l2src ! videorate ! image/jpeg ! jpegdec ! queue ! 
x264enc tune=zerolatency ! rtph264pay name=pay0 pt=96 )"
-----------------------------------------------------------------------------------------------------
on Raspberry pi zero wifi
When the client connect to the Raspberry, I use top command show:
-----------------------------------------------------------------------------------------------------
   309 root      20   0  102428  34276   9600 S  97.1   9.0   4:56.59 
test-launch
-----------------------------------------------------------------------------------------------------
The program exhaust almost the cpu.
-----------------------------------------------------------------------------------------------------
cat /proc/cpuinfo | grep processor
0
-----------------------------------------------------------------------------------------------------
So using the USB camera on raspberry pi zero wifi was a bad choice.

>
> Nicolas
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20181011/f423eef9/attachment-0001.html>


More information about the gstreamer-devel mailing list