Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering if ffmpeg supported gpu acceleration. I was reading on their websites and came across contradicting information. -H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration) -Will a graphics card make x264 encode faster? No. libx264 doesn't use them (at least not yet). There are some proprietary encoders that utilize the GPU, but that does not mean they are well optimized, though encoding time may be faster; and they might be worse than x264 anyway, and possibly slower. Regardless, FFmpeg today doesn't support any means of gpu encoding, outside of libx264.

If not, is there any way to add gpu acceleration to h.264 encoding/decoding?

share|improve this question

VDPAU only accelerates the decoding/playing of video. I don't know if the time taken to copy the raw video to the GPU encode, and then read back the compressed data would really mean there was much benefit from a GPU.

With playback you are forced to copy the data to the GPU anyway and it's obvisuly better to copy the smaller compressed source stream.

There is an example of doing the H264 compression step in the NVidia CUDA SDK but you need to provide other code to make an actual video

share|improve this answer

You could try this: for encoding the h264 streams then mux them with ffmpeg.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.