开发者

Writing h264 stream into Mpeg Container using directshow

开发者 https://www.devze.com 2023-03-15 19:40 出处:网络
I have a source filter whichis pushing \"h264\" stream. I want to write this stream into a MPEG4 (or may be AVI ) container.

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 DirectSh开发者_StackOverflow社区ow? (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?

Writing h264 stream into Mpeg Container using directshow

Writing h264 stream into Mpeg Container using directshow


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号