Image Capture problem (empty image)

Hi, I'm new to JMF and I read some of the tutorial of JMF. then I try with the image capture program but no luck, it is not success. I was able to compile the program and success to get an empty picture. The picture is blank when using.

Here is my code so hopefully I can get some advice on this. Thank you


public class imageCapture extends Panel implements ActionListener {

public static player player = null;
public CaptureDeviceInfo di = null;
public MediaLocator ml = null;
public static buffer buf = null;
public static Image img = null;
public VideoFormat vf = null;
public static BufferToImage btoi = null;

public imageCapture()
{

String str1 = "vfw:Microsoft WDM Capture of Image (Win32): 0;
di = CaptureDeviceManager.getDevice (str1);
ml = di.getLocator ();

Try
{
Player = Manager.createRealizedPlayer (ml);
Player.Start ();
Model of component;

If ((comp = player.getVisualComponent ())! = null)
{
Add (COMP);
}

}
catch (System.Exception e)
{
}
}

Public Shared Sub main (String [] args)
{

imgc imageCapture = new imageCapture();


Take a frame
FrameGrabbingControl: fgc = player.getControl("javax.media.control.FrameGrabbingControl") (FrameGrabbingControl);
buf = fgc.grabFrame ();
Convert it to an image
btoi = new BufferToImage ((VideoFormat) buf.getFormat ());
IMG = btoi.createImage (buf);
Save the image
saveJPG(img,"c:\\pic123.jpg");

Player.Close ();

}

public static void saveJPG (Image img, String s)
{
BufferedImage bi = new BufferedImage (500, 400, BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = bi.createGraphics ();
G2. DrawImage (img, null, null);

FileOutputStream out = null;
Try
{
out = new FileOutputStream (s);
}
catch (java.io.FileNotFoundException io)
{
System.out.println ("file not found");
}

Encoder JPEGImageEncoder is (out) JPEGCodec.createJPEGEncoder;.
JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam (bi);
param.setQuality(0.5f,false);
encoder.setJPEGEncodeParam (param);

Try
{
Encoder.Encode (BI);
out. Close();
}
catch (java.io.IOException e/s)
{
System.out.println ("IOException");
}
}

public void actionPerformed (ActionEvent e) {}
throw new UnsupportedOperationException ("not yet supported.");
}
}

Can be any number of things... most likely, he's just trying to capture an image until the webcam is installed and running.

Try to put in a pending state (thread.currentthread.sleep) once you start the player to wait for, say, 5 seconds... see if this changes the output.

Tags: Java

Similar Questions

  • I'm having a problem, empty the trash

    I'm having a problem emptying the trash. I have downloaded microsoft fix. This cleared up all the other problems with my computer except the Recycle Bin.

    I got it fix executed yesterday from 09:00 to 23:00 last night just on this one issue. The green bar moving across the screen to indicate that something was happening. However at 11 pm last night, I had to shutt off the PC. No idea what elese I can try that the computer runs pretty slow.

    There is nothing showing in the trash when I click on explore but when I put in the cell some files I didn't, but there was still nothing showin in the tray. I checked the properties to make sure that the parameter was not set to remove permentally, which was set to normal of any idea

    Hello

    Follow these steps to remove corruption and missing/damaged file system repair or replacement.

    Run DiskCleanup - start - all programs - Accessories - System Tools - Disk Cleanup

    Start - type in the search box - find command top - RIGHT CLICK – RUN AS ADMIN

    sfc/scannow

    How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
    generates in Windows Vista cbs.log
    http://support.Microsoft.com/kb/928228

    Then, run checkdisk - schedule it to run at next boot, then apply OK your way out, then restart.

    How to run the check disk at startup in Vista
    http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html

    =================================

    After the foregoing:

    How to repair a trash corrupted in Windows 7 and Windows Vista
    http://www.Winhelponline.com/blog/fix-corrupted-Recycle-Bin-Windows-7-Vista/

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • Capture problems with the Portege M200

    Hi, I have developed a directshow application which captures the screen and stores it in a movie file. It has filter to capture-> WMVideo encoder DMO-> Avi MUX-> burner leader. The application works fine in the Toshiba protégé 3500 Series with trident video accelerator on this card. But it does not work on Toshiba protégé M200 machine with NVIDIA GeForce 5200 video on that card. Basically, the application captures one image.

    If I remove the compressor filter it captures so correctly. I want to know what is wrong with the machine. With encodre why there is not capture. I tried on other machines with NVIDIA video card series and it won't work as well. Why is it so?

    Hello

    Well, maybe your application has a bug?
    Unfortunately, I m not programmer or application developer and I can't solve this problem. Sorry, but I don't think that you will find here the answer to you question because most of the users are users of laptops Toshiba common not a developer of applications. :(
    Good luck

    Good bye

  • CS5 Capture problem with SONY HVR - M15U FW800 and pre-roll

    Well, so I'm running with first CS5 on a MacPro4, 1 (2.26 GHz 8 Core Intel) with the GTX 285 card. I'm saving my money for the AJA cards, but so far, I use my trusty bridge MVR-M15U of SONY HDV via FireWire 800. It has served me well in Final Cut for the last two years, but with the first, it is as if he cannot capture anything.

    The problem is that, while the bridge is put in position for the pre-roll advertising, it's like he can not figure out how to slow down the advancement of the image and he tries constantly to make fast forward position and at the point where the band stops, he drove past that 10, 15 or even 20 second pre-roll position. So when he tries to save, he pulls back even further and it goes back like a tennis ball until it gives up.

    With Final Cut I tested it and it works fine on a framework of pre-roll 10, 15 and 20 second, so I'm capture with Final Cut and editing in first, but it would be nice to capture both in the first. :-)

    It's the same thing on DV or HDV footage so far only on miniDV cassettes as I have no DVCAM cassettes to test with.

    Any ideas?

    -J

    The problem is that all tape based cameras and bridges ONLY use FW400. There are no cameras or decks with FW800 anywhere in this galaxy, or nearby.

  • Video Capture problem

    Hello, I posted the following in Photoshop Elements group, and it was suggested I post here instead, so here is...

    I use a trial version of Photoshop Elements 7.0 (with about 3 weeks before I have to buy or lose it to the left).

    It seems that I'm having a problem of image of my video device Dazzle DVC100 capture

    File > import > Dazzle DVC video peripheral

    The video appears in the window, but I get the following error message when I click on the button "capture":

    "Current driver incorrect STI detected for the video capture device, please re - install the driver."

    I have re-installed all drivers from the manufacturer, twice from disk and once more after you download the drivers from the website of the manufacturer (in case something is wrong on the software CD).  I also reinstalled the program Photoshop with a new copy of the program to download.

    The device works fine in other software programs.  I guess I was able to capture the video in one of them then work with images in Photoshop Elements but I would like to know if this "bug" can be solved somehow.

    My old days of Pinnacle forum, I remember nothing else problems, even with the Pinnacle software. I don't remember everything posted a question never able to do a glare.

    Now, I have to admit that there were probably millions of people who did and never had the Forum. Yet, all the failures indicated that it was not a good camera, when I went looking for an A - D option.

    Hunt

  • Satellite Pro A60 video Capture problems

    I have the following system:

    Toshiba A60 laptop Pro satellite
    CPU - AMD 2.8 Ghz
    RAM - 768 MB
    OS - XP Pro SP2

    All other system requirements as indicated by the Dazzle DVC90 USB 2.0 capture card are met.

    I use Pinnacle Studio 9.4 update to capture VCR.

    Problem:

    When I plug the DVC90 to my laptop, I get nothing on the preview window. I have it set to capture as quality DVD Mpeg. But I don't see a gray screen when I look at the overview. I click start capture, the timer starts but no capture is made, either by audio or video.

    I checked all the settings. They all seem to be fine. My friend tried the capture card USB with exactly the same settings and connection on his desktop PC and it worked perfectly. The specification of his PC is similar to my laptop. Is it a familiar fault with video capture on laptops?

    I'd appreciate it if someone could help me with these problems.

    Thank you very much

    Alex

    Hi Alex,

    Have you checked in your Pinnacle capture settings that is not failing to the incorrect entry (rather than Composite, S-video). Obviously the value specified must match your connectivity of material allowing to receive a video signal.

    I think that it is also possible to disable the capture preview screen to minimize the risk of frame drops. Please check that you have the active video preview.

    HTH

  • Video Capture problems

    I have a problem of capture video analog (composite connections). I have a new Gateway LX6810 PC.  He dad 8 Gig of ram, Vista home premium 64-bit and an Avermedia M791 PCIe Combo card.  I installed the latest drivers for the acquisition card and the latest updates for Arcsoft Showbiz DVD2. When I try to capture analog video, I get an error screen stating "device is not available or is being used by another application.  If I try to install Media Center, which I don't want to use it see the composite connection and get a preview of the video.

    How can I get rid of the error and use the compsite connections to capture video from a VCR?

    Thank you

    I did the ' startup clena process.  Ended up having non-microsoft services disabled and cannot yet capture video.

    I think it is perhaps time to research and buy a new capture card that is 100% capatible with Vista Home Premium 64-bit OS.

    I appreciate your time to try to help to solve this problem.

    Curt

  • First Pro CC is fragile? analog capture problems.

    I have CC PP on a 64-bit Windows 7 computer. Sufficient RAM, gpu inadequate. (Old nvidia quadro). I work in PS and LR for years and had a video project (marriage of the daughter). I need analog capture. I used a grass Valley converter plugged into Firewire. I installed CC PP. I ran it.

    Good news: the interface and the workflow look familiar and good.

    Bad news: when capturing, it closed upward. Task Manager-force reboot.

    Better news: I have disabled hardware acceleration. and capture worked. Some frames lost, a good no sound.

    Bad news: after the capture of 40 minutes in some clips. I clicked on the lower left corner to view the screenshots. PP then closed abruptly. I opened it and the clips have been shortened to two minutes each. I assumed that PP works with a record of work with memory and finally wrote a finished file.

    So far, I worked on the 'edge' of the PP with an older video card. Premiere Pro is fragile? I don't mind of error messages but the collapse suddenly a system and job loss is downright sad. I can invest time and money to get it going. but...

    I will turn off the acceleration of software and try again. I will walk away from the computer until it is made with no multitasking. Will it be enough?

    As far as I know, body continues to capture when the program loses the "focus" on the capture screen... then do NOTHING else

    http://helpx.Adobe.com/Premiere-Pro/KB/cant-capture-DV-HDV-video.html

    - and more info on Windows http://forums.adobe.com/message/4708997

    -Legacy driver http://www.studio1productions.com/Articles/Firewire-1.htm

    -All versions of Windows from 7 to 10 need legacy driver!

    I have NOT used, but many say to try this for the HDV capture

    -Archived at http://www.videohelp.com/tools/HDVSplit

    -Click the link 1 slot "download sites:" for the latest version

    I have NOT used either, but many say to try these for SD capture http://windv.mourek.cz/ or http://www.exsate.com/products/dvcapture/

    I used http://www.scenalyzer.com/ and it works well, but breaks capture pieces 4Gig

    -which was not a problem for me, since his arrival at the 4Gig on the timeline files works well

  • Download YouTube video problem - empty section at the bottom of the video

    Hi all

    I am trying to load a video on youtube of a video screen capture (Blacksmith), but every time I download the entire video has been vertically shifter by about 20%, leaving white areas to black background.  Any idea on how to sort this?

    see you soon

    Peter

    Peter

    Have you read the recent thread of Cubicleslave2 on the experiences with the film Bandicam?

    http://forums.Adobe.com/thread/1204417?TSTART=0

    What is your 11 first predefined project items? Are you or the program of putting in?

    Assuming that before you upload to YouTube from within first elements 11 publish + share/Online/YouTube AND your rendered timeline playback seems correct, so I think that this is the problem:

    a. you have video 1280 x 720 (16:9) and you settle for the YouTube Presets: = what is there, no doubt Flash Video to YouTube which is 640 x 480 4:3 @ 30 frames per second.

    So first thing to try is to download using Presets = High Definition Video to YouTube which represents 1920 x 1080 16:9.

    If this does not work, we discover other possibilities, including exporters of the chronology of a saved file on the hard drive of the computer and then download on YouTube website, not first elements 11 and its publication + share/Online/YouTube.

    We will follow to your results.

    Thank you.

    RTA

  • Capture problem

    Recently I started having a problem when capturing a mini DV footage from a camcorder via firewire.

    No apparent reason the capture process suddenly stops and I get a message on the screen saying: "loss of the connection to the device.

    This does not always happen, and when it happens it can be anywhere in the reading, sometimes early, sometimes in the middle or worse yet near the end.

    I use CS3 and have used absolutely no problem for over 2 years.

    I tried to use different camcorders to capture, but it does not seem to make a difference.

    Can someone counsel what could be the cause and how to fix?

    Brian

    Brian,

    Even if this has worked for me on Chrome, here's the full URL - http://forums.adobe.com/thread/770569?tstart=30

    Not sure if John T. linked to it, or perhaps evil Millard original message on this problem. As I said to you, 'new & improved' forum doesn't let me see other messages to check. Whatever it is, we should give you what you need to check on the FW driver, even if you copy and paste in your browser.

    Good luck and I hope it is everything that is wrong.

    Hunt

  • Capture problems with the Vixia HV30

    Hi all

    I fought for hours to get the Premiere Pro CS5 to capture video from a camcorder, Canon Vixia HV30 (1080i, uses miniDV tapes).  A camera via HDMI connection has no effect (no control, no option to select HDMI for input), so all my attempts have been through the IEEE 1394 (Fire Wire) connection.  Regardless of what I try, I get a message "Capture Offline device".

    The project is implemented with HDV as the capture format in 1080i, 30 frames per second.  Sometimes, when I go to the tab settings in the Capture window, and then click Options under the control of the device, he says even the camera as 'detected '.  Other times it lists the camera as "offline".  Quite frankly, I can't deduct more reason why it is connected sometimes and other times offline.

    When I go to "Devices and printers" in the Win7 start menu, the Vixia HV30 is listed as a device (when it is connected and turned on of course).  That tells me that the computer, at least, can see the camera, and the problem is most likely in the software.

    Questions that I tried to solve this problem include several reboots, a relocation complete software and countless settings of the device control options.  Nothing works.  Therefore, I now turn to someone of you all who know what kind of things better than me.

    In addition to this survey, I am hunting for the software supplied with the camcorder, in the hope that I can capture video in this way and import it in first.  Still... I paid a lot of money for this professional program, and I would not think that some cheap Canon programs can cannot this as Adobe (so far).

    See you soon,.


    Erik

    99% of the cases where people have problems with the plug, especially Canon Vixia line, it boils down to:

    1. problem with the firewire driver Windows. You must install the driver "Heritage." Around 60-70%

    2 camera ajust. About 20-25%

    3. defective cable or port FW or operator error. The rest of the case.

    If and that's a big if, the driver is correctly installed and the camera is configured correctly and you are sure that you have is no OE, then you can try to capture with for HDV HDVSplit or Scenalyzer to DV material, which allows to see.

    You can also do a search here, there have been dozens of discussions on this matter, that is why the figures of the above experience.

  • capture problems canon hv30 hdv

    Using cs5 production suite on new computer with vista ultimate 64-bit.  have i-7 processor, 12 GB of ddr3 ram nvidia 1700gpu fx.  When you are trying to capture hdv from canon hv30 series button is grayed out.  Project and footage panels are both set to hdv 1440 x 1080.  capture contols the camcorder for all orders except recording.  I downloaded the latest update of nvidia.  If the project and the sequence is set up for dv, everything works fine, but why do that when the tape is hdv quallity?  I use firewire camcorder to the computer.  I contacted canon and responded that it is not the camcorder.  I've not found anyway, contact adobe.  So, I need help from anyone who may have a solution.

    Ron

    Maybe try this - in Windows Control Panel go to AutoPlay - in the digital device drop down together he "Ask Me every time" - perhaps reboot the machine (optional) try to connect the camera and turn it on - when Windows gives you the Select Organization dialog box. I have no experience with this problem, but I'm just trying to offer you the opportunity to maybe get where you want to be.

    Also make sure that your device is set to send in the menu of HDV cameras.

    Good luck.

  • Cursor in the electronic capture problem

    When I go in the mail, everything seems normal.  I can read and switch from one to the other without a problem.

    When I try to compose a message (or reply or forward) I put the cursor is placed at the top.  As soon as I hit a key or click the mouse line typing down 4 lines.  I can't go back to type where the cursor is.

    So when I finish or cancel the message there is an area gray on the top few lines of electronic mail.  If I click with the mouse it shows active and 4 lines down.

    I think not all the settings of the mouse that would make a difference I can't find the email settings that he would change.

    I have a Pavilion of 500-164 and have updated to windows 8, 1.  The problem does not occur in a regular Yahoo email account or is it on an account Excite.com.  Also, it does not appear using Microsoft Office programs, or any other place.

    Solutions or things to check?

    After hours of changing the settings, I first found the solution by downloading Chrome and no longer had the problem.  I then went back to Internet Explorer and compatibility view... problem solved.

    My plan is to continue with Internet Explorer and Chrome in my "back pocket".

  • CSS problem - empty space at the top of page

    Hi guys, I wonder if maybe someone can see what I did wrong please...  I use Dreamwweaver CC and worked on a few test pages to create a new site, and in some way, I changed without knowing something in the css which means there are now a few inches of white space at the top of the site, above my logo - while the original model fits comfortably up to near the top of the page.    (Problem page - http://www.baseballhypnosis.com/running/mental-training-articles/index.php / Original model - http://www.baseballhypnosis.com/new/running/index.php ).    Any thoughts would be greatly appreciated!  Thank you, Craig T



    In custom.css, line 439, remove body {padding-top: 135px}

  • Capture documents Oracle + distributed capture - problem with authentication

    Hello

    I installed on a system win 2008 r2 std odc. The host is in AD domain. Oracle worm 11.2.0.1.0 database has been installed locally on the same host as the odc oddc on account of AD ODC_ADMIN I have initialized the database and in the Panel of the user of the odc, I have a user - ODC_ADMIN (displayed as \\DOMAIN\ODC_ADMIN). When I want to add a new user who could access odc app I don't see the domain name in the add a user window. I can add a user or group, but it is then added as \\\TEST or with 3 backslashes and of cource then left no to authenticate in odc or other components.


    Anyone know what causes this problem?

    Someone at - it the solution to this problem?

Maybe you are looking for

  • How can I remove my iphone 5s icloud?

    There is a problem in my iphone 5 s. How can I remove icloud lock?

  • Reception of sms on my Skype number.

    Hello I have a Skype number. I need to get SMS messages to any mobile number. Is there any improvement in the reception of sms (SMS) to any mobile in the future? Thank you

  • Threatened by my ex father

    Hello everyone. On 22.03.2016, I was threatened by my ex father. He said he's going to kill me. The thing happened like that. My friend and I argued about something, and one night, a friend told me to spend my one * to Skype or he'll f * k me. I went

  • Satellite M40x - repeated beeping during post

    Hi guys. I have this problem. When I turn on my laptop, as soon as he gets to the Toshiba Logo screen it freezes and starts a repeated short beep lasts forever. I learned that a key has been blocked, so I tried to press some keys in case they return

  • Re: NB200 - 10 p Overclock

    Hello. I need help overclocking my Toshiba Nb200 - 10 p. I tried to overclock with SetFSB but it did not work. I managed to find some information and his chip is supposed to be * SLG8SP556V * is not in SetFSB. The closest is * SLG8SP513V * but when I