2

我发现了一些进行文本叠加的 directshow 过滤器,但它们总是构建此图:

源 mpeg2(仅视频)-> mpeg2 解码器 -> 覆盖 ->(某些编码器)... -> 文件编写器

是否可以(也使用第三方过滤器)在 directshow 中构建文本覆盖而不解码 mpeg2 流?

源 mpeg2(仅视频)-> 覆盖-> 文件编写器

因为编码过程对 cpu 非常关键(我必须实时处理大约 6 或 8 个视频),并且每个文件每 2 分钟写入未经压缩的解码文件大约需要 170 MB (320x240)。

谢谢

4

1 回答 1

4

You can't get the overlay burned in to the video without decoding the video first. But you could have a text stream in the file, which was rendered and overlaid at playback time. A custom filter for decoding would be the easiest, and you would implement IStreamBuilder on the custom filter's output pin to connect it to a VMR secondary input when building the graph. Or you could encode it in a recognised caption format, and then choose a player that supports that format.

G

于 2011-06-16T11:29:30.007 回答