Re: enumerating for available muxers and generic way of encoding video
- From: "Alessandro Angeli" <nobody@xxxxxxxxxxxxxxxxxx>
- Date: Sun, 10 Feb 2008 19:00:14 -0500
From: "Lonewolf"
using 3rd party encoders, say xvid+mp3 and using WM_ASF
writer, yes, the Windows Format SDK does indeed mention
how to configure it for pre-compressed streams. However,
if using it this way, does it still mux the streams?
The WMASFWriter performes 4 functions in 1 filter: (1)
preprocessing, (2) compression, (3) muxing and (4) writing
to a WM sink (a file sink by default). 1 and 2 are skipped
if you configure the filter to mux pre-compressed streams,
which de fact makes the filter into a muxer. 1 is limited
and is only performed if 2 is enabled and the input formats
do not match the inputs required by the compressors. When
used as a muxer, the filter has some requirements:
- all inputs must be pre-compressed (the internal WMWriter
does not care instead)
- WAVEFORMATEXTENSIBLE is not supported (the internal
WMWriter supports it instead, at least for PCM audio)
- the video format block must be a VIDEOINFOHEADER and the
subtype must be a FOURCCMap matching the format's FOURCC
(this comes from the WMWriter)
- the audio format block must be a WAVEFORMATEX and the
subtype must be a FOURCCMap matching the format's tag (this
comes from the WMWriter)
- the input formats must match exactly the configured
profile (this comes from the WMWriter)
- a few more requirements coming from the WMWriter (and
listed in the latest doc page for IWMWriter::SetProfile())
I have however used xvid+mp3 for AVI mux output
to file writer. I can produce the video file, but it is
out of sync. The video runs slower than the audio.
That can happen if the timestamps of the input samples are
not correct and is due to the way AVI works:
- the samples must have a stop time
- the video frame rate must be constant
- the audio can not have gaps
use of custom profile, is it possible to ?name? the pin?
You can assign a stream and/or connection name to each
stream in the profile. I do not know whether that will be
reflected in the naming of the filter's pins however. But
what would you need that for? The streams in the profile are
identified by their ordered index, which is the same order
the pins are enumerated.
custom profile with ASF writer, is it possible to save[...]
the graph as a grf file? Below is the function I used in
configured it correctly. It seems that no matter what I
set as the custom profile and in the ASF writer, even if
it is just one stream, it would still show me the asf
writer with 2 streams in default WM 8 settings. Is this
because custom profiles set in ASF writer cannot be saved
this way? I use EnumPin and getting the pin info, I was
able to get the correct number of pins and streams
though. Could you enlighten me on this ?
I already answered this in your other thread on m.p.wm.sdk.
The WMASFWriter does not persist its state. If the
configuration is correct, why do you care?
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
.
- Follow-Ups:
- References:
- enumerating for available muxers and generic way of encoding video
- From: Lonewolf
- Re: enumerating for available muxers and generic way of encoding video
- From: Alessandro Angeli
- Re: enumerating for available muxers and generic way of encoding video
- From: Lonewolf
- enumerating for available muxers and generic way of encoding video
- Prev by Date: Re: enumerating for available muxers and generic way of encoding video
- Next by Date: ASSERT(m_bFlushing) fired when using GMFBridge
- Previous by thread: Re: enumerating for available muxers and generic way of encoding video
- Next by thread: Re: enumerating for available muxers and generic way of encoding video
- Index(es):
Relevant Pages
|