H.264编码器可能无法正常工作(win7) [英] H.264 encoder perhaps not working (win7)

查看:125
本文介绍了H.264编码器可能无法正常工作(win7)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可能也遇到了H.264编码器问题,但处于更基础的层面。

I may be having H.264 encoder problems too, but at a much more fundamental level.

在我的源读取器/接收器编写器模型程序中,我正在使用H.264 IMFTransform直接在其他地方的某些帖子中建议。  然后我将它产生的样本发送到网络(使用拼凑的live555库代码到VLC媒体播放器)。
 

In my source reader / sink writer model program, I am using the H.264 IMFTransform directly as suggested in some other post somewhere.  I then send the samples it produces out to the network (using cobbled live555 library code to VLC media player).  

当我观看此网络流时,视频质量非常糟糕;非常糟糕,好像我一定做错了。

When I watch this network stream, the video quality is really bad; so bad that it seems like I must be doing something wrong.

由于我不得不拼凑一个live555方法通过RTSP发送网络,我不能确定我的问题是什么这是破坏或丢弃压缩帧,或者来自H.264 IMFTransform的压缩帧是问题。  所以
我想通过首先测试我的H.264 IMFTransform来分而治之。  现在我开始遇到阻止我继续前进的问题。

Since I had to cobble together a live555 method to send out the network via RTSP, I can't be sure if my problem is that this is corrupting or dropping compressed frames, or if the compressed frames coming out of the H.264 IMFTransform are the problem.  So I want to divide and conquer by first testing my H.264 IMFTransform out.  Now I start having problems that stop me from moving forward.

1)我已经使用  IMFSinkWriter将流转移到文件中了。  这有效。  我重新安排了一些代码以使用IMFSinkWriter,它将H.264编码的帧(subtype = MFVideoFormat_H264)作为输入,而不是进入编码器的未压缩的
NV12帧(subtype = MFVideoFormat_NV12)。  但是我从SetInputMediaType()返回MF_E_INVALIDMEDIATYPE。  所以我似乎无法做到这一点。  是否有另一种[简单]方法将这些编码帧包起来,
将它们写入.mp4文件,这样我以后可以播放这个文件,看看我的原始H.264编码是好还是坏?

1) I was already forking the stream off to a file using an IMFSinkWriter.  This works.  I rearranged some code to use an IMFSinkWriter that takes H.264 encoded frames (subtype=MFVideoFormat_H264) as input rather than the uncompressed NV12 frame (subtype=MFVideoFormat_NV12) that went into the encoder.  However I get back MF_E_INVALIDMEDIATYPE from SetInputMediaType().  So it seems that I can't do this.  Is there another [easy] way to wrap these encoded frames up and write them to a .mp4 file, so that I can later play this file back and see if my original H.264 encoding is good or bad?

2)或者,我尝试立即解码我刚刚编码的H.264。  但我的构建链接失败是因为缺少CLSID_CMSH264DecoderMFT(由CoCreateInstance()根据http://msdn.microsoft.com/en-us/library/windows/desktop/dd797815(v=vs.85)使用。 ASPX)。
 似乎是"声明"了as extern in
wmcodecdsp .h以便我的
来源"编译",但是"链接"。失败,因为它不是实际"定义"的地方。  我在哪里或如何获得CLSID_CMSH264DecoderMFT?

2) Alternatively, I tried immediately decoding the H.264 that I had just encoded.  But my build link fails because CLSID_CMSH264DecoderMFT is missing (used by CoCreateInstance() per http://msdn.microsoft.com/en-us/library/windows/desktop/dd797815(v=vs.85).aspx).  It seems it's "declared" as extern in wmcodecdsp.h so that my source "compiles", but the "link" fails because it's no where actually "defined".  Where or how to I get CLSID_CMSH264DecoderMFT ?

在此先感谢您的帮助。

推荐答案

你好

我相信你做错了什么。我最近开发了MJPEG源并使用H264编码器生成ASF视频文件。结果非常好。实际上比特率非常重要并且会影响质量。我们还有RTSP源码并从
H264解码也看起来不错。您的编码器设置有问题

I believe that you doing something wrong. I recently developed MJPEG source and used H264 encoder to produce ASF video files. Result was really good. Actually bit rate is very important and affects on quality. Also we have RTSP source and decoded from H264 also looks nice. Something wrong with your encoder settings

问候

Aleksey


这篇关于H.264编码器可能无法正常工作(win7)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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