Unable to capture a video using robot.createScreenCapture

Hi all,
I'm having one problem with robot.createScreenCapture, i used the
below code to take screen shot, everything goes fine except one case, I'm unable to capture videos played in windows media player & winamp, black screen is displaying instead of the video. I used avi files.
here is the code
import java.awt.AWTException;
import java.awt.Dimension;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.JButton;
import javax.swing.JFrame;
public class CaptureImage implements ActionListener {
     Robot robot = new Robot();
     Image image = null;
     public CaptureImage() throws AWTException {
          JFrame frame = new JFrame("Capture");
          JButton button = new JButton("Capture");
          frame.setAlwaysOnTop(true);
          button.addActionListener(this);
          frame.getContentPane().add(button);
          frame.pack();
          frame.setVisible(true);
     public void actionPerformed(ActionEvent e) {
          // image = robot.createScreenCapture(new Rectangle(800, 600));
          String outFileName = "shot.png";
          // determine current screen size
          Toolkit toolkit = Toolkit.getDefaultToolkit();
          Dimension screenSize = toolkit.getScreenSize();
          Rectangle screenRect = new Rectangle(screenSize);
          // create screen shot
          Robot robot;
          try {
               robot = new Robot();
               BufferedImage image = robot.createScreenCapture(screenRect);
               ImageIO.write(image, "png", new File(outFileName));
               System.out.println("Saved screen shot (" + image.getWidth() + " x "
                         + image.getHeight() + " pixels) to file \"" + outFileName
                         + "\".");
          } catch (IOException e2) {
               e2.printStackTrace();
          } catch (AWTException e1) {
               e1.printStackTrace();
     public static void main(String[] args) {
          try {
               new CaptureImage();
          } catch (AWTException e) {
               e.printStackTrace();
}

Are you setting the videoPause property to true in the rule you're using to navigate to the video screen? For example, assume you're using a button to navigate to the VideoScreen, its OnSelect property should be: Navigate(VideoScreen, ScreenTransition!Fade,{videoPause:false}).
Basically, the value needs to change for the video to pause. If you don't have that set up, you could also do that within the rule you're using to navigate to scrHome as follows:  
UpdateContext({videoPause: false});Navigate(scrHome, ScreenTransition!Fade,{videoPause: true})
Thanks
Robin

Similar Messages

  • Unable to Capture an image using Native Camera

    Hi all,
    Please help me out.
    I am getting an issue but unable to find out its solution.
    I am watching a video on my mobile phone N96 and open the CAM pressing right side button continue, Camera gets opened and i am able to take a snap.
    Same functionality i am doing while i am playing a video from my java application. I play a video through my application, while video is running , i open CAM pressing right side button. Camera gets opened. When i click to capture a snap, camera captures a snap but this is not that picture,which was shown by camera while capturing. It captures my video snap which was running on my application.
    Please suggest me, is this property of Nokia mobile phone's camera or any defect on that.
    Thanks,
    Ashutosh

    No , I am not using screen captured application.
    I am playing a video from my application, when vedio is running, then i open my native camera to capture a snap after pressing right side button. 
    Ashu

  • Unable to play recorded video using BB multimedia api in other platform

    Hi all,
    I am new to Blackberry application development. The application I am developing it is required to record a video using multimedia api.
    I am using
    video encoding : MPEG-4
    audio encoding : AMR
    res : 320 x 240
    Device using Curve 8250
    It is the same encoding combination BB curve use to record a video from default recorder.
    _player = Manager
    .createPlayer("capture://video?encoding=video/3gpp&width=320&height=240&fps=12&video_codec=MPEG-4&audio_codec=AMR");
    After recording it from my application I am able to play the video in vlc even in BB devices. But when I am trying toplay in android,J2ME and iPhone platform. It is unable to play the video..Can anybody help me out in this regard.
    I am really in trouble. I need your help .
    Thanks in advance.
    Regards,
    Angan

    In my experience if windows media player plays it(the mpeg4), it will not be compatiable with quicktime. At least if you do not go installing the codecs to read ISO mpeg 4 (.mp4 is the standard extension that quicktime puts on the files). Another thing to check is if you are creating ISO compliant files. The mpeg4s that windows media reads by default are not ISO compliant. You also need to keep in mind that Quicktime is a simple profile mp4 and main profile mp4 player (although not all b frames are compatable with quicktime). See http://en.wikipedia.org/wiki/Quicktime for a basic overview of the profile support. I suggest that you try playing the media with free softwares such as vlc http://www.videolan.org/vlc/ and mplayer http://www.mplayerhq.hu/design7/news.html and check that the format and codecs are correct. Although they will play non standard files they will list the codecs in use (make sure that you are using ISO compliant standards as you can put more than MPEG 4 in mp4).

  • Unable to capture analog video.

    Hi,
    I am running Premier Pro CS3 on a Windows XP machine. This is a new machine to me provided by my work. I am trying to capture analog video from a VHS deck that has both S-video and composite outs. The IT folks installed an ATI TV Wonder HD 650 PCI Digital & Analog TV Tuner to use as a capture card. In the device manager it shows up as an ATI Radeon HD2400 card. I don't have anyway of discerning the difference, and this may or may not be the main issue. When I open Premier and try to capture, it does not recognize the card as a capture device. Any clues about how to make this work would be great.
    Thanks,
    sarah

    Premiere Pro does not natively capture from TV or graphics cards.
    You will find links to many
    free tutorials in the PremiereProPedia that will quickly show you how things are done in Premiere Pro.
    Cheers
    Eddie
    PremiereProPedia   (
    RSS feed)
    - Over 300 frequently answered questions
    - Over 250 free tutorials
    - Maintained by editors like
    you
    Forum FAQ

  • Unable to capture C drive using Dism and imageX commands

    I am trying to capture C drive using dism command but it did not work, but the same command is capturing E drive. i am using following command.
    dism /Capture-Image /ImageFile:E:\image.wim /CaptureDir:C:\  /name:"Image File"
    I am getting following error.
    Deployment Image Servicing and Management tool
    Version: 6.3.9431.0
    Error: 32
    The process cannot access the file because it is being used by another process.
    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
    An in the log file the error is:   DISM   DISM.EXE: WimManager processed the command line but failed. HRESULT=80070020

    Hi,
    As far as I know, Dism command doesn't support hot image backup, that to say, you do need to complete the image backup job at Windows PE enviroment.
    The contents of the link below also list the Dism command capture image requirement:
    http://technet.microsoft.com/en-us/library/hh825072.aspx
    Roger Lu
    TechNet Community Support

  • Please Help:(,Unable to capture from camcorder using Audigy 2 ZS Video Edi

    Hi there! Well I have been trying to use the Sound Blaster Audigy 2 zs video editor to transfer Hi8 tapes from my camcorder (Samsung SLC860) to my laptop (Compaq presario, AMD Athlon 64 3200+, .25 GB RAM, xp). I have successfully done this before *sort of*. Before i was able to capture video from my camcorder without the sound. But now I cant even capture video! I get an error when using Ulead VideoStudio 8 SE reading: 5065:29:0. Please help, anything would be great! Thank you! Oh, i've tried reinstalling the drivers already, didnt work. P.S. I connect the camcorder to the Creative Audigy using S-Video. I have also tried A/V out from the camcorder to video-in on the Audigy. I have also downloaded VidCap and other driver updates from Creative but those didn't work either. I've tried VidCap other capture programs, none worked. Any help would be great. Thank you!
    Message Edited by DjShadowalker on <SPAN class=date_text>06-06-2006 <SPAN class=time_text>:09 AM
    Message Edited by DjShadowalker on 06-06-2006 :09 AM

    Hi there! Thanks for the reply, unfortunately, I've tried VidCap and it wont let me capture either. The Start button on Step 3 isn't acti've. Its not bold, and when i click on it nothing happens. But under device manager and Sound, Video and game controllers, there are alot of things. They are as followed: Audio Codecs, Legacy Audio Drivers, Legacy Video Capture Drivers, Media Control Devices, Sound Blaster Audigy 2 ZS Video Editor Audio Device, Sound Blaster Audigy 2 ZS Video Editor Video Device, SoundMAX Intergrated Digital Audio, Video Codecs. Do you think any of these could be interfering with one another? If so, which ones can be safely disabled? I've also tried downloading all the necessary updates for VidCap and I've even tried reinstalling the Audigy card many times. I am able to see the preview of the video on both programs VidCap and VideoStudio but I just can't capture. Once again, the error message on VideoStudio is: 5065:29:0. Thank you so much, hopefully I hear from ya soon and this can be fixed.

  • Unable to Capture SD video

    I have been using CS5 to capture video with no problems until the last few days. I am using CS5 with all updates, Nividia GTX 470 (updated to newest driver), I have tried to capture using a Canon XL2 (PAL) camera and a Sony z5 (using sd settings). What I see in the capture screen is just black - no footage or audio at all. I can control the camera from the PPro capture window ie play it, stop it, rewind etc...
    I have read other posts relating to this problem and have tried their suggestions (logging on with administration rights etc) This is the first time that this has ocurred after many years capturing without problems with PPro. I have tried Scenalyzer but get the info saying something like  that no video is coming from the drivers. I have tried different firewire connections and have installed a new firewire card I have mada a fresh installation of both OS and adobe software.  Any help appreciated!
    Windows 7 64bit Ultimate
    !2 gigs RAM
    i7 930
    Asus P6t
    Nvidia GTX 470

    SUCCESS!...I seem to have found a solution - still not sure what happened but when I installed the firewire card, I disabled the onboard 1394 connection in the bios ( I didn't think I would need it.) Anyway, I re-enabled it and connected my XL2 to the onboard 1394 firewire and it worked! BTW, this was all done on my main Video editing PC and not on the different pc, I said I would.

  • Capturing Analog video using Sony DSR 11

    I have old footage on VHS that I need to capture into FCP. I've done this a bunch of times using a DSR 20 and I'm assuming it works the same way with the DSR 11. When I do this with the DSR 20, I plug the VHS deck into the deck, switch the input to S video (I'm using s video cables) and in FCP, I switch the device control to "Non contrable device" and use the DV NTSC capture preset. I did the same thing using the DSR 11 but I don't get any video. I'm sure there is an obvious step that i'm overlooking but I just can't see what it is.

    We do this often with our dsr11s, not problem. Could be a bad s cable, always start with the simplest things first. Then try using composite video.
    Umm, I'm not at my video machine today but you might need to make a menu setting adjustment on the dsr to feed straight through. Without the E-to-E active, you might need a tape in the machine or to activate the record button.
    bogiesan

  • Trouble capturing analog video using Quicktime 7 in Yosemite

    I am attempting to use Quicktime 7 Pro under Yosemite to convert old 8 mm or Hi8 analog videotapes to digital .mov files. The tapes are being played through a Sony TRV350 camcorder, which digitizes the analog video, and outputs digital video via the iLink (Firewire) output, which then goes to the Thunderbolt input on my MacBook Pro using an adapter. I start the camcorder and then start QT7 Pro.
    This DOES WORK - for a short while. After taking in 32MB of data or a minute (of a 90 minute video), QT7 stops capturing data with a message:
    "Recording stopped because the format of the source media changed. Media of different formats cannot be recorded to the same file"
    What does this mean and how do I get around it?
    PS: There are not many ways to convert these old tapes. Under Yosemite iMovie will no longer accept video from a Hi8 camcorder. There is some discussion of older iMovie HD but this does not work properly under Yosemite at all.
    Need to digitize these old family tapes - any help will be appreciated

    One tiny wrinkle is that "Save" from Vidi gives an error message but "Save as" works fine. I suspect Vidi may also stop working with the next OS X release.
    Since you did not indicate the specific nature of the error message, I don't know if this is a "fixable" problem or not. The difference between the "Save/Record" and "Save As.../Record As..." options is that the former automatically stored the captured files in a designated location using a default filename. You may wish to check or reset the preference settings here to see they are causing your issue.
    Yes, the conversion of a 90 min tape does give a 21 GB file but I don't care - these family videos are irreplaceable and storage is cheap.
    This sounds about right—i.e, the normal average DV-25/DVCPRO-25 total data rate is on the order of 28.5 Mbps (or about 13 GB/hour) with DV-50/DVCPRO-50 about 57 Mbps and DV-100/HDV about 114 Mbps.
    One more question. Now that I have a DV file, what can I use to convert to a more compressed format that preserves quality? QT7 to save as H.264 is best? Or something else? Toast?
    This normally depends on your goals and personal workflow preferences.
    For instance, if you are editing content (i.e., trimming; merging; adding titles, fades, transitions, effects, etc.), I would normally use the export/share options that are available from within the editing app itself. On the other hand, for simple trims and export/share of files, I would normally use QT X or QT 7 Pro depending on the specific project needs and/or level of manual control desired. For totally edit-free conversions, I would normally use the encoder options now built into Yosemite (or Mavericks) operating system at the Finder level or the free HandBrake app. (The former basically employs a non-anamorphic approach with high/low quality or target device controlled quality options while the latter has a better graphic user interface for anamorphic strategies with more manual control for truly customized exports as needed.)
    EXAMPLE 1: The family normal has Thanksgiving at my brother-in-laws home in PA so my son hosts a second "pseudo-Thanksgiving" dinner on January 1st for the relatives here in NJ. This year I wore a GoPro and within minutes of returning home created the following "trailer" of the gathering (with a total absence of any real planning or forethought) using iMovie to shared the file directly to Mail for posting to others. In this case, I used the video editor to both edit and share a "quickie" video with the rest of our relatives from the East to West Coast. I.e., it seemed the most efficient workflow for the mini-project... SAMPLE VIDEO
    EXAMPLE 2: On the other hand, several yeas ago I was asked to post a "quickie" tutorial showing how to layer audio and video content. As this was a relatively simple project, I used QT 7 Pro for this project. Here is the resulting SAMPLE FILE created while making the tutorial.
    EXAMPLE 3: In cases where the quality of the source file varies drastically—one video being an 80 year old cinema classic and the next a just released blockbuster loaded with special effects—and/or the source files are not "natively" compatible with QT, I prefer HandBrake for its ability to "tweak" settings over a wide range to create "universal" playback files for all mobile devices, local network streaming, and sharing via internet... SAMPLE 1959 TRAILER
    EXAMPLE 4: Lastly, when I simply want to just transcode one or more QT compatible files (for any number of reasons) at the Finder level without having to open a dedicated converter utility, I simply select/highlight the files in the Finder and pass them to the Yosemite/Mavericks operating system for conversion... POCKET RECORDER SAMPLE FILE
    As you can see, you have a myriad of options to choose from depending on your personal preferences, needs, goals, etc. As to H.24/X.264/MPEG-4 AVC, yes I would recommend sticking with any encoder that adheres to the JVT standard since it has become a default Mac system standard and, with different settings, is extremely scaleable with regard to use—i.e., it can handle anything from cellular streaming to Blu-ray or multi-K Hi-Def resolutions. However, for all-purpose use, I stick to High Profile (current mobile, TV, High-Speed Internet compatible) or Main Profile (older mobile device, original TV, lower-speed platform compatible) anamorphic encodes at level 3.1 which nicely covers data rates from less then 100 Kbps up to 14 Mbps or anything most users will ever need.

  • Parallel Processing : Unable to capture return results using RECIEVE

    Hi,
    I am using parallel processing in one of my program and it is working fine but I am not able to collect return results using RECIEVE statement.
    I am using
      CALL FUNCTION <FUNCTION MODULE NAME>
             STARTING NEW TASK TASKNAME DESTINATION IN GROUP DEFAULT_GROUP
             PERFORMING RETURN_INFO ON END OF TASK
    and then in subroutine RETURN_INFO I am using RECEIVE statement.
    My RFC is calling another BAPI and doing explicit commit as well.
    Any pointer will be of great help.
    Regards,
    Deepak Bhalla
    Message was edited by: Deepak Bhalla
    I used the wait command after rfc call and it worked additionally I have used Message switch in Receive statement because RECIEVE statement was returing sy-subrc 2.

    Not sure what's going on here. Possibly a corrupt drive? Or the target drive is full?
    Try running the imagex command manually from a F8 cmd window (in WinPE)
    "\\OCS-MDT\CCBShare$\Tools\X64\imagex.exe" /capture /compress maximum C: "\\OCS-MDT\CCBShare$\Captures\CCB01-8_15_14.wim" "CCB01CDrive" /flags ENTERPRISE
    Keith Garner - Principal Consultant [owner] -
    http://DeploymentLive.com

  • Unable to pause a video using Navigate and UpdateContext in Beta2

    Hello,
    In the Beta1, I had set the DefaultPause property of my VideoPlayer to "videoPause", and I set the OnSelect event of a navigation button to the following statement in order to navigate to the screen "scrHome".
    UpdateContext({videoPause: true});Navigate(scrHome, ScreenTransition!Fade)
    With Beta2, this is not working anymore: the video continues to play when I touch the navigation button.
    I also tried with the following statement, but it does work either.
    Navigate(scrDémos, ScreenTransition!Fade,{videoPause: true})
    Thanks for your help !

    Are you setting the videoPause property to true in the rule you're using to navigate to the video screen? For example, assume you're using a button to navigate to the VideoScreen, its OnSelect property should be: Navigate(VideoScreen, ScreenTransition!Fade,{videoPause:false}).
    Basically, the value needs to change for the video to pause. If you don't have that set up, you could also do that within the rule you're using to navigate to scrHome as follows:  
    UpdateContext({videoPause: false});Navigate(scrHome, ScreenTransition!Fade,{videoPause: true})
    Thanks
    Robin

  • Unable to play youtube videos - using proxy (squid)

    Youtube videos do not play in my configuration. Most youtube content appears, but attempting to play a video results in a popup message "This movie could not be played". Sorry for the length of the post, but I'm trying to get enough documentation down here to save some time for the next person who runs into this.
    My basic network configuration is:
    ipod->wireless-router->squid-proxy->pix->internet
    *I am analyzing logfiles from the proxy and the pix, and I have network traces from the proxy.
    There are 2 issues so far with proxy access from the youtube application on the fw v2.2 ipod touch. After hitting the first issue, I made a call to tech support who pointed me to an older apple discussion thread about a similar issue which indicated the problem could be fixed by "reconfiguring the proxy server", but no details were given in that discussion thread about exactly what needed to be 'reconfigured'. I believe have figured out what was going wrong, and I document it as issue 1 below in case anyone else runs into it.
    Issue 1 (which I managed to get solved) is that the youtube application sends a 'Host:' header pointing to gdata.youtube.com, but the requested url is actually iphone-wu.apple.com. Squid rewrites the 'host' header to iphone-wu.apple.com, and the target server fails the request with a 404. A solution (for squid) is to use a redirector to rewrite these url's to actually go to gdata.youtube.com and to set the 'urlrewrite_hostheader off' value.
    Unfortunately, resolving issue #1 was not sufficient to get youtube off the launch pad:
    Issue 2 (which seems unsolveable at the moment) is that the youtube application is ignoring proxy settings for some of its content requests. In addition to the proxy requirement, I have egress firewalling and logging set up. I observe the youtube application asking for many url's via the proxy and then I observe the egress firewall deny an attempt at a direct access to port 80 on an external server BYPASSING the proxy settings. Without opening up the egress firewall rules (and thereby disable requirement for a proxy), this makes the youtube application inoperative.
    If anyone has some insight on how I can get this working, I'd appreciate it. I will attempt another support call tomorrow with my logfiles in hand...

    Thanks for posting! -- I'm glad the info is helpful to you. There is more that I have been deliberately keeping quiet about while trying to work through a support call that was logged 27-dec-08. Without going into a lot of detail, the support call is still open, and I'm still working on getting a resolution from apple engineering. I hope that by providing this information, my support call doesn't get terminated as having been "solved" - which it most definitely has not been. It is my belief that only a firmware update will fix this.
    (And as an aside ... I've spoken with three or four support reps at apple, and all have been very nice and have tried to help out! I've been quite pleased with the front end to their support org. I just really want to hear that someone has LOOKED at the code and found the error and it will be fixed in a future update!)
    A work-around for the youtube and itunes applet failures is to set your squid up as a transparent proxy. That way, the network accesses that these applets make that attempt to bypass the proxy are hidden and the applets "work".
    I would most certainly appreciate any further corroboration of this misbehavior -- more than one site being able to demonstrate these applets bypassing the proxy would be quite helpful.
    (Note also that the lastest firmware 2.2.1 also exhibits this issue)
    Thanks.

  • Anyone capturing SD video using a firewire card successfully?

    If so, can you please tell me what particular firewire card you have been using. I have just ordered a Belkin Firewire card (Texas instrumwents) on account of my existing firewire card not being able to capture. I have tried changing over to the Legacy driver - still does not work. My specs are:
    Adobe PPro Cs 5.5
    Windows 7 64 ultimate
    12 gigs Ram
    i7 930
    gfx 470 graphics card.
    If anybody else has been having this problem and resolved it, I would love to know. Thanks in advance.

    Hi,
    I have just tried with my old Pana NV- GS200 and it works fine. win 7 64 bit cs5.5. lenovo w701 lap top
    Darren

  • Updated to firefox 4,now unable to download youtube videos using realplayer as i did previous using 3.6?

    when using firefox 3.6 it was fine and the settings in realplayer were set up the same aswell,but since updating to firefox 4 i wont let me download videos still.

    Very easy:
    1) Go to Add-on Mozilla page witch is:
    https://addons.mozilla.org/nl/firefox/?browse=featured
    2) Then choose in the left colom downloadmanager witch is
    https://addons.mozilla.org/nl/firefox/extensions/download-management/
    3) Finally choose Easy You Tube Video or:
    https://addons.mozilla.org/nl/firefox/addon/easy-youtube-video-downl-10137/
    Install the add-on from now on you'll be able to download you're .flv streams.
    How to do this: under the videobox you see thumb up / thumb down, Add to, shair from NOW ON don't use the realplayer tab nolonger
    INSTEAD you use "DOWNLOAD AS"
    https://support.mozilla.com/users/pwreset/9gr2/2y2-121fa565bbd922c391c3

  • Capturing HD Video using JVC BR-HD50

    If anyone has successfully captured HDV via firewire from a JVC Pro BR-HD50, please let me know how you did it as I am dead in the water with this deck. Thanks
    Scott

    Thanks for the quick reply.
    Warren Heaton wrote:
    This usually happens when the capture settings in FCP do not match the settings of the footage on the source tape.
    -Warren
    The FCP settings seem to be allright. Because when capturing form my GY-HD100 camera I don't have any issues (except to some missing frames).
    I'm wondering a bit about the "50" indicator light. Does it say anything about the fps?
    As I don't have an external monitor for my BR-HD50 at the moment I'm not able to switch this setting.
    On the other hand the manual says I should be fine with this setting:
    I also thought about updating the deck's firmware. Which, due to no monitor, is impossible right now.

Maybe you are looking for