Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How capture video stream form other app ?

5 views
Skip to first unread message

Oil_Bench

unread,
Jul 7, 2009, 7:01:31 AM7/7/09
to
Hi,
how capture video stream form other app?
some sdk (uccapi) give me IVideoWindow, so I can view this video,
but i want save stream as *.avi file.
Can I do this with directx, showwideo?

when i find info about capture video, i always see "how capture
video from VGA CArd or web cam ... "

Thank for all reply.

Oil_Bench

unread,
Jul 7, 2009, 7:03:12 AM7/7/09
to

mistake: directshow not showwideo.

sorry

The March Hare [MVP]

unread,
Jul 7, 2009, 9:37:11 AM7/7/09
to

On Tue, 7 Jul 2009 04:01:31 -0700 (PDT), Oil_Bench wrote:

> how capture video stream form other app?
> some sdk (uccapi) give me IVideoWindow, so I can view this video,
> but i want save stream as *.avi file.
> Can I do this with directx, showwideo?


Responded to in the dshow MSDN forum.

Please do not multi-post.

See: http://tmhare.mvps.org/help.htm#mp

--
Please read this before replying:
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution

JJ

unread,
Jul 7, 2009, 7:55:33 PM7/7/09
to

I think you can do that using a custom high-priority DirectShow filter
to get the video+audio data stream.

Oil_Bench

unread,
Jul 8, 2009, 5:04:21 AM7/8/09
to

Can you tell me more info about your idea?

JJ

unread,
Jul 8, 2009, 7:08:52 AM7/8/09
to
Oil_Bench wrote:
> Can you tell me more info about your idea?

A good example would be the ffdshow DS filter. It comes in two parts: a
video decoder and an audio decoder. Both has a feature to dump the
stream to an external file. Even though they also pack a handful of
codecs, for this case, let's assume that those codecs are disabled and
let other video/audio decoder to handle the streams - leaving ffdshow as
merely a stream dumper.

Since ffdshow is open source (available at
http://sourceforge.net/projects/ffdshow-tryouts ), it can be modified to
reencode and multiplex the streams to an AVI file. The modified DS
filter should listen to commands sent from your application. If it
does't receive commands to capture the streams, it can just be a
do-nothing filter. So basically, your application is a remote controller.

Note that encoding a video in realtime needs a fast CPU. The playback
may not be smooth if the CPU isn't fast enough. However, there will be
no dropped frames on the reencoded video+audio since the source is the
actual data (or colorspace converted one) from the video file being played.

This is just an overview of the concept. It'll get complicated on the
actual code.

Oil_Bench

unread,
Jul 9, 2009, 8:55:41 AM7/9/09
to
On 8 Lip, 13:08, JJ <jcun...@gmxNOSPAM.net> wrote:
> Oil_Bench wrote:
> > Can you  tell me more info about  your idea?
>
> A good example would be the ffdshow DS filter. It comes in two parts: a
> video decoder and an audio decoder. Both has a feature to dump the
> stream to an external file. Even though they also pack a handful of
> codecs, for this case, let's assume that those codecs are disabled and
> let other video/audio decoder to handle the streams - leaving ffdshow as
> merely a stream dumper.
>
> Since ffdshow is open source (available athttp://sourceforge.net/projects/ffdshow-tryouts), it can be modified to

> reencode and multiplex the streams to an AVI file. The modified DS
> filter should listen to commands sent from your application. If it
> does't receive commands to capture the streams, it can just be a
> do-nothing filter. So basically, your application is a remote controller.
>
> Note that encoding a video in realtime needs a fast CPU. The playback
> may not be smooth if the CPU isn't fast enough. However, there will be
> no dropped frames on the reencoded video+audio since the source is the
> actual data (or colorspace converted one) from the video file being played.
>
> This is just an overview of the concept. It'll get complicated on the
> actual code.


Very thx for answer, I must check it.

Oil_Bench

unread,
Jul 9, 2009, 9:05:44 AM7/9/09
to
On 8 Lip, 13:08, JJ <jcun...@gmxNOSPAM.net> wrote:
> Oil_Bench wrote:
> > Can you  tell me more info about  your idea?
>
> A good example would be the ffdshow DS filter. It comes in two parts: a
> video decoder and an audio decoder. Both has a feature to dump the
> stream to an external file. Even though they also pack a handful of
> codecs, for this case, let's assume that those codecs are disabled and
> let other video/audio decoder to handle the streams - leaving ffdshow as
> merely a stream dumper.
>
> Since ffdshow is open source (available athttp://sourceforge.net/projects/ffdshow-tryouts), it can be modified to

> reencode and multiplex the streams to an AVI file. The modified DS
> filter should listen to commands sent from your application. If it
> does't receive commands to capture the streams, it can just be a
> do-nothing filter. So basically, your application is a remote controller.
>
> Note that encoding a video in realtime needs a fast CPU. The playback
> may not be smooth if the CPU isn't fast enough. However, there will be
> no dropped frames on the reencoded video+audio since the source is the
> actual data (or colorspace converted one) from the video file being played.
>
> This is just an overview of the concept. It'll get complicated on the
> actual code.

can You tell me, where i can find some sample code? in c++ or
c#?

JJ

unread,
Jul 9, 2009, 9:38:39 AM7/9/09
to
Oil_Bench wrote:
> can You tell me, where i can find some sample code? in c++ or
> c#?

You can download the whole source code from its download section.
Or browse its CVS repository via web if you want a specific file.

0 new messages