0
votes

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?

enter image description hereenter image description here

1
This media type is mpeg-4 video, of course, not H264 as you are expecting. If you've set the media type of your output to this mpeg-4 type and are actually delivering H264, then of course it's not going to work.Geraint Davies
You are absolutely right Davies. But i change the setting of rtsp source filter settings from property pages( to h264) and it seems it does not refresh.Sorry for my mistake. But When i add my rtsp source filter again (it refresh to h264) it can not able to reconnect to MPEG 4 muxer. Intelligent Connect put a default ffdshow (decoder). And now record "0" bytes although graph edit does not give errors.Novalis
@Geraint Davies. I updated my experiment with the Muxer. Subtype and format at Mux Seems Guid_null...I am doing something seriously wrong but can not figure out it.Thanks for warning my mistake.Novalis
The fourcc VSSH is not one of the standard fourccs used for H-264. If it is the same as or similar to a standard H264 fourcc, you should be able to add it to the mux very quickly.Geraint Davies
@Geraint Davies Thansk. It is an open source filter.So i can add it.Will Try ItNovalis

1 Answers

1
votes

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