we have developed a component that relies upon DirectShow in order to render
video clips.
We have found an issue that certainly affects both AVI and MPEG2 files
(tested with different codecs) and may be other formats when the rendering
window is across 2 monitors; the same happens with GraphEdt.exe also.
When we move the video rendering window (ActiveMovie) across 2 monitors, the
video is black in secondary monitor and available in primary monitor, when
the window is half its size over the secondary monitor, the video becomes
black in primary monitor and available in secondary monitor. As a further
issue, when there is this specific transition, playback seems to freeze for
a few milliseconds than it goes on normally.
Is there a way to avoid both issues? What could be the cause of this
behaviour? Video driver? Video adapter? DirectShow? Codec in use? Some
setting to work with? Anything else?
Thanks in advance and Kind Regards
Severino Delaurenti
MultiMedia Soft
http://www.multimediasoft.com
> Is there a way to avoid both issues? What could be the cause of this
> behaviour? Video driver? Video adapter? DirectShow? Codec in use? Some
> setting to work with? Anything else?
That's the expected behavior when using a hardware-accelerated surface:
a surface belongs to a device and thus can not stride 2 displays. When
the window is more than halfway through, the renderer re-creates a new
surface on the other display, which requires a brief reconnection and so
playback during that time is not smooth.
None of the stock renderers is smart enough to render to 2 surfaces
belonging to 2 devices at the same time. Since it is quite complex to
accomplish and the stock renderers seem to be designed for media
player/center like applications (where the desktop is not extended to
multiple displays), I guess Microsoft never felt the need to address
this issue.
Which renderer are you using? It may be possible to disable the hardware
acceleration to the point where software-only rendering is used and the
issue disappears. Of course, performance and quality are affected when
reducing the hardware acceleration. Read here:
http://groups.google.com/group/microsoft.public.win32.programmer.directx.video/msg/ceaec30aa8cc4f0e
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
thanks for your information.
I'm using a nVidia GeForce 9500 GT: I've tried to find a way to disable 3D
acceleration for this card but it doesn't seem to give this possibility.
Under the advanced settings, "Troubleshoot" there is a unique button "Change
settings" that is always disabled.
Kind Regards
Severino
"Alessandro Angeli" <nob...@nowhere.in.the.net> wrote in message
news:OdsvKhM3...@TK2MSFTNGP02.phx.gbl...
>I'm using a nVidia GeForce 9500 GT: I've tried to find a way to disable 3D
>acceleration for this card but it doesn't seem to give this possibility.
>Under the advanced settings, "Troubleshoot" there is a unique button
>"Change settings" that is always disabled.
I don't know if this will work with Win7, but I have done a hack in the past
to force software rendering by creating a 1 pixel dummy video window to
steal
the single hardware overlay.
You could test this simply by rendering 2 video files and dragging the
window
of the second one.
--
- Mike
> I'm using a nVidia GeForce 9500 GT: I've tried to find a way to
> disable 3D acceleration for this card but it doesn't seem to give
> this possibility. Under the advanced settings, "Troubleshoot" there
> is a unique button "Change settings" that is always disabled.
What video renderer are you using? You should not disable the hardware
acceleration globally.
if you are asking the rendering filter for the video stream, I'm using the
default "Video Renderer", indeed the same issue happens also with
GraphEdt.exe when rendering a video clip using its "File/Render Media
File..." menu item.
Kind regards
Severino
"Alessandro Angeli" <nob...@nowhere.in.the.net> wrote in message
news:#SZvAPO3...@TK2MSFTNGP06.phx.gbl...
I really don't understand how this could be done: could you be so kind to
clarify?
Kind Regards
Severino
"Mike Warren" <miwa-not...@or-this-csas.net.au> wrote in message
news:xn0gsy7l...@news.microsoft.com...
>"Mike Warren" <miwa-not...@or-this-csas.net.au> wrote in message
>>
>>I don't know if this will work with Win7, but I have done a hack in the
>>past
>>to force software rendering by creating a 1 pixel dummy video window to
>>steal
>>the single hardware overlay.
>>
>>You could test this simply by rendering 2 video files and dragging the
>>window
>>of the second one.
>
>I really don't understand how this could be done: could you be so kind to
>clarify?
I'm not up to date with DirectShow and what it's become in Vista and Win7 so
what I'm suggesting may not even work. Even if it does work it's a pretty
ugly
thing to do and there may be better ways of accomplishing the same thing.
This is the test:
Run GraphEdit and render a video file. While GraphEdit is playing, run your
program and see if the problem you described earlier still exists.
If that solves the problem then you could do what I did and start playback
of a file and scale the video window to 1x1 pixels and place it in the
corner of the screen. What that should do is grab the hardware overlay which
means any new file played will use software rendering. You can pause the
junk video once it has started playing. In my case I created a very small
and
short blank video. This meant there was one black pixel in the corner of the
screen.
This idea will fail if, for example, some other process is already using the
hardware overlay and stops using it between the point you create the 1 pixel
window and when you create the main video window.
--
- Mike
I've tried your test but it doesn't seem to make any difference: thanks
anyway for this suggestion.
Kind Regards
Severino
"Mike Warren" <miwa-not...@or-this-csas.net.au> wrote in message
news:xn0gsyau...@news.microsoft.com...
> if you are asking the rendering filter for the video stream, I'm
> using the default "Video Renderer", indeed the same issue happens
> also with GraphEdt.exe when rendering a video clip using its
> "File/Render Media File..." menu item.
The VideoRenderer can be the old VideoRenderer or the VMR7. On XP and
newer it should be the VMR7. In any case, both use a DirectDraw overlay
surface (that can only exist on the primary display) and both provide a
way to programmatically disable it (see the link I gave you in my
previous message).
What Mike was suggesting is that there can be only 1 overlay per system
so, if you lock it in some hidden window, the video renderer will not be
able to use it. But that approach is flawed: some video cards support 2
overlays and the video renderer will release the overlay if its window
is not at least partially visible. So it's best to tell the renderer not
to use it for real as explained in the article mentioned above.
in this case we should be able to access the IDirectDrawVideo interface of
the video renderer and to use the SetSwitches method.
I imagine that I should get actual switches through the GetSwitches method
and to disable some of them: just to avoid making useless attempts, could
you be so kind to point me to the correct settings I should use for
disabling overlay surfaces?
Kind Regards
Severino
"Alessandro Angeli" <nob...@nowhere.in.the.net> wrote in message
news:eMQ$DIZ3KH...@TK2MSFTNGP05.phx.gbl...
> in this case we should be able to access the IDirectDrawVideo
> interface of the video renderer and to use the SetSwitches method.
That only works with the OVR while most likely you are using the VMR7.
You should query the filter for IVMRFilterConfig and, if that fails,
query it for IDirectDrawVideo.
> I imagine that I should get actual switches through the GetSwitches
> method and to disable some of them:
No need.
> just to avoid making useless
> attempts, could you be so kind to point me to the correct settings I
> should use for disabling overlay surfaces?
http://groups.google.com/group/microsoft.public.win32.programmer.directx.video/msg/646817f981321759
You must explicitly add EVR to your graph and it will display over two
screens on the 9500 GT. EVR is available in Vista or 7.
If you do not wish to use EVR you can load the CLSID_VideoRenderer and set
the DirectDrawVideo switches for AMDDS_NONE and it will software render over
multiple screens - but it will look like crap if it needs to scale up or down.
"Severino" wrote:
> .
>