[FFmpeg-user] ffmpeg cpu loading
LianCheng
tanlccc at gmail.com
Fri Nov 12 17:01:14 EET 2021
Hi,
I tried to run several ffmpeg processes with different input mp4 files and
to different outputs within my PC (having Intel Core i7). The mp4 video
resolution is full HD format.
ffmpeg -re -stream_loop -1 -i 1.mp4 -c:v libx264 -preset ultrafast -tune
zerolatency -maxrate 2M -bufsize 2M -r 20 -g 60 -an -c:a copy -f rtsp
rtsp://<ip_addr>:1935/cam-1
ffmpeg -re -stream_loop -1 -i 2.mp4 -c:v libx264 -preset ultrafast -tune
zerolatency -maxrate 2M -bufsize 2M -r 20 -g 60 -an -c:a copy -f rtsp
rtsp://<ip_addr>:1935/cam-2
ffmpeg -re -stream_loop -1 -i 3.mp4 -c:v libx264 -preset ultrafast -tune
zerolatency -maxrate 2M -bufsize 2M -r 20 -g 60 -an -c:a copy -f rtsp
rtsp://<ip_addr>:1935/cam-3
:
:
ffmpeg -re -stream_loop -1 -i N.mp4 -c:v libx264 -preset ultrafast -tune
zerolatency -maxrate 2M -bufsize 2M -r 20 -g 60 -an -c:a copy -f rtsp
rtsp://<ip_addr>:1935/cam-N
If I run 6 of the above ffmpeg processes, the CPU hits 100%.
Are the parameters used optimized? I need to keep the CPU below 80%.
Will having GPU (like nvidia) help to increase the number of ffmpeg
processes that can be run?
More information about the ffmpeg-user
mailing list