1

I would like to do a performance comparison between Ffmpeg and Intel Media SDK in transcoding.

I have to write a new application that will do the following.

  1. Receive frames from MJPEG, MPEG4 and H264 cameras.

  2. Transcode the frames. Output will be h264. Here I have to either use Ffmpeg or Intel Media SDK.

  3. Multicast transcoded frames as RTSP streaming.

I have noticed that both these libs are CPU intensive. Is there any settings in Ffmpeg can reduce the CPU usage?

Thanks in advance,

  • To get the best performance, you may use dedicated hardware, which may be quite expensive. More modest approach is to employ generic GPU, e.g. via OpenCL. Unfortunately, I cannot point to a production-quality library that answers your requirements, and by no means can such transcoder fit into the strict format of SO answer. – Alex Cohn Jan 04 '17 at 18:16

1 Answers1

0

As with all media encoding, you will trade speed for quality. x264 (ffmpeg) will produce higher quality (or smaller files at the same quality) but will use more CPU. Intel Media SDK should use very little CPU, but the quality will be a bit less. It accomplishes this by using specialized hardware on the CPU, if your CPU supports it.

So, what is best? It depends on want you want to optimize for CPU, Power usage, Quality, or file size.

szatmary
  • 29,969
  • 8
  • 44
  • 57
  • Hi Szatmary, Thanks very much for the answer. I have tested both these and observed that, both are almost using same cpu. In the case of Ffmpeg, for each process, it takes 15% of CPU and it is linear (each process takes 15%). Intel Media SDK, it has taken 20% for first one, 15% for second, 10% for 3rd like that (it reduces when I increase the Cameras). Do you know what is the reason for that. Also is there any commandline option at Ffmpeg to control the CPU usage? – OrionSoftTechnologiesSydney Dec 04 '13 at 06:43
  • There are many many command line options. (https://trac.ffmpeg.org/wiki/x264EncodingGuide) – szatmary Dec 04 '13 at 06:57
  • Hi szatmary, I have one doubt in the same line. Can Intel media SDK transcode mpeg4 live camera stream to h264 stream? – OrionSoftTechnologiesSydney Dec 10 '13 at 01:40
  • @user3044783 I do not know if it can decode mpeg4. But it if can not, you can always decode in software then encode AVC in hardware. Decoding an HD stream can take a significant amount of CPU, but it is still much less than encoding. – szatmary Dec 10 '13 at 01:50
  • Thanks very much for your advice. One clarification I need, what do you mean by "Decode in Software"? Are you suggesting to use Ffmpeg for mpeg4 streams and Intel Media SDK for MJPEG and H264 streams? – OrionSoftTechnologiesSydney Dec 10 '13 at 03:24
  • Transcoding is a two stop process. Decode sourse format to raw frames, then encoding the frames to the new format. So you can use ffmpeg to decode, then Intel to encode. – szatmary Dec 10 '13 at 16:24