waveform80/pistreaming

(Question) high CPU usage with pistreaming

Closed this issue · 1 comments

ligc commented

I noticed that the pistreaming uses quite a bit CPU(around 70%) on Raspberry PI 3, the majority of the CPU usage is on avconv, any suggestion on how to reduce the CPU usage with pistreaming? I am trying to preserve CPU for further video analysis effort. Thanks.

PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
13718 root      20   0  217464  35556  21256 S  70.8  4.0   1:04.35 avconv
13707 root      20   0  118320  17132   8104 S  11.8  1.9   0:12.03 python3

Sorry, that's pretty much unavoidable. It's because ffmpeg is being used to handle MPEG1 compression on the CPU (as opposed to using the GPU to do H.264 - see the README for all the background on why I originally picked this method). That said, I believe it only pegs one core - you should still have the other three available for processing (and don't worry about the GIL: it's a separate process doing the MPEG1 conversion).