How to Connect DV Video Encoder to FileWriter
-
I'm attempting to write a *RAW* DV stream to a file (for other processing on it later). In GraphEdit - * RenderFile some (any) media file * Delete the video renderer * Insert DV Video Encoder and connect input pin to (some decoder's) remaining video output pin * Insert an AVI Mux and connect to DV Video Encoder output pin * Insert a FileWriter and connect input pin to AVI Mux video output pin Running this results in a valid AVI file with DV media. OK, But... This file includes the AVI wrapper header information, and this is my problem. I need ONLY the DV stream data itself, with no AVI header. The the DV Video Encoder output pin (an XForm Out pin) will not connect directly to FileWriter input pin. So I must understand how to convert the DV Video Encoder XForm Out stream to a form the FileWriter input pin will accept. I'm guessing I need to make a filter using CTransInPlaceFilter, but I'm not yet sure, or how to do it. Does anyone know of sample code to accomplish this? Alternately, AVI Mux makes the correct connection, but adds the AVI header. Does anyone know of example source code for the AVI Mux Filter? Any other suggestions welcome. Thanks very much Brooks
Brooks
-
I'm attempting to write a *RAW* DV stream to a file (for other processing on it later). In GraphEdit - * RenderFile some (any) media file * Delete the video renderer * Insert DV Video Encoder and connect input pin to (some decoder's) remaining video output pin * Insert an AVI Mux and connect to DV Video Encoder output pin * Insert a FileWriter and connect input pin to AVI Mux video output pin Running this results in a valid AVI file with DV media. OK, But... This file includes the AVI wrapper header information, and this is my problem. I need ONLY the DV stream data itself, with no AVI header. The the DV Video Encoder output pin (an XForm Out pin) will not connect directly to FileWriter input pin. So I must understand how to convert the DV Video Encoder XForm Out stream to a form the FileWriter input pin will accept. I'm guessing I need to make a filter using CTransInPlaceFilter, but I'm not yet sure, or how to do it. Does anyone know of sample code to accomplish this? Alternately, AVI Mux makes the correct connection, but adds the AVI header. Does anyone know of example source code for the AVI Mux Filter? Any other suggestions welcome. Thanks very much Brooks
Brooks
The DV Encoder Filter's output pin has the following format: Major type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_dvsd Format type: FORMAT_VideoInfo The File Writer Filter's input pin supports this format: Major type: MEDIATYPE_Stream Subtype: MEDIASUBTYPE_NULL A transinplace filter won't work since the input and output pins must be the same. A custom transform filter (CTransformFilter) could work though. It may be less work to do a custom renderer filter that accepts the DV Encoder Filter's output format and simply writes the raw DV data to a file. The "Dump" sample filter in the SDK may be a good starting point.
"Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")
-
The DV Encoder Filter's output pin has the following format: Major type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_dvsd Format type: FORMAT_VideoInfo The File Writer Filter's input pin supports this format: Major type: MEDIATYPE_Stream Subtype: MEDIASUBTYPE_NULL A transinplace filter won't work since the input and output pins must be the same. A custom transform filter (CTransformFilter) could work though. It may be less work to do a custom renderer filter that accepts the DV Encoder Filter's output format and simply writes the raw DV data to a file. The "Dump" sample filter in the SDK may be a good starting point.
"Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")
Good call. That'll do it. Almost obvious, but hadn't occured to me. Thanks.
Brooks