Re: How to encode videos using dshow?
- From: "JimmyZha" <jimmyzha@xxxxxxxxx>
- Date: 6 Jul 2006 03:12:45 -0700
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?
.
- Follow-Ups:
- Re: How to encode videos using dshow?
- From: Iain
- Re: How to encode videos using dshow?
- References:
- How to encode videos using dshow?
- From: JimmyZha
- Re: How to encode videos using dshow?
- From: Iain
- Re: How to encode videos using dshow?
- From: JimmyZha
- Re: How to encode videos using dshow?
- From: Iain
- How to encode videos using dshow?
- Prev by Date: Applying an offset to timestamp prevents smooth playback
- Next by Date: Re: IVMRVideoStreamControl::Set* dont work?
- Previous by thread: Re: How to encode videos using dshow?
- Next by thread: Re: How to encode videos using dshow?
- Index(es):
Relevant Pages
|