Re: general directshow questions

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



From: "Sam Waller"

1. I need to be able to speed up and slow down the
playing of the video (audio doesn't matter). I have to
be able to continuously slow the video down to 0 frames
per second and speed it up to about 3 times the
normal speed. Can directshow do this? If so how can I
do it? Would VMR, VMR7, VMR9 or something else be the
best for this?

VMR == VMR7

If you are not also rendering audio (which would greatly
complicate things), the best way to change the video
rendering rate is to implement your own clock and change the
clock rate. Of course, the highest rate will be limited by
your CPU power and it only works with forward rates.

2. Is there a way that I can tell VMR9 to play the video
as fast as possible? Ie, don't throttle it to the frame
rate. I want to get it to render as fast as it can so
that I can compare the frames per second to other
rendering methods that I already have working.

As long as you do also render audio, simply remove the
graph's clock.

3. I have a VFW program that works pretty well, but I'm
concerned about the framerate and cpu usage. The VMR9
player sample uses about 10% cpu. Do you think that VFW
would be just as efficient as directshow? I need a lot
of interactive ("realtime") control of the playing of
the video. I'm considering directshow in case it would
use less cpu and or be able to render more frames per
second in 'free run' mode.

The major time-consuming operations are:

1. decoding
2a. rendering: color space conversion (if any)
2b. rendering: scaling (if any)
2c. rendering: drawing

Decoding will most likely be performed by the same component
and rendering in VFW is not well defined, so it all comes
down to how you implement it. As far as h/w acceleration for
decoding, it depends on the format, the hardware and the
exact pipeline (that is, the decoder implementation and
what's in between decoder and renderer).

--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


.



Relevant Pages

  • Re: avi / mpeg2 files
    ... exact same capture format and bitrate for all archived video -- don't change ... Any differences in format between 2 or more files ... may trigger undesirable re-compression while rendering. ... audio transforms are easily accomplished independent of video compression. ...
    (microsoft.public.windowsxp.moviemaker)
  • Re: How to bypass ASF writer compression
    ... problem is that i am not able to see all frames clear while playing the file. ... I am sending Compressed data both for Audio and Video to ASF Writer. ... "Alessandro Angeli" wrote: ...
    (microsoft.public.windowsmedia.sdk)
  • Re: resyncing audio
    ... Do I unlink the sound track and cut or add video ... > |> move the sound track by a few frames? ... > | closing with a bang, unlink the audio and then move that by the ...
    (uk.rec.video.digital)
  • Re: How to synchronize two video files with different time-length
    ... Particularly when the frames are not in sync ... accounted for" before rendering the mixture of them. ... channels as you go -- at least you can tweak it in for minimal ... For an earlier version of my video mixer program, I did a hack where I ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: [RFC][PATCH] Multimedia scheduling class
    ... Media players have time stamps on the displayed frames. ... sync video to audio. ...
    (Linux-Kernel)