x264 和libav编解码器
经过相当长的时间尝试在 Windows 上使用 x264 编码器构建 ffmpeg 静态库后,我花了更多时间用它编写一些示例。 当然,有大量关于如何构建、如何使用等等的“说明”……但是,它们都不能在 Windows 上运行。我想 Linux 人员在这里处于更好的位置。现在,价值数十亿美元的问题是“这一切的目的是什么?”。这不仅在 Windows 上毫无用处,而且我还可以购买一些实际可用的第三方库。
如果有人要说“但是,它有效!”。我必须说,给我一个工作证明。我不在乎 10fps 的 200x100。我不需要 H264。向我展示如何压缩一秒的 1080i 素材。它是 H264,它是跨平台的(如果你问我的话,听起来很有趣),Google 正在使用它(它必须是完美的,对吧?),这里还有一些更时髦的东西......
After some considerable amount of time while trying to build the ffmpeg static library with the x264 encoder on Windows, I have spent some more time for writing some example with it.
Of course, there are tons of "instructions" on how to build, how to use, bla bla... But, non of them works on Windows. I guess the Linux guys are in better position here. Now, the zillion dollars question is "What's the purpose of all that?". Not only that this is useless on Windows, but I could have bought some third party library that actually works.
If somebody is about to say "But, it works!". I must say, give me a working proof. I don't care about 200x100 at 10fps. I don't need H264 for that. Show me how to compress a single second of 1080i footage. It's H264, it's crossplatform (sounds funny if you ask me), Google is using it (it has to be perfect, right?), some more hipe here...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先,不要尝试在 Windows 上构建 - 特别是如果您使用 VS - 从 此处 获取
它序列类似于:
然后对于每一帧
Firstly don't try and build on windows - especially if you use VS - get it from here
Then the sequence is something like:
Then for each frame
如果您想使用 libavcodec+libx264 以隔行模式进行编码,请使用 CODEC_FLAG_INTERLACED_DCT。如果可能的话,您应该直接使用 libx264 或 CLI 程序,这样工作量会更少。
If you want to encode with libavcodec+libx264 in interlaced mode, use
CODEC_FLAG_INTERLACED_DCT
. If possible you should use libx264 or the CLI program directly though, it's less work.