使用 directshow 将 h264 流写入 Mpeg 容器
我有一个源过滤器正在推送“h264”流。我想将此流写入 MPEG4 (或可能是 AVI )容器。
SourceFilter[output = H264] ---> X--->Y ....--->FileWriter[record.mpeg4]
我怎样才能用 DirectShow 做到这一点? (同时打开不使用 DirectShow 的替代解决方案)
祝愿
PS:顺便问一下,什么是最好的 H264 流的容器格式?
MPEG-4 Mux 更新
嗯,我只是尝试 MPEG-4 Mux (www.gdcl.co.uk/mpeg4)。我的 rtsp 源过滤器和 MUX 无法连接。 Smart Connect 尝试将 FFdshow 解码器放在源过滤器和复用器之间。
它不会在 graphEdt 处给出错误,但记录的流是“O”BYTE。没有记录。 我错过了做某事...但是那是什么?
I have a source filter which is pushing "h264" stream. I want to write this stream into a MPEG4 (or may be AVI ) container.
SourceFilter[output = H264] ---> X--->Y ....--->FileWriter[record.mpeg4]
How can i do this with DirectShow? (also open the alternative solutions which does not use DirectShow)
Best Wishes
P.S: By the way, what is the best
container format for H264 streams?
Update for MPEG-4 Mux
Well, i just try MPEG-4 Mux (www.gdcl.co.uk/mpeg4). My rtsp source filter and MUX can not connected. Intelligent Connect try to put FFdshow decoder between source filter and muxer.
It does not give error at graphEdt but the recorded stream is "O" BYTE.No record.
I am missing to do something...But what is it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
www.gdcl.co.uk/mpeg4 上提供了 mpeg-4 mux 滤波器的源代码。这通常用于 H264。
您需要检查您提供的格式是什么。有两种选择:字节流格式(每个 NALU 之前有 00 00 01 起始码)和长度前置(每个 NALU 之前有一个长度字段,如存储在 MP4 文件中)。多路复用器应该接受两者,但您可能需要检查您使用的 fourcc/subtype guid 对多路复用器的含义与您的源的含义相同。
G
There's an mpeg-4 mux filter available in source form at www.gdcl.co.uk/mpeg4. This is often used for H264.
You'll need to check what the format is you're delivering. There are two choices: either byte stream format (with 00 00 01 start codes before each NALU) and length-prepended (with a length field before each NALU, as stored in MP4 files). The mux should accept both, but you might need to check that the fourcc/subtype guid you are using means the same thing to the mux as to your source.
G