Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I was wondering if ffmpeg supported gpu acceleration. I was reading on their websites and came across contradicting information.

http://www.ffmpeg.org/general.html#Video-Codecs -H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)

http://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide -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

2 Answers 2

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 gpgpu.

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: https://developer.nvidia.com/nvidia-video-codec-sdk for encoding the h264 streams then mux them with ffmpeg.

share|improve this answer

Your Answer

 
discard

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.