使用gpu使用ffmpeg转换视频 [英] Convert video with ffmpeg using gpu

查看:117
本文介绍了使用gpu使用ffmpeg转换视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有视频共享站点,并使用ffmpeg转换视频,但是转换需要很多时间.如何快速,安全地进行?我认为当ffmpeg与GPU搭配使用时对我有帮助,但是我找不到很好的参考.哪个应用程序或参考可以帮助我获得良好的性能.

I have video sharing site and convert video with ffmpeg but it take a lot of time for converting. how can do it fast and safe? I think when ffmpeg match with GPU it helps me but I find no good reference to use. Which application or reference can help me that have good performance.

推荐答案

更新2017年第四季度.自从我最初的答案以来,基于GPU的编码已广泛可用.如果您拥有现代的 NVIDIA视频卡,并且可以编译ffmpeg ,那么您应该会很好.感谢 Dmytro Dzyubak 指出了

Update Q4 2017. Since my original answer GPU-based encoding has become widely available. If you have a modern NVIDIA video card and can compile ffmpeg then you should be good to go. Thanks to Dmytro Dzyubak for pointing out the FFmpeg docs stating that indeed "CPU based encoding generally produces better quality than GPU based encoding."

-

基于GPU的编码特定于编解码器/GPU计算标准(CUDA,OpenCL),因此您需要指定使用的情况.ffmpeg是流行的编解码器(如x264和VP8视频)的包装.

GPU based encoding is specific to a codec/GPU computing standard (CUDA, OpenCL) so you would need to specify what are you using in your case. ffmpeg is amongst other things a wrapper for popular codecs like x264 and VP8 for video.

到目前为止,使用x264进行的所有尝试最多只能产生不同的结果.没有什么可以传递到生产上来的了.

Using x264 all attempts so far have produced mixed results at best. Nothing that could be passed on to production has come to see the light of day.

主要概念提供了一个SDK,该SDK可用于基于H264 GPU的编码.您可以在此处阅读更多信息.我还没有看到他们的SDK的价格标签,但我认为它可能会很昂贵.

Main concept offers an SDK that can be used for H264 GPU based encoding. You can read here for more information. I have not seen the price tag for their SDK but it could be expensive I guess.

根据所使用的编解码器,最好调整编码设置以牺牲质量以提高速度.附带说明一下,基于CPU的编码往往会比基于GPU的编码产生更好的质量.

Depending on the codec you use you are better off tweaking the encoding settings to trade off quality for speed. On a side note CPU based encoding tends to produce better quality than GPU based encoding.

这篇关于使用gpu使用ffmpeg转换视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆