本文介绍了如何在DirectShow中使用x264编码器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道如何在DirectShow中使用x264.我安装了许多文件,认为它们假装没有使用x264编码器,我下载了videoLAN x264二进制文件,当我运行它时,它显示的控制台窗口是如此之快,此后什么也没发生

i can't figure out how to use x264 with directshow. i installed many thinks that pretend to have x264 encoder in with no use i downloaded the videoLAN x264 binary and when i run it, it shows so fast a console windows, and nothing happen after that

这些是我拥有的编码器

我正在Windows 8.1 x64上工作

i am working on windows 8.1 x64

请帮助解决这个问题,这只会使我发疯……我想使用x264,因为我安装的其他编码器无法正常工作,或者无法使用如此大的尺寸进行编码.

please help with this issue it's just going to make me crazy hhh, i wanna use x264 because the other encoders that i have installed, either didn't work or encode with so big size.

推荐答案

x264本身没有DirectShow接口,因此您需要一个包装器(或者,您需要自己实现). x264vfw 包装x264并将编码器公开为VFW编解码器,DirectShow通过.类似的选项是: direct264 Monogram的x264包装器.无论哪种方式,已安装的编解码器都将显示在DirectShow筛选器列表上,并且可以通过编程方式使用(最简单的方法是确保使用SDK GraphEdit工具或 GraphStudioNext 或类似的文件.

x264 itself does not have DirectShow interface, so you need a wrapper (or, you need to implement it yourself). x264vfw is wrapping x264 and exposes the encoder as VFW codec, and DirectShow uses VFW codecs through AVI Compressor Filter. Similar options are: direct264 and x264 wrapper by Monogram. Either way, an installed codec will show up on DirectShow filter list and will be available programmatically (the easiest way to ensure is SDK GraphEdit tool, or GraphStudioNext, or similar).

一旦安装了编解码器,就可以在过滤器列表中找到它.通常,将过滤器注册到Video Compressors类别中(示例在此处为x264vfw):

Once you have the codec installed, you can find it in the filter list. It is typical that the filter is registered into Video Compressors category (x264vfw is here for the example):

该过滤器扩展了DirectShow基础结构,可以与其他压缩器一起使用.视频编码器不能单独使用,以构建有效的DirectShow图形,通常在拓扑结构中具有源/渲染器过滤器,而视频编码器则介于两者之间.

The filter extends DirectShow infrastructure and can be used... as documented, as other compressors. Video encoder are not used separately on their own, to build a valid DirectShow graph one normally has source/renderer filters in the topology, and a video encoder is a thing in between.

下面是DirectShow过滤器图的示例,该图利用x264vfw视频编码器并将Windows Media .WMV文件转码为H.264 .MP4文件:

Below is example of DirectShow filter graph which leverages x264vfw video encoder, and transcodes Windows Media .WMV file into H.264 .MP4 file:

这篇关于如何在DirectShow中使用x264编码器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-30 23:28