Answer the question
In order to leave comments, you need to log in
How to reduce cpu load with ffmpeg libx264?
There is a simple vps with one core, it is transcoding the stream from rtsp to rtmp. If you drive the stream one to one 1920 * 1080, the processor load is about 2-5%.
ffmpeg
-i rtsp://localhost/$app/$name
-c copy
-f flv rtmp://localhost:1935/show_decode/$name_src
ffmpeg
-i rtsp://localhost/$app/$name
-c:v libx264
-c:a aac
-b:v 1920k
-b:a 128k
-vf "scale=1280:trunc(ow/a/2)*2"
-tune zerolatency
-preset ultrafast
-crf 23
-f flv rtmp://localhost:1935/show_decode/$name_hd720
Answer the question
In order to leave comments, you need to log in
Logically, ffmpeg starts to shovel the video stream. Maybe it's better to take the second 720p stream from the camera to another ffmpeg?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question