Re: Video snapshot is not captured with bitblt sometimes



I just tried using Windows Media player to play the DV file and sure enough I
can't do a screen capture either! At first when I did the Alt+Print screen
then did a paste into Paint, I thought it was there, but as soon as I moved
the paint window around the screen, the image was only an overlay and was not
actually moving with the window! I did try the pause command and this does
not do anything in either my application or WMP. Unlike WMP, I can load more
than one DV file and the others do seem to render, its always that 1st one
that does not. I don't know how other video hardware handle this situation,
but I have 3 PC's each of which have different video cards, so there is
something in common with the way windows is handling this device context.
Very strange, and I'm not sure what to try next.

"Jason [Mobiform]" wrote:

> I have had the same problem capturing media player, I figured the problem
> had happened when I got a new Nvidia driver or possibly a windows update. In
> any case the problem ( I think ) is that the video window is an overlay
> window and the video is rendered using hardware acceleration. When you use a
> screen DC bitblt its looking at the normal screen memory but finds only
> black since the video was handled quite differently than regular screen
> operations.
>
> When you paused video it burns in the last frame rendered by the video, at
> least thats how I thought it worked. When you pause are you able to capture
> subsequent frame or just where it was paused?
>
> I used to be able to turn the hardware acceleration slider in WMplayer down
> then I would be able to capture all video, that no longer works I am sure
> there is some flag that can be set in the OS to make all video render in
> software mode. Of course I have no idea where it is ;).. The worst case
> could be that they are using DirectX to render the video, in which case you
> might want to google "screen capture directX" or something similar...
>
> I'd be very interested to know if/when/how you get this to work.
>
> Jason
>
> "guitarman" <guitarman@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:EFFE026A-9D94-4B0C-B5FB-8D100630465F@xxxxxxxxxxxxxxxx
> > In my previous post, I indicated that the 1st opened DV video never works
> > under WIN2k as well, but that was not true, the 1st video will work after
> > I
> > open a second video as I described in 2 posts ago, but only on the current
> > frame. The winxp never works as I described in the last post.
> >
> > "Vince Morgan" wrote:
> >
> >> "guitarman" <guitarman@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> news:829E8852-3D14-452D-A958-C869D8248230@xxxxxxxxxxxxxxxx
> >> > I tried to use picture1.hDC, but no difference. I also noticed today
> >> > that
> >> > after I load the 2nd video, although the 1st video (DV) now can be
> >> > taken a
> >> > snapshot as I indicated in my earlier messages, but it only works at
> >> > the
> >> > current frame. That is, if I step forward or back in time position it
> >> > will
> >> no
> >> > longer be frozen to the picture box. If only I could figure out how to
> >> > do
> >> > this freeze effect myself, I think my problem would be solved!
> >> >
> >> > "Vince Morgan" wrote:
> >> >
> >> > >
> >> > >
> >> > > "guitarman" <guitarman@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> > > news:A7354EBF-BD1E-4870-81A8-3287657750F0@xxxxxxxxxxxxxxxx
> >> > > > That is what I am doing with this, getting the handle of the
> >> > > > picture
> >> box
> >> > > > control using the GetwindowDC(Picture1.hwnd) which I pass to the
> >> bitblt
> >> > > API
> >> > > > call. I have refreshed the picture1 box first, did the Do Events,
> >> > > > then
> >> > > make
> >> > > > the call (even tried it without doing this first). I am using the
> >> > > > mcisendstring "open AVIfilename Type mpegvideo alias AnimName
> >> > > > Parent
> >> > > > Ltrim$(Str$(picture1.hwnd) Style Ltrim$(str$(&H40000000)), 0,0,0 as
> >> > > > a
> >> way
> >> > > to
> >> > > > get the video to connect to the picture1 box control. If this
> >> > > > wasn't
> >> > > working
> >> > > > properly, then I would think, it would never work on any video. I
> >> > > > am
> >> > > > perplexed!
> >> > > >
> >> > > >
> >> > > > "Vince Morgan" wrote:
> >> > > >
> >> > > > > "guitarman" <guitarman@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
> >> > > > > message
> >> > > > > news:7DCAED66-FEB5-469B-9E74-67D46ADEE58F@xxxxxxxxxxxxxxxx
> >> > > > > > I have created a VB 5 application that can save a bit map image
> >> > > > > > of
> >> a
> >> > > video
> >> > > > > > still image contained in a picturebox control. I use the bitblt
> >> > > function,
> >> > > > > but
> >> > > > > > it works only with certain video clips (depending on the
> >> > > > > > encoded
> >> > > format,
> >> > > > > eg.
> >> > > > > > DV), and I don't understand why. I see the same problem if I
> >> > > > > > use
> >> the
> >> > > > > > Alt+Print screen short-cut key to capture a video image, that
> >> certain
> >> > > of
> >> > > > > > these videos only create a black picture copy. I also found
> >> > > > > > that
> >> if I
> >> > > > > pause
> >> > > > > > the VB executing code in the VB development environment, then
> >> resume,
> >> > > the
> >> > > > > > video image can be captured with either alt+print or using the
> >> bltblt
> >> > > > > call.
> >> > > > > > If I can "freeze" the image first in the same fashion that VB
> >> pause
> >> > > does,
> >> > > > > > then I think I will be able to solve this problem. I tried to
> >> > > > > > use
> >> the
> >> > > MCI
> >> > > > > > Freeze call, but it returned an error that the MCI device does
> >> > > > > > not
> >> > > support
> >> > > > > > this command. It is as if the video is being overlayed in the
> >> > > graphics
> >> > > > > card
> >> > > > > > and not actually in the PC memory. I can provide a small sample
> >> > > > > > of
> >> the
> >> > > > > code,
> >> > > > > > it is rather short.
> >> > > > >
> >> > > > > Can't say that I have ever seen this before. Very strange.
> >> > > > > Can you save the bitmap directly from the PictureBox?
> >> > > > >
> >> > > > > Vince Morgan
> >> > > > > Remove UNSPAM
> >> > > > > vinhar@xxxxxxxxxxxxxxxxxxxxx
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > I wouldn't use "GetwindowDC()"
> >> > > <MSDN>
> >> > > GetWindowDC is intended for special painting effects within a
> >> > > window's
> >> > > nonclient area.
> >> > > </MSDN>
> >> > > Note "nonclient area".
> >> > > I'd prefer to use "Picture1.Hdc" directly.
> >> > > Have you considered creating a DIB from the image first?
> >> > > Wish I could offer something more substantial, but I have no
> >> > > experience
> >> with
> >> > > DV encoding.
> >> > > --
> >> > > HTH
> >> > > Vince Morgan
> >> > > Remove UNSPAM
> >> > > vinhar@xxxxxxxxxxxxxxxxxxxxx
> >> > >
> >> > >
> >> > >
> >> Have you considered the realize command?
> >> <MSDN>
> >> The realize command instructs a device to select and realize its palette
> >> into the display context of the displayed window. Digital-video devices
> >> recognize this command.
> >> </MSDN>
> >> Just a thought, considering you seem to get nothing but black from the
> >> PictureBox.hDC.
> >> Perhaps calling that first on the DV device may help, but to be honest
> >> I'm
> >> realy grasping at straws here as I have no experience with processing DV.
> >> --
> >> HTH
> >> Vince Morgan
> >> Remove UNSPAM
> >> vinhar@xxxxxxxxxxxxxxxxxxxxx
> >>
> >>
> >>
>
>
>
>
.



Relevant Pages

  • callback
    ... // Create the capture graph builder ... // Obtain interfaces for media control and Video Window ... // Attach the filter graph to the capture graph ...
    (microsoft.public.win32.programmer.directx.video)
  • Hangs after clicking on "Capture from video device" + other probs
    ... video card, an Angel TV tuner card, and an SB Audigy 2ZS Audio ... problems with WMM right from the beginning. ... This time when I click on "Capture from video device", ... window appears, saying "The video device is currently in use. ...
    (microsoft.public.windowsxp.moviemaker)
  • Re: Problem with WM_LBUTTONDOWN
    ... I have only one window into which I render video. ... WM_LBUTTONDOWN message handler. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: video capture card
    ... >>> A friend wants to transfer VHS tapes to DVD and he's got a XP PC ... I am fairly new to the limitations of PC video editing, ... it is perfectly normal - and what I have to do - to capture ... that it takes sooo...long to render. ...
    (uk.tech.digital-tv)
  • Re: Video snapshot is not captured with bitblt sometimes
    ... window and the video is rendered using hardware acceleration. ... When you paused video it burns in the last frame rendered by the video, ... When you pause are you able to capture ...
    (microsoft.public.win32.programmer.gdi)