Re: How to encode videos using dshow?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Iain wrote:

The idea behind DirectShow is that each 'filter' performs some small atomic
operation (decode, file reading, video processing ...) and that you can
string em together more or less wihtout restrictions (apart from formats
being compatible).

So with MPEG you would have an MPEG encoder, an MPEG program muxer and a
file writer. If you connect the encoder to the writer you get elementary
streams, if you connect the encoder to the muxer to the writer you get
Program Streams. If you connect the encoder to a network sink you can
transmit the enoceded video across a network.

That's the theory. In practice things aren't so nice. If you are
reasonably sure that you will not need any intermediate access, then just
wrap the Dll.

And what I meant by my quoted comment was that you did not need to write an
encoding/file writing filter AND an encoding/network writing filter.
Instead, having written an encoder you could link that to an existing file
writer or network writer and thus only have written one filter.

One thing which is poorly documented in DirectShow and poorly supproted by
samples is filters which have multiple input pins. You may find some
references/samples on the March Hare's site and it has been a topic in this
group in the past.


Iain

--
Iain Downs (DirectShow MVP)
Commercial Software Therapist
www.idcl.co.uk

I got what your says, thank you.

What I need do is :

1. write a flv video encode filter.
2. use the lame mp3 encode for audio.
3. write a flv Muxer has 2 input pins and 1 output pin.
4. build the Graph and connect the Muxer to default file writer.



And I thinking an easier solution:

1. write two input pin and connect them to the audio/video Decode
filter's output pin.
2. run the graph, and get media samples from the written pins.encode
them and write file.

Can I go this way?

.



Relevant Pages

  • Re: How to encode videos using =?big5?Q?dshow=A1H?=
    ... I know encoder and muxer is preferred separate. ... The idea behind DirectShow is that each 'filter' performs some small atomic ... If you connect the encoder to the writer you get elementary ...
    (microsoft.public.win32.programmer.directx.video)
  • Multichannel audio with WM ASF Writer
    ... I want to encode a WM File with multiple audio. ... that the filter in GraphEdit shows 2 input pins called (audio 01 and ... instance it from the "WM ASF Writer" filter. ... Is there any way to encoder multiple audio channels usign the "WM ASF ...
    (microsoft.public.windowsmedia.sdk)
  • Re: ASF File Writer in WinCE6.0
    ... Graph Initialization phase I call the bellow functions: ... The same sequence worked when I used Microsofts WMV Encoder for encoding. ... Yet another thing I noticed,with my encoder in filter graph I am not getting ... > In this case buffering filter was not added to my graph. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: ASF File Writer in WinCE6.0
    ... How much memory do you have available on the system when the graph is starting? ... Buffering filter is inserted in my filter graph and the filter graph ... Further I inserted a dummy dump filter instead of asf mux,and I am able to ... done at Transformof my encoder on every outgoing sample. ...
    (microsoft.public.windowsce.platbuilder)
  • RE: Mpeg2 decoder -> Wmv9 encoder -> file writer
    ... However, my question is about WMV and specifically, how to convert an MPEG-2 ... to do this conversion using Graphedit. ... I thought you can program any filter or DirectX Media Object ... WMV encoder -> sink. ...
    (microsoft.public.windowsmedia.encoder)