Play video from video capture device

I tried fixing my running of out memory for the video buffers problem but could find a fix. I have tried code from a book and it doesn't work. I can only get the video feed to display the video from the capture device using JMStudio, so the device works fine. Maybe my coding methodology/process is incorrect.
Is there anyone out there that knows of some working code that plays live video in a window from a video capture device. Any other help regarding to displaying capture video would help. Please help.
Thanks in advance.

I am using the Belkin USB VideoBus II and it uses the video for windows drivers (vfw), so yet it is supported. And it works when I use JMStudio to play the live feed from the capture device. Thanks for the suggestion.
I also ran the code suggested above and I still get the same errors. Thanks for your suggestions. Any other help or suggestions would be appreciated.

Similar Messages

  • Playing video from a capture device - Out of memory for video buffers?

    Hello guys, I'm having problems playing video from a video capture device when not using JMStudio. When I use JMStudio, the video plays real time with no problems, but when I use code taken from a java book which is a simple Media Player, I get the following error:
    "Error is Error: Out of memory for video buffers."
    My capture device is working and I don't know why i get this error when trying to watch the video feed from a program other than JMStudio. I also tried different code that has worked in the past with the same exact capture device and I still get the same error. Please help, I have no clue at this point. The code for the simple media player is below, it's taken out of the book "Java: How to Program (4th edition)":
    Thanks in advance, I am very greatful
    Miguel
    device info: vfw:Microsoft WDM Image Capture (Win32):0
    When I type the locator, I am typing vfw://0, I also tried just vfw://
    and I get the same error.
    // Fig. 22.1: SimplePlayer.java
    // Opens and plays a media file from
    // local computer, public URL, or an RTP session
    // Java core packages
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    // Java extension packages
    import javax.swing.*;
    import javax.media.*;
    public class SimplePlayer extends JFrame {
         // Java media player
         private Player player;
    // visual content component
    private Component visualMedia;
    // controls component for media
    private Component mediaControl;
    // main container
    private Container container;
    // media file and media locations
    private File mediaFile;
    private URL fileURL;
    // constructor for SimplePlayer
    public SimplePlayer()
    super( "Simple Java Media Player" );
    container = getContentPane();
    // panel containing buttons
    JPanel buttonPanel = new JPanel();
    container.add( buttonPanel, BorderLayout.NORTH );
    // opening file from directory button
    JButton openFile = new JButton( "Open File" );
    buttonPanel.add( openFile );
    // register an ActionListener for openFile events
    openFile.addActionListener(
    // anonymous inner class to handle openFile events
    new ActionListener() {
    // open and create player for file
    public void actionPerformed( ActionEvent event )
    mediaFile = getFile();
    if ( mediaFile != null ) {
    // obtain URL from file
    try {
    fileURL = mediaFile.toURL();
    // file path unresolvable
    catch ( MalformedURLException badURL ) {
    badURL.printStackTrace();
    showErrorMessage( "Bad URL" );
    makePlayer( fileURL.toString() );
    } // end actionPerformed
    } // end ActionListener
    ); // end call to method addActionListener
    // URL opening button
    JButton openURL = new JButton( "Open Locator" );
    buttonPanel.add( openURL );
    // register an ActionListener for openURL events
    openURL.addActionListener(
    // anonymous inner class to handle openURL events
    new ActionListener() {
    // open and create player for media locator
    public void actionPerformed( ActionEvent event )
    String addressName = getMediaLocation();
    if ( addressName != null )
    makePlayer( addressName );
    } // end ActionListener
    ); // end call to method addActionListener
    // turn on lightweight rendering on players to enable
    // better compatibility with lightweight GUI components
    Manager.setHint( Manager.LIGHTWEIGHT_RENDERER,
    Boolean.TRUE );
    } // end SimplePlayer constructor
    // utility method for pop-up error messages
    public void showErrorMessage( String error )
    JOptionPane.showMessageDialog( this, error, "Error",
    JOptionPane.ERROR_MESSAGE );
    // get file from computer
    public File getFile()
    JFileChooser fileChooser = new JFileChooser();
    fileChooser.setFileSelectionMode(
    JFileChooser.FILES_ONLY );
    int result = fileChooser.showOpenDialog( this );
    if ( result == JFileChooser.CANCEL_OPTION )
    return null;
    else
    return fileChooser.getSelectedFile();
    // get media location from user input
    public String getMediaLocation()
    String input = JOptionPane.showInputDialog(
    this, "Enter URL" );
    // if user presses OK with no input
    if ( input != null && input.length() == 0 )
    return null;
    return input;
    // create player using media's location
    public void makePlayer( String mediaLocation )
    // reset player and window if previous player exists
    if ( player != null )
    removePlayerComponents();
    // location of media source
    MediaLocator mediaLocator =
    new MediaLocator( mediaLocation );
    if ( mediaLocator == null ) {
    showErrorMessage( "Error opening file" );
    return;
    // create a player from MediaLocator
    try {
    player = Manager.createPlayer( mediaLocator );
    // register ControllerListener to handle Player events
    player.addControllerListener(
    new PlayerEventHandler() );
    // call realize to enable rendering of player's media
    player.realize();
    // no player exists or format is unsupported
    catch ( NoPlayerException noPlayerException ) {
    noPlayerException.printStackTrace();
    // file input error
    catch ( IOException ioException ) {
    ioException.printStackTrace();
    } // end makePlayer method
    // return player to system resources and
    // reset media and controls
    public void removePlayerComponents()
    // remove previous video component if there is one
    if ( visualMedia != null )
    container.remove( visualMedia );
    // remove previous media control if there is one
    if ( mediaControl != null )
    container.remove( mediaControl );
    // stop player and return allocated resources
    player.close();
    // obtain visual media and player controls
    public void getMediaComponents()
    // get visual component from player
    visualMedia = player.getVisualComponent();
    // add visual component if present
    if ( visualMedia != null )
    container.add( visualMedia, BorderLayout.CENTER );
    // get player control GUI
    mediaControl = player.getControlPanelComponent();
    // add controls component if present
    if ( mediaControl != null )
    container.add( mediaControl, BorderLayout.SOUTH );
    } // end method getMediaComponents
    // handler for player's ControllerEvents
    private class PlayerEventHandler extends ControllerAdapter {
    // prefetch media feed once player is realized
    public void realizeComplete(
    RealizeCompleteEvent realizeDoneEvent )
    player.prefetch();
    // player can start showing media after prefetching
    public void prefetchComplete(
    PrefetchCompleteEvent prefetchDoneEvent )
    getMediaComponents();
    // ensure valid layout of frame
    validate();
    // start playing media
    player.start();
    } // end prefetchComplete method
    // if end of media, reset to beginning, stop play
    public void endOfMedia( EndOfMediaEvent mediaEndEvent )
    player.setMediaTime( new Time( 0 ) );
    player.stop();
    } // end PlayerEventHandler inner class
    // execute application
    public static void main( String args[] )
    SimplePlayer testPlayer = new SimplePlayer();
    testPlayer.setSize( 300, 300 );
    testPlayer.setLocation( 300, 300 );
    testPlayer.setDefaultCloseOperation( EXIT_ON_CLOSE );
    testPlayer.setVisible( true );
    } // end class SimplePlayer

    somebody? anybody? I know there are some JMF professionals in here, any ideas?
    I was reading the Sun documentation and it said something about increasing the JVM memory buffer or something? Well, i'm just clueless at this point.
    Help a brotha out!

  • My iPad (4th gen) will not play sound from videos played via Facebook. Anybody have suggestions?

    My iPad (4th gen) will not play sound from videos played via Facebook. Anybody have suggestions?
    I've restarted my iPad, there are no available updates that I am aware of.

    Try reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • How to move my videos from videos to camera roll?? I can not access them to create a proyect in imovie...

    How to move my videos from videos to camera roll?? I can not access them to create a proyect in imovie...

    As far as I know, iMovie will recognize only Firewire connected camcorders. If you are connecting with USB, it will never work.
    If the memory card is removable, take it out and use a card reader to copy the video to your Mac.
    I found this from a topic ………

  • How do you transfer videos from video roll to camera roll on ipod touch 4g

    how do you transfer videos from video roll to camera roll?

    I do not understand your question. There is no Video Roll album. There is the Camer Roll album in which all photos and videos taken by anad saved to the iPod are contained.

  • Keynote on Ipad: how to insert a Video from "Videos"

    Hi all,
    I just have bought Keynote for iPad as to prepare effective presentations and I am completely blocked: I need to use the videos I have uploaded from my PC into the "Videos" folder (from iTunes), but it seems that Keynote is just able to "see" the media library under "Images folder" (photos & videos).
    I am completely halted, since I cannot find event the way to transfer the videos from "Videos" to "Images".
    please help!
    thanks

    alessandrofrompavia wrote:
    Hi,
    The target videos are stored into Videos folder, which is syncronized through iTunes
    the folder mapped by Keynote clicking into the media icon on the ipadis instead the Images folder
    the Videos are not protected, since I have personally built from my PC...
    Do you see any way to make the videos mapped by Keynote?
    Thanks a lot
    Hi Guys,
    sorry to bother, but... anyone who has an idea on this?
    Thanks

  • Transmitting and playing from same capture device simultaneously?

    I am creating a videoconference software. For that I need to display the video from my system and at the same time need to transmit the video to a remote system.
    I have no idea how to do this. I have created a data source for the capturing device and using that for creating player and processor to play and transmit respectively.
    But the problem is the player is stoping when the video is getting transmitted.
    Can some one tell me how can I solve this problem.
    Thanking you in advance,
    R.Ravi Kiran

    Maybe cloning can do some
    Or manually drop data from datasource to each module

  • Convert live Video from video recording device to a stream

    Hello,
    I want to convert the captured live video from a Windows phone device to a stream so I can Send it over sockets. Any ideas guys?
    in other words, I want to send live video data over sockets.
    Thanks in advance.

    Hello Motasim_Albadarneh,
    the sample at
    [1], the threads at
    [2],
    [3] and
    [4] should be helpful to your problem.
    [1]
    https://code.msdn.microsoft.com/windowsapps/Simple-Communication-Sample-eac73290
    [2]
    http://stackoverflow.com/questions/14187487/windows-phone-camera-feed-over-udp-is-horribly-slow
    [3]
    http://stackoverflow.com/questions/9602582/how-would-i-create-a-windows-phone-live-camera-feed
    [4]
    https://learnwithshahriar.wordpress.com/2015/01/13/guideline-on-how-to-make-a-streaming-app-in-windows-phone
    Regards,
    Bo Liu
    Developer-Hotline for MSDN Online Germany
    Disclaimer:
    Please take into consideration, that further inquiries cannot or will be answered with delay.
    For further information please contact us per telephone through the MSDN-Entwickler-Hotline:
    http://www.msdn-online.de/Hotline
    For this post by the MSDN-Entwickler-Hotline the following terms and conditions
    apply: Trademarks,
    Privacy
    as well as the separate
    terms of use for the MSDN-Entwickler-Hotline .

  • Export video from multiple iOS devices to a Mac without using iTunes

    I am tasked with importing video files from multiple iPads to a single Mac to aggregate for editing.
    The file sizes on each device are many gigs large. I don't want to use iMovie on the Mac or iOS.
    I don't want to use iTunes (since there are many iPads not owned by me to import video from).
    Suggestions?
    Paul
    Chicago

    iTunes. Other than that there is no direct method. However, do try the iPhone forums.

  • Please help "pull videos from Video library & play in my app"

    Hi ,
    Q1:I put videos in my ipad video library using itunes.I have it so the videos are pulled from the video library, once I click on the video it opens just not in my app  but in the video library.
    How do I get the videos to play on my app? not open and play in the video library?
    Q2: When I place the videos in the ipads photo library it works but then I have a problem, The videos can be shared/emailed..I don't want the videos to be taken when the ipad is passed around to others. I could go this route if somehow I can encrypt the videos or keep them from being taken... any suggestions?
    Note:
    We are using NSURL class refrence...everything has to be local.. also this is for private use not going on app store
    This has been stomping everyone, any suggestions are greatly appriciated

    This may or may not work, but is worth a try.
    Select the clip in the trash. Then click on the Gear box in the top area of the trash. See if it gives you the option to "Put Back". If so, that should do it.
    If not, you still may be able to drag the clip back to the Event that it came from. Then restart iMovie.

  • Creating training videos from screen captures?

    Hello folks,
    Is it possible to create interactive videos from a series of screen captures. I understand the preferred method is to use Captivate to record a session, however, all my software walk throughs are created in a VM and installing Captivate inside a VM is not always practical.
    In the past, when I worked with RWD uPerform, I captured static screens using a really good/free tool called Gadwin screen capture. Once completed, I could add these screens into RWD, select clickable areas and RWD would do the rest by simulating clicks, motions, etc.
    Is this possible in Captivate?
    Thus far, my experience with Captivate involved doing direct recordings, in a manner similar to Camtasia.
    Thank you.

    Hi there
    If you are seeking a smaller footprint (read mobile or possibly portable) version of Captivate, please request same using the Wish Form. Adobe development does pay attention to these. If enough folks request something or report a certain issue, it gains a higher priority on the list of features or fixes.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Is it possible to play audio from video in the background while using a different app?

    I would like to be ale to play audio from a video file in videos (or av player hd) in the background whie using a diffent app in my iPad 2. (ie watching a video while taking notes on the content or highlighting an e-textbook).
    Is this possible? Either through the original iPad functionality or by downloading a separate app?
    Thanks,
    mji

    Is it important that the music come from a video, or are you just looking to listen to music in the background, while doing something else.  If the later, you can certainly play music from the Music App, Pandora, or iHeart Radio, etc., and with the music playing, tap your home button to go to your home page and open anything else you want and the music will continue.
    I don't have any videos to try out right now, but you try the same thing out and if the music continues, it works.  If it doesn't, it doesn't.

  • Is there a way to transfer videos from an android device?

    Does anyone know if there is an app or something to transfer videos from my android tablet or USB stick to my iPad 4

    step by step process
    1
    take any android device(mobile or tablet) and switch off mobile data and turn off(if its on , its not a problem)
    go to SETTINGS and click More settings and there is TEATHERING AND PORTABLE HOTSPOT available and switch it on
    2
    then take any ios device like iphone or ipad
    then install app VLC FOR IOS APP from app store
    3
    then go to SETTINGS IN iphone
    go to wifi switch it on and it will show android hotspot name in iphone like androidAp
    then connect with that connections
    4
    then open VLC APP in iphone
    in left side top there is a vlc icon avaialble
    click that in that you can see  WIFI UPLOAD option in that you can see there is link it will be available like http://192.168.2.43:8080/
    5
    then take android device and go to any browser type that link what you see in iphone vlc app and type it in browser
    then you can see vlc upload option in that left side you can see add(+) option
    click add option it will show gallery video and audio files
    then you can transfer videos to ios device

  • HT201343 Is there a way to stream video from one iOS device to another?

    My family and I are going on an extended vacation and we want to make sure the kids have enough videos to keep them busy on very long flights. I'm taking my MacBook Pro and was wondering if there's a way to stream video our different iOS devices without preloading movies on every device.

    If the MBP was connected to inflight WiFi like Gogo it might be possible. Then you use the MBP as a hotspot using internet sharing. The iOS devices connect to the MBP.  I'm not sure if Its allowed in flight but give it a try.

  • Can't import Video from Video Camera

    I gave my father in law my old iMac (G4 Flat Panel running OSX 10.3.9 and running iMovie 3.0.3) - and we can't seem to import video from his digital video camera.
    The camera is much newer than the iMac - it is a JVC G2-MG330HU digital video camera.
    When the camera is plugged in (via USB) to the iMac, the drive on the camera shows up in Finder, but not inside the iMovie program.
    If you try to import from iMovie, the camera (and therefore the video clip files on the camera) can not been seen.
    Any hints?
    Thank you.
    Jeremy

    Hi there Jermaster
    iMovie 3 does not support the camera you have. iM is a Digital Video (DV) editor. Cameras that record to mini DV tape is what is required. IM 3 does not support USB either. You need Firewire. The camera you have is a flash based Hard Drive camera. To get the video off this camera you'll need iM08 or 09.
    But it doesn't appear that the computer you have will support either of these versions.
    See below ...
    iLife ’09 System Requirements
    Mac computer with an Intel, PowerPC G5, or PowerPC G4 (867MHz or faster) processor
    iMovie requires an Intel-based Mac, Power Mac G5 (dual 2.0GHz or faster), or iMac G5 (1.9GHz or faster).
    GarageBand Learn to Play requires an Intel-based Mac with a dual-core processor or better.
    512MB of RAM; 1GB recommended. High-definition video requires at least 1GB of RAM.
    Approximately 4GB of available disk space
    DVD drive required for installation
    Mac OS X v10.5.6 or later
    QuickTime 7.5.5 or later (included)
    AVCHD video requires a Mac with an Intel Core Duo processor or better. Visit iMovie ’09 Camcorder Support for details on digital video device and format support.
    24-bit recording in GarageBand requires a Mac OS X-compatible audio interface with support for 24-bit audio. Please consult the owner’s manual or manufacturer directly for audio device specifications and compatibility.
    Some features require Internet access and/or MobileMe; additional fees and terms apply. MobileMe is available to persons age 13 and older. Annual subscription fee and Internet access required. Terms of service apply.
    iPhoto print products are available in the U.S., Canada, Japan, and select countries in Europe and Asia Pacific.
    GarageBand Artist Lessons are sold separately and are available directly through the GarageBand Lesson Store in select countries.
    Burning DVDs requires an Apple SuperDrive or compatible third-party DVD burner.
    Flickr service is available only in select countries.
    Carl

Maybe you are looking for

  • Mac won't start-up. Deleted User "wheel" in permission

    I deleted a user named "wheel" in permissions, and now my MacBookPro running Yosemite will not boot  up. It hangs after intial start. How can I get back in and put  "wheel" back in as a user? Not able to  boot in safe mode.  Thanks

  • Determine the source -- BufferedReader

    I have start Java programming and one of the function that I need to make is a read(), which accept PrintStream and BufferedReader. In this function, it supposes to determine whether the BufferedReader is from a keyboard (system.in) or a file. Now, I

  • Creating web galleries: Basic workflow

    This question was posted in response to the following article: http://help.adobe.com/en_US/lightroom/using/WS09C82293-1DE0-42de-97F3-A5EDF26A55C7.html

  • Tips for Getting Payday Loans in Australia

    There are times in everyone's life where waiting until your paycheck, just won't cut it. You need cash and you need it now. No matter the reason you need the money, past due bill, birthday present you need, medical emergency; payday loans are availab

  • Premiere Pro CC Crash on new MacPro and will not reopen.

    Crashed while running warp stablizer, when i tried to reopen it it said Adobe Premiere Quit Unexpectedly, so i sent the error report and hit reopen, and the premier pro title screen comes up for a split second than it goes back to the exact same erro