DirectShow Record Problem - fps

前端 未结 2 1045
迷失自我
迷失自我 2020-12-10 22:08

I just create simple graph to record video from a source Filter:

SourceFilter ---> Muxer ---> FileWriter

I can able to save video whi

2条回答
  •  情歌与酒
    2020-12-10 22:34

    Ralf's comment is probably right. The AVI file format doesn't have per-frame timestamps, just an average frame rate. So when a frame arrives, the mux has to decide whether to place this frame in the next "slot", or insert a "dropped frame" marker and put the frame in the slot after. If the source filter's timestamps don't match the media type's frame rate, then you will get this effect.

    You can save your video elementary stream to a file, but use the Dump filter example, not the file writer. The file writer has a special protocol to allow multiplexors random access to the file (using the timestamps as file offsets). You want to just save the data as a stream, and the Dump example does that.

提交回复
热议问题