I'm glad we have a consensus. I'm sorry because my software interface is in Chinese.
I mark the model of the graphics card to express that even flat graphics software can be accelerated by GPU.
But I understand what you mean, the scope you defined is limited to FFMPEG.
Let me talk about my own views, but this is an overview, and the actual situation depends on the software design.
From receiving a stream to writing a file, there are two things that the GPU can handle:
1. Converting the binary data file returned by the stream into data that can be manipulated by the memory is called "decoding".
2. Convert the above data into the specified compression algorithm, that is, the file format,
which usually corresponds to a specific extension, called "encoding".
Of course, in theory, if the compression algorithm format of the stream is the same as that of the stored file,
it may be possible to save the decoding and encoding process, but I am not sure if this is really possible.
Although I have developed a streaming system in the past, it only limited to the integration of FFMPEG, VLC,
Media Server and Helix, etc., without the ability to handle the lower level.
As for the comparison between CPU and GPU, in a strict sense, they are not the same hardware.
The GPU is designed for specific functions, not like the CPU is a general-purpose calculator.
I think of an example. Assuming that a super sports car and a bus are racing together, and the driver is pushing the accelerator to the maximum,
for the purpose of "racing speed", the sports car will win, no doubt.
However, if the "number of people in the car" is in the race,
even if there are people sitting on the roof and hood of the sports car, the sports car is still far behind the bus.
Although both are "cars", they are designed for different purposes.
Just like CPU and GPU are both processors, but they are used for different purposes.
I think there is no doubt about the performance of GPU in specific tasks.
In addition to the examples I mentioned earlier, there are also applications in the blockchain and so on.
In these specific tasks, the performance of GPU seems to be much better than CPU,
you can say, because GPU is designed for these tasks.
Just like a sports car designed to be faster, or a bus designed to carry more people.
As for the hardware acceleration supported by CoApp's built-in FFMPEG is different from the standard version,
I think this is the "lightweight" method of CoApp.
Because the standard FFMPEG can reach 60~100MB, the total capacity of CoApp's FFMPEG plus library files is much smaller!
As you can imagine, the larger the program file, the more space it will take up after being loaded into the memory,
and the more likely it will affect the overall performance.
(Of course, this ruled out obvious problems in programming, which caused its own performance to be very poor)
So I am in favor of the current "custom FFMPEG" such as CoApp,
and even from the fact that the library is independent, I believe CoApp has made its FFMPEG "lightest".
It's just that CoApp is not only FFMPEG, so the system load is the sum of CoApp itself, browser subtasks and FFMPEG.
It is not fair to say that when I enable CUDA, I download 10 streams at the same time, which is almost no burden to the computer.
It is reasonable to estimate that even if 100 streams are downloaded at the same time, the computer will still operate smoothly,
but the network will be blocked.
But this is the price of "convenient interface". Just like the Linux that I use every day,
it can set up a website server only with the hardware required by Windows XP without starting Windows.
But the annoying thing about Linux is that it has to remember a lot of commands.
So for me, Linux and Windows do their jobs, as do sports cars and buses. Of course, the same is true for CPUs and GPUs.
Wild Willy 在 2021年9月30日 星期四上午4:39:39 [UTC+8] 的信中寫道: