Video Capture using VFWCapture

Hi,
I have been looking in the JMStudio source code for a solution to my problem, but no luck so far. Specifically, I have been concentrating on VFWManual, which uses the VFWCapture class and sets the desired format. However, I never can get any video capture when I run the VFWManual class.
Anyway, here's my problem: I have a 4-Port USB hub to which I have attached three cameras. The hub itself is connected to one USB port on the computer. So, the computer only vfw://0 as the single source for all three cameras. Now, the first time I ran JMStudio, it gave me a neat little dialog box titled "Video Source" in which I was allowed to choose between the three cameras. The second time I ran it, it decided to use my previously selected camera but that's a different problem entirely.
Here's my main question: Is there any way I can programatically switch between the cameras connected to the hub? I believe the answer lies in the VFWCapture class, but I don't quite know how to use it. From testing the VFWManual class, I could tell that the dialog which allowing me to choose between cameras was triggered by VFWCapture.capDriverDeviceConnect(). However, since I can't see the source code to VFWCapture, I don't know how those three cameras were found inside VFWCapture.
I have been looking at the tutorials and sample code, and I finally got video capture to work using the DataSourceReader sample code from Sun's JMF website.
Any ideas for programatically switching between those three cameras?
Thanks.

If your cameras do have a TWAIN driver, one
possibility is to use the Java Twain packageI have tried the Java Twain package, but it has the same problem. It views the hub connected to three cameras as one source.
I would prefer JMF because it has a media player, and my theory is that since I could use a JMF GUI to switch between cameras, I should be able to do it programatically. However, this requires inside knowledge about com.sun.media.vfw classes such as VFWCapture.
One thing that really doesn't help is the fact that JMF source code is "temporarily" unavailable to the community. The other thing that doesn't help is that a USB API for Java is in its beginning stages of development.
Any other ideas?
[email protected]

Similar Messages

  • Fcp 4.5 video capture using tiger

    Hi-
    I have a 1.8 GHz dual G5 power mac. I recently upgraded to tiger. Now fcp 4.5 does not recognize the video signal from my external deck. The screen pops up at startup " can't find device". The system was working fine last week before I upgraded to tiger. I also tried iMovie and it captures fine, so it is fcp 4.5 specific. Is there some preference that was changed?
    thanks for your help.
    Ken Zaner

    any ideas ...
    Try the solution. If it doesn't work, start your own thread and tell us EXACTLY what you have done, when you did it and whom you did it with. (pictures optional)
    x

  • What's the quality of video capture using toast 11?

    I just purchased Toast 11 pro and I don't see any mention of controlling, previewing and capturing video from a video camera.
    The reason I would like this feature is that iMovie, while it controls the video camera, it doesn't play the sound when previewing the mini DV tape when capturing. I have to listen for sound through the camera.
    It does keep mentioning that it converts video to "DVD". I think that's a compressed version and not the best quicktime quality.
    I would like to capture video at the highest quality and later, step down the quality to the internet, etc.
    Thank you for any help  in advance-j

    I just purchased Toast 11 pro and I don't see any mention of controlling, previewing and capturing video from a video camera.
    The reason I would like this feature is that iMovie, while it controls the video camera, it doesn't play the sound when previewing the mini DV tape when capturing. I have to listen for sound through the camera.
    It does keep mentioning that it converts video to "DVD". I think that's a compressed version and not the best quicktime quality.
    I would like to capture video at the highest quality and later, step down the quality to the internet, etc.
    Thank you for any help  in advance-j

  • Wifi video capture using TCP/IP protocol in LabView

    i have designed a robot with a camera and i am trying to control it using LabView. I am using TCP/IP communication protocol (My robot has wifi card for communication, IP: 169.254.0.20)... i am able to control the motor and make my robot moves in any specified direction but i am not able to acquire video from the camera. i have installed NI vision drivers but still i am not able to aquire video. is there any IMAQ wifi driver available. if not, is there any other logic to aquire continious video from a camera using tcp/ip?
    i am using LabView 8.6
    wifi: private IP 169.254.0.20
    Attachments:
    robo.vi ‏9 KB

    Without knowing the specifics of the camera you are working with it is impossible to give you advice on what your code needs to do. For instance, to obtain an image do you connect to the camera or does the camera expect to connect to a server? If you connect to the camera is there a specific protocol you need to use to request the image? Generally in networking there is some application layer protocol required for two devices to communicate with each other.
    I don't have much expereince with IMAQ itself to answer your question as to whether there are VIs that already do this or not.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • RecordControl for Video Capture

    Hi,
    I have encountered problem capturing video using J2ME toolkit, and need help on this area. Thanks!
    I have the following sample code from web:
    output= new ByteArrayOutputStream();
    rc = (RecordControl)player.getControl("RecordControl");
    rc.setRecordStream(output)
    rc.startRecord();
    the problem is nullexception at the setRecordStream line.
    Can we actually carry out video capture using J2ME toolkit or need other emulator?
    Pls advice, Thanks for helps !

    This is a bit strange with apple servers today. For some strange reason, there seems to be a 5-10 min. delay in my post on this one thread only ....very weird.
    Oh well, I'll post the info again in hope that it sticks ....
    You can capture to iMovie which is what I suggest or directly to iDVD6 (via 1 step or magic iDVD). Your choice.

  • Can you make a screen capture using PS?

    I wanted to know if I can make a screen capture using Photoshop cs5.5 or do I have to use software such as Snag It?
    Thanks
    Barbara

    Hello, Kar209. Photoshop is an image editing software, it cannot do screen or video screen captures.
    There are dedicated software for that purpose, here is a link I found on google: http://www.ezvid.com/top_5_free_video_capture_software_for_windows
    On a Macintosh, it is possible to do a video capture using the built-in quicktime. https://www.google.com/search?q=capture+video+quicktime

  • Ge4Ti4200 VTD8X 128 -video capture..audio pickup?

    I am setting up my Ge4Ti4200 card for video capture using my VCR as the video input. I want to put VCR video onto CDs. I need to know how to set it up so that the audio is captured along with the video. There is  nothing in the manual or that I can find in the forums about this. Does the card capture both sound and picture?

    Get an RCA to Mini plug adaptor and plug audio into your microphone jack.  

  • Changing Resolution of webcam video capture: The captfoss method.

    Hello,
    *'captfoss'* proposed a method to change the resolution of video captured using webcam in [this post|http://forums.sun.com/thread.jspa?messageID=10596731#10596731] . Then I posted a working example in the same thread which used the same method to change resolution to 640x480. Here in this post I just want to post the actual method which makes the resolution ( infact format) changing possible. This method takes the DataSource and the target Format as parameters and returns true/false on the success/failure of format change. The method is as follows:
    public boolean requestCaptureFormat(Format requested_format, DataSource ds) {
            if (ds instanceof CaptureDevice) {
                FormatControl[] fcs = ((CaptureDevice) ds).getFormatControls();
                for (FormatControl fc : fcs) {
                    Format[] formats = ((FormatControl) fc).getSupportedFormats();
                    for (Format format : formats) {
                        if (requested_format.matches(format)) {
                            ((FormatControl) fc).setFormat(format);
                            return true;
            return false;
        }To know the explanation of this method in depth, please click the link of the post. I believe it would not be difficult to understand once you have read that post. Here is the link of that post again:[http://forums.sun.com/thread.jspa?messageID=10596731#10596731].
    Using that method, I have made a small utility which allows you to capture in all the supported formats (of webcam). That is meant for demonstration only and I am going to post it in next post (maybe next 2 posts if it exceeds character limit).
    Any suggestions to improve the utility would be appreciated. I confess that it is not the best and requires improvements. But it serves its purpose, i.e. demonstration, successfully.
    Enjoy!! :-)
    Once again thanks to captfoss, I request him to post in this thread to take the 5 dukes I am going to assign to this topic ;)
    Thanks!

    Here is the code: (in two posts)
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Vector;
    import javax.media.*;
    import javax.media.control.FormatControl;
    import javax.media.protocol.*;
    import javax.swing.*;
    * @author captfoss & TBM
    public class ChangeResolution extends JFrame implements ControllerListener {
        Player p;
        DataSource ds;
        JComboBox combo;
        JPanel vidPanel;
        public ChangeResolution() {
            super("Resolution Change, by captfoss and TBM");
            Manager.setHint(Manager.LIGHTWEIGHT_RENDERER, true);
            try {
                ds = Manager.createDataSource(new MediaLocator("vfw://0"));
                p = Manager.createPlayer(ds);
            } catch (Exception ex) {
                ex.printStackTrace();
            p.addControllerListener(this);
            p.realize();
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            vidPanel = new JPanel(new BorderLayout());
            vidPanel.setBackground(new Color(250,230,250));
        private void populateCombo() {
            Vector<Format> allFormats = new Vector<Format>();
            if (ds instanceof CaptureDevice) {
                FormatControl[] fcs = ((CaptureDevice) ds).getFormatControls();
                for (FormatControl fc : fcs) {
                    Format[] formats = ((FormatControl) fc).getSupportedFormats();
                    for (Format format : formats) {
                        allFormats.add(format);
            combo = new JComboBox(allFormats);
            combo.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    new Thread(new Runnable() {
                        public void run() {
                            vidPanel.removeAll();
                            vidPanel.revalidate();
                            JLabel lab=new JLabel("<html><center><font color=\"red\">Wait for a while...</font><br/>" +
                                    "<b><font color=\"green\">Format Changing...</font></b><br/>" +
                                    "<i>You are using a free open source 'Webcam Resolution Change utility', <u>meant for " +
                                    "demonstration only</u>, by:</br>" +
                                    "<font color=\"blue\"> captfoss and T.B.M</i></font><br/>" +
                                    "<font size=+1 color=\"green\"><b>ENJOY!!</b></font></center></html>");
                            lab.setHorizontalAlignment(JLabel.CENTER);
                            vidPanel.add(lab,BorderLayout.CENTER);
                            vidPanel.validate();
                            p.stop();
                            p.close();
                            try {
                                ds = Manager.createDataSource(new MediaLocator("vfw://0"));
                            } catch (Exception ex) {
                                ex.printStackTrace();
                            requestCaptureFormat((Format) combo.getSelectedItem(), ds);
                            p = null;
                            try {
                                p = Manager.createPlayer(ds);
                            } catch (Exception ex) {
                                ex.printStackTrace();
                            p.addControllerListener(ChangeResolution.this);
                            p.realize();
                    }).start();
        }Continued in next post....

  • TV@ Plus, what video capture settings to use?

     I have a TV@ Plus and am unsure what video capture settings to use. I've had it for several months and solved my audio problems and need to know what Video Input Format, Capture Format (Profile), Capture - Size, Quality, Bit Rate and Audio Format settings to use. Should I use the same settings for all input sources or do I use different settings for CATV and S-video inputs? It seems to be OK with my current settings as far as capture and playback goes, I'm OK on the hardware part but with tech detatails I'm a bit  .
     I will be using it to capture from CATV, DVD and VCR input sources for later recording to DVD's. I use a GoDVD! CT-2 connected to the S-video input for recording Macrovision protected media to the HDD.
     My computer sound is monitor mounted stereo speakers.
     Thanks in advance for any helpful replies.

    Quote from: HenryW on 12-September-06, 04:25:48
    I have a TV@ Plus and am unsure what video capture settings to use. I've had it for several months and solved my audio problems and need to know what Video Input Format, Capture Format (Profile), Capture - Size, Quality, Bit Rate and Audio Format settings to use.
    I already had transferred and converted some of my old VHS and VCD movie collections into DVDs (using Composite Input).
    The higher the bit rate the better quality video output you will have - but bigger file size.
    To give you an example:
    A 2 hour video captured on MPEG set at 4000/bps will be translated it to 3.58GB. More than enough to be written on a 4.7 DVD.
    For audio bit rates, you can choose from 128/bps to 224/bps. As for me I set it to 224/bps. Again the bigger bit rates the better audio output. And don't forget to slide up the audio record level to 100%. That will give you a better and clearer recorded audio output.

  • How to fix audio  of a video captured from DV output of camcorder using Adobe Premiere Elements 8?

    Hello,
    I purchased Adobe Premiere Elements 8 about one week ago.  I installed it and everything seem to work well in my first project.  I am new at editing videos but I was succesful in testing it by loading an existing video file in avi format from my computer and then doing some very basic editing (I splitted 2 scenes and added a title). 
    After my first succesful project (described above) I started a brand new project. Here, I want to capture a one hour video  from the dv output of a video camera. So I connected the camera to the PC and then started adobe elements 8.  Before starting the capture I only checked the boxes that said "capture video" and "capture audio" (the other 2 boxes that said download to timeline and autoanalyze were left unchecked).  After that I started the capture process.
    After the video capture was completed, a small window opened at the bottom saying that a PEAK FILE was being generated.    After the peak file generation finished, I looked at the captured video.  The video looked perfect.  However the audio of the video was too fast. By this, I mean that the voices of the people in the movie were like they were speaking at more than twice the normal speed.  Or to explain it in a different way, they sounded like the  chipmunks.
    So now I come to the question of this thread I started.  Is there a way that I can fix the audio part of the video I captured?  I will appreciate any help on this. Below I listed a few additional details in case this is needed.
    Thanks,
    ronel_8
    PS.  Here are some more details about my system:
    1) Operating System: Windows XP
    2) I am capturing the video on an external drive with 40 GB of available space. The external drive is connected to a PC via a USB connection.
    3) Computer CPU: 2.4 GHZ
    4) Computer RAM: 1.25 GB
    5) Video tape is about one hour long.

    Hello Bill and Steve,
    Your responses are very helpful.  Although I was not able to fix the problem yet I do seem to think from what you both say that my system may be too slow to capture the one hour video. In any case I will copy below more details about the system as you requested:
    1) Results from running Gspot:
    The audio section of the Gspot window was blank. That is, no information was there.  The File and Container sections say:
    File Size: 12.6 GB
    Note: 7.63 GB unneeded bytes at the end of the file
    DV Type1 AVI
    2) I did run the Gspot on another good avi file (captured to the PC with same camcorder) and says:
    Codec PCM Audio
    32kHz 1024 kb/s tot (2 chnls).
    I suppose these are the audio settings from the camera.
    3) Yes, I am capturing video from a miniDV camcorder (JVC GR-D70U).
    4) I did not defragment the external drive prior to capturing the video with the audi problem.  So I will give that I try and see if it solves the problem.
    5) The external drive I am using is formatted to NTFS.
    6) The computer is a Dell Dimension 2400, CPU: 2.4 GHZ, RAM: 1.25 GB
    7) HDD Size=74GB and 11 GB of free space.  But I am downloading video to external drive that has 60 GB free space.
    One last piece of information that may be useful.  If I open the AVI file (that I captured with Adobe Premiere Elements) with Windows Media Player, the audi sounds good.  However if I open it with Adobe it has the problem I mentioned in my previous e-mail.
    I'll aprreciate any further hints.
    Thanks again,
    ronel_8

  • Video capture stops when connected to FCP using fire wire

    Captured video using Sony VX2000 using 48 khz and 16 bit audio stereo mode. Using Sony Premium miniDV tapes.
    Video plays back fine when not connected via firewire to G4 dual 867 with 2 GB Ram.
    Using default capture preset of 48 khz 16 bit, connect fire wire and video capture randomly stops stating it has lost connection or is missing capture data. If I switch to just plain capture using non controllable device, I have the same issue except the tape keeps playing but FCP stops capturing.
    Tried other tapes and no problem.
    Tried other fire wire cable and no problem.
    I am having problems only on this tape and when connected.
    When not connected it plays back on the camera with no stopping.
    Steve Bowers

    To answer your questions--
    Dumping preferences usually does not cause problems. More likely you updated some part of your system or are having other hardware issues.
    No updates or hardware issues. The original problem (discussed in another thread) was one where the video is skewed inward on the lower right corner. Apple instructed me to dump the preferences and start from scratch. That I did and now I am experiencing problems I did not have before. If it is hardware problems, then I guess it is just coincidental that FCP is just now presenting problems. However, the other problems I am having are software related and does not involve the camera.
    What software versions of FCP, OSX and QT are you running and have you updated any of them recently?
    FCP version-5.1.2
    OSX-10.4.8
    QT-7.1.3
    Is there anything special about the 'difficult' tape?
    No.
    Did you record it?
    Yes
    Was it the last of a bunch?
    Not sure. I buy bulk so this was one in a box of 5 that is was in a case of 50 boxes.
    Are you using the same camera as the playback device?
    Yes
    Does it work if you use another computer?
    Not sure what you mean. I have only one MAC G4.
    Was it recorded using another camera in a non-DV format?
    No. Playback is through same camera is was recorded on.

  • After using video capture device to copy VHS to DVD, burnt DVD will play on computer but not

    After using video capture device to copy VHS to DVD, burnt DVD will play on computer but not on DVD player. Tech support for the VCD said my HP DVD burning software has to burn "DVD Video and not DVD data" and to check with HP. How can i check myself.

    Grahamster, welcome to the forum.
    I recommend trying CDBurnerXP for burning video CD's.  I have been using it for years without a glitch.  I use it mainly for burning ISO's, but have used it for all types.  Please let us know if it works or not.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

  • What video capture card are you using? Do you like it?

    Hi there. I'm going to purchase a video capture card so I can feed my camcorder, vcr etc. into my iBook. I want to know what people are using and how they like it. DO you use firewire or USB? etc.

    iMovie (and Final Cut) expect video via FireWire.
    If you select a video over USB solution you will need to find a Mac compatible software application to read and recognize it.

  • I am attempting to convert 8mm video cassettes to dvd using a video cassette player, elgato video capture with rca/usb connections to the mac, editing in imovie and burning on idvd. The picture quality is awful. What can I do?????

    I am attempting to convert 8mm video cassettes to dvd using a video cassette player, elgato video capture with rca/usb connections to the mac then editing in imovie and burning dvd-r using idvd. The picture quality is awful. What can I do??????

    At what point is the video quality bad?  Is it bad on capture?  I would recommend using an s-video 1394 firewire converter instead.  They capture the video at a higher bit rate.  If you have a lot of 8mm tapes to capture, invest in a stand alone DVD recorder.  They capture and compress in one shot.  If you need to rip it back from the DVD into iMovie again, I would recommend using DVDxDV.

  • 4600 video capturing stuttering on picture using mpeg

    Good afternoon.
    I'm new to video capturing but seem to have a bit of a problem. I can capture fine in the bundled WinProducer when I use the AVI setting but it generates some rather large files, 300meg/minute or so. When i set it to capture at the mpeg setting it does the audio fine but the picture is stop/start, plays a second pauses a while plays a bit more etc while the audio merrily carries on without a problem.
    Would anyone have an idea on what I might have set wrong etc please?
    Thanks.

    Quote
    Originally posted by Hypacharry
    Good afternoon.
    I'm new to video capturing but seem to have a bit of a problem. I can capture fine in the bundled WinProducer when I use the AVI setting but it generates some rather large files, 300meg/minute or so. When i set it to capture at the mpeg setting it does the audio fine but the picture is stop/start, plays a second pauses a while plays a bit more etc while the audio merrily carries on without a problem.
    Would anyone have an idea on what I might have set wrong etc please?
    Thanks.
    Good Morning.
    I can tell you many things about your problem:
    1- what chipsets do you have??
    AMD (above 760 (762 & 768  ) and Intel (almost everything above 815) will work fine (smooth i´d say), but ALI, SIS and VIA won´t do the job.
    2- You have to pay attention to the  encoder card you are using ( if using one)
    Matrox capturers are very conflictive  X(  (so don´t use matrox) instead use another video capturer
    3- How much memory are using?
    above 512 Mb should work
    4- have you ever considered forming an array?
    it will increase your data I/O
    5- pay attention to the order of the cards on the pci slots
    Some cards have to be in a specific order.
    6- what OS are you using???
    W2k pro & Wxp pro are good for the job you are intending to (you should think to move to one of them)
    7-If you want to have good video quality, you must think in buying an encoder, no matters how fast your Geforce is, at the end it won´t substitute a video encoder card
     ) (hope this can help you with your problem)
    good luck!

Maybe you are looking for

  • Connect Iphone 3GS to Ipad

    Hi all I can't connect my Iphone 3GS (with iOS 4.3 software) to ipad, using bluetooth connection. My ipad is the old version, without wi-fi. Thank's for your answers fabio

  • UnJar a .JAR file

    Hello! Im tring to unjar a .JAR file to view its sourcecode. Is this possible and if it is how do i do it? Thanks

  • Black screen instead of entertainment cen

    Does anyone know why i can't see the Entertainment center on my moniter? It's running, but when i select the program it goes to a black screen. When I alt-tab back to the desktop i can see the Entertainment center main screen for a split second. Anyo

  • FCP: Capturing 120 fps slo-mo?

    A friend has a Canon camera and has shot some 120 fps video. It looks gorgeous in the camera. How can this be imported in FCP? Don't see frame rates that high for capture.... thanx!

  • NOT Bound error for Zfield added through AET

    Hi. We added a Zfield through AET in the Account overview screen of IC Web UI. The same field we added in the Account Identification screen of IC Web UI. Account Overview screen its showing as enabled mode and its working fine. but in Identify accoun