Change the video resolution when capturing a WEB-cameras

Language: Java
It is used in addition: JMF
When capturing video from WEB-cameras with JMF - getting the video is at the lowest resolution.
Can you please tell how to change the video resolution?
The code by which the captured image (no SWING-forms):
MediaLocator getWebCam = new MediaLocator("vfw://0");
private Player player;
Timer timer = new Timer(40, this);
public BufferedImage grabFrameImage() {
Image image = null;
FrameGrabbingControl frameGrabbingControl = null;
if (player != null)
frameGrabbingControl = (FrameGrabbingControl) player.getControl("javax.media.control.FrameGrabbingControl");
Buffer buffer = frameGrabbingControl.grabFrame();
if (buffer != null)
image = new BufferToImage((VideoFormat) buffer.getFormat()).createImage(buffer);
if (image != null)
return (BufferedImage) image;
return null;
public WorkWithWebCam() throws NoDataSourceException, IOException, NoPlayerException {
initComponents();
player = Manager.createPlayer(Manager.createDataSource(getWebCam));
player.start();
private void jButton1ActionPerformed(ActionEvent e) {
timer.start();
public static void main(String args[]) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try{
new WorkWithWebCam().setVisible(true);
}catch(Exception ex){}
public void actionPerformed(ActionEvent e) {
panelMain.getGraphics().drawImage(this.grabFrameImage(), 0, 0, 400, 300, null);
P.S. Can you please tell how this forum can be identified code \ listing?

Hello,
I don't know if there is a way to change the video. But I think you can easily use your own videos by using a local .mpg or .3gp file via InputStream. Just change the player's parameters in video/mpg instead of capture://video.
Hope it helps...
Torsten

Similar Messages

  • Is there a way to change the true resolution rather than scaling?

    Hi,
    I have searched through just about every single forum, website and search engine there is and haven't found anything. Perhaps I am phrasing my question wrong. I currently own a Macbook Pro 13.3'' Retina (Of Mid-2014 since I just bought it?) and I can't figure out how to change the resolution. The OS seems to default to 2560x1600 no matter what I set it to because I think all its changing is the scaling. Is there a way to do this? I used to own a Macbook Air 13.3'' which ran 1440x900 and I know that it was pixelated. On the same size display here...when I run the claimed "1440x900" its still ultra sharp which means its using scaling I assume. Any ideas how do I change the actual resolution, not just the scaling. The OSX settings currently seem to be just the equivalent of modifying the DPI like you can in Windows. I want to find out if there is a way to change the actual output resolution.

    The MacBook Pro like all laptops has an LCD screen. Like all LCD screens the screen has a single physical resolution, in the case of your MacBook Pro Retina 13.3" it is 2560x1600 pixels. This is the number is dots the screen is physically made of.
    In the old days when desktop computers used CRT (Cathode Ray Tube) displays which looked like TVs these sort of displays could display multiple resolutions in fact CRTs have no single fixed physical resolution. However LCDs which use totally different technology do only have a single 'real' resolution.
    If your really interested in how a CRT can do different resolutions then the answer is that a CRT uses an electron beam to excite the phosphor display on the front of the display (to make it glow), it scans from left to right, moves down a line and then does the next line, and so on till it reaches the bottom and then goes back to the top. The speed (rate) at which it does this is known as the horizontal frequency and the vertical (refresh) frequency or rate. If the horizontal line is drawn specific time and that is divided in to 640 units, then it can be told to turn off and on 640 times per line, if the same line is drawn in the same time but the interval is divided in to 1024 then it can 'draw' 1024 horizontal pixels instead of 640 horizontal pixels. In actuality the display has no physical pixel you are merely lighting up small or larger areas on the screen and hence a CRT has no single fixed resolution.
    In order for a computer using an LCD display to use a different apparent resolution it has to 'scale' the image to a different size, as a very simple example if we wanted to scale down to 1280x800 pixels which is exactly half 2560x1600 then the computer would use 2x2 (four) physical pixels to represent a single scaled pixel. Often however the chosen scaled resolution may not be an exact multiple like that example. Apple on the Retina display have provided some suggested scaled resolutions which work reasonably well these being 1680 by 1050, 1440 by 900, and 1024 by 640 pixels.
    None of these will look as good as 2560x1600 because the screen physically is made up of 2560x1600 dots and no amount of cheating will change that.

  • I am unable to play a downloaded HD movie from iTunes. SD movies play OK. An error popped up saying something about the display not suitable for HD movies but now all I get is a blank window. I have tried changing the display resolution to no avail.

    I have sownloaded an HD movie from iTunes store and when I attempted to play it on my Windows 7 PC a error message popped up saying something about the display not being compatible for HD movies. I have tried changing the display resolution several times but it didn't help. Now it just comes up with a blank screen when I attempt to play it. SD movies work fine. I have the latest version of iTunes installed.
    Can anyone help me resolve this problem?

    Apparently the display is required to be HDCP compatible to view HD movies in iTunes. My display isn't so this is my problem. I contacted Apple support and they have agreed to credit me for the HD movie and I have now downloaded the SD version.

  • I just bought a new PC and I have re-installed my Adobe Creative Suite Standard on it. Software open fine. PROBLEM: The toolbars (menu stuff) appear extra-small, too small for me to read... I sent on the PC setting to try to change the display resolution.

    I just bought a new PC and I have re-installed my Adobe Creative Suite Standard on it.
    Software open fine. PROBLEM: The toolbars (menu stuff) appear extra-small, too small for me to read...
    I went into the PC settings and tried to change the display resolution. This changes the size of all  the icons (not only Adobe) but it does not solve the problem when I open an Adobe application (Photoshop or Illustrator)... The PC is run under Windows 8.1 and my display resolution is 3200x1800 (but again, when I change the settings for a smaller resolution, only the size of the icons is affected. Once I open the software, the problem is still there, extra-small toolbars...). Help!!!

    Anything before CC is not high-DPI compatible. Feel free to continue to experiment with your system settings.
    Mylenium

  • I imported a video and when I play it back, the audio does not match the video. When I view the tape in my camera it looks fine. I've tried imported twice and each time it doesn't match. What can I do to fix this?

    I imported a video and when I play it back, the audio does not match the video. When I view the tape in my camera it looks fine. I've tried imported twice and each time it doesn't match. What can I do to fix this?

    The default settings mostly likely use an audio sample rate of 32k. This doesn't work probably in FCP. You're probably better off capturing the tape in iMovie.

  • Can I change the default resolution to minimize buffering?

    Can I change the default resolution to minimize buffering?

    This is a function of the server and content, not the player itself.  You'll have to do this through the different video players (YouTube, Vimeo, Hulu, etc.)

  • Is there a method in labviewto dynamically save and change the monitor resolution under program control?

    Is there a method in labview to dynamically save and change the monitor resolution under program control? I have another application that runs on another monitor. I would like to change the monitor resoultion to 640x480 on program startup, and then restore the monitor resolution back to the user's settings on exit. Can this be done?

    vaidehi_joshi wrote:
    Is there a method in labview to dynamically save and change the monitor resolution under program control? I have another application that runs on another monitor. I would like to change the monitor resoultion to 640x480 on program startup, and then restore the monitor resolution back to the user's settings on exit. Can this be done?
    Have you already done this manually?  I've seen Labview scale front panels very strangely when changing resolutions...
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Apple TV 2 does not switch automatically the video resolution (60 HZ / 50 HZ)

    My apple TV streams the content from a Mac Mini. In my iTunes library are mixed content from the iTunes store. Some are 24 fps with 60 Hz and some are 25 fps with 50 HZ. All was bought on iTunes. The video resolution is set on my Apple TV to AUTO. This mens for me that my Apple TV will change the resolution by itself depending on the movie.
    And this is the problem. The Apple TV does not change the resolution. It is only on 60 Hz. A lot of people has the same problem. My iPad wokrs fine and displays all movies correct.

    Thank you for the eplanation. What might cause that activity as the TV was off and no other HDMI was on? Only WiFi was available but nothing connecting to the apple TV.... I tried to "wake it up" with iTunes on my macbook - and it works (I was not aware of). But it could not be iTunes and it was not really "used". So it might be iPhone or iPod waking it without we want it to.
    I'll check all items potentially connecting to it. Txs!

  • Can anyone tell me if i can change the video chipset ?

    can anyone tell me if i can change the video chipset ?
    my notebook model is hp pavilion dv6 1100ss ,, i know that my laptop has 512mb dedicated and 1278 shared total available memory of 1790,,  and i wonder if i can change the dedicated part because i had to take the laptop to a service for repairs, the video chipset broken ,they repaird it somehow but the laptop fails when i try to see a video online / movie online /offline ,and again fails if i try to play a game the laptop just freezes and i have to unplug the power leave it like 5 to 10 mins and then power it up again, if i try to power on the laptop after i turn it off he just simply turns on for 2-3 seconds and turns off

    Only a very small number of very expensive high-end gaming and engineeering workstation laptops have plug in video cards. Yours is not one of them. The video soldered to your motherboard is a type of video chip also delivered as a desktop video card and maybe as a plug in card for those few laptops. Again, not for yours. 

  • My Apple TV 5.0.2 (4250) changes the screen resolution every 10-15 sec. Is there a way to solve this problem?

    Hi, My Apple TV changes the screen resolution every 10-15sec. The device is up to date and video setting are done correctly. It is connected to Philips 42pfl3507. What should I do to solve this issue?
    Thanks for your help.
    DucciP

    This sounds like a problem beyond resolution.
    I'd start by restarting the Apple TV by removing ALL the cables for 30 seconds, or resetting it using the reset option under general. You should also try restarting your router.
    If that doesn't help, try a restore.
    If the problem continues:
    Check that the HDMI cable is correctly seated at both ends.
    Try disconnecting the cable and connecting it again.
    Try another HDMI cable.
    Make sure your TV supports 720p (Apple TV 2)
    Try the Apple TV with another TV

  • How to change the default JRE when there are several version of JRE in Sys

    How to change the default JRE when there are several version of JRE in System?
    i have installed j2sdk1.5.0 then installed j2ee1.4,then installed Weblogic6.1 which use jdk1.3
    Now the JRE is jdk1.3\bin
    When run class that was compiled with jdk1.5,throw:
    java.lang.UnsupportedClassVersionError
    How can i change the jre to 1.5?

    There is a workaround to move from 1.5 version to the older 1.4 version. But this could be specific to the browser setting the JRE version.
    Excerpts from sun docs:
    However, a user can still run older versions. To do so, launch the Java Plug-in Control Panel for the older version, then (re)select the browser in the Browser tab.
    Example:
    Assume you are running on Microsoft Windows with Microsoft Internet Explorer, have first installed version 1.4.2, then version 5.0, and you want to run 1.4.2.
    Go to the j2re1.4.2\bin directory where JRE 1.4.2 was installed. On a Windows default installation, this would be here: C:\Program Files\Java\j2re1.4.2\bin
    Double-click the jpicpl32.exe file located there. It will launch the control panel for 1.4.2.
    Select the Browser tab. Microsoft Internet Explorer might still appear to be set (checked). However, when 5.0 was installed, the registration of the 1.4.2 JRE with Internet Explorer was overwritten by the 5.0 JRE.
    If Microsoft Internet Explorer is shown as checked, uncheck it and click Apply. You will see a confirmation dialog stating that browser settings have changed.
    Check Microsoft Internet Explorer and click Apply. You should see a confirmation dialog.
    Restart the browser. It should now use the 1.4.2 JRE for conventional APPLET tags.
    Details are here
    http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/jcp.html
    My system (Windows XP) has the version 1.5_09 set as the default. However i just installed JRE 1.5_06 and would like to revert back to _06 as the default JRE..
    Will update if i find more information

  • Is there a way to Change the Writing Speed When Burning CD-R's?

    Is there a way to change the writing speed when burning CD-R's?
    I don't see any options in Disk Utility.
    Rob
    P.S. Since I am burning coasters lately with the Pioneer DVR-111D, I though that I might solve the problem by using a lower write speed.

    I dn't believe so with Disk Utility although you can with Roxio Toast Titanium. I would try another media brand, like Verbatim, as a first step and see if the coaster problem goes away.

  • Since updating my iPhone 3GS on my friends laptop, it keeps asking for her iTunes Id not mine. When I log onto a computer it comes up with my Id but from my phone it's my friends. I don't have an option to change the user Id when it pops up either.

    Since updating my iPhone 3GS on my friends laptop, it keeps asking for her iTunes Id not mine. When I log onto a computer it comes up with my Id but from my phone it's my friends. I don't have an option to change the user Id when it pops up either. So I can't update my apps, download songs or games now as it will charge my friend

    Hello, 34sandy. 
    Thank you for the question.  This behavior is normal if updated on another Apple ID account holders computer.  To change the Apple ID on your device, follow the steps in the article below. 
    iOS: Changing the signed-in iTunes Store Apple ID account
    http://support.apple.com/kb/ht1311
    Cheers,
    Jason H. 

  • Is it possible to change the video card of a pavilion g7-1075dx?

    So, I have an HP Pavilion g7-1075dx Notebook with Windows 7. I'm an avid gamer and wish to play the newest games. However, there's one problem thats keeping me from doing so. Alot of the newer games require newer video/graphics cards. This particular laptop has an ATI Mobility Radeon HD 4250. The newest games seem to require ATI Radeon HD 4850 and above. This is the only thing thats keeping me from playing games like Starcraft II on the highest settings OR in the case of Star Wars: The Old Republic, it almost keeps me from playing the game, period, due to the graphics being too much for my current card to handle, causing massive lag. I was hoping I could change the video card. Upgrade. However, i've heard that with most laptops or notebooks you can't upgrade anything other than the RAM. I'm hoping anyone on here can help me out and tell me if it is possible to get a new video card for my laptop. We don't have a desktop computer so this laptop is my only hope for a long time to play newer PC games.

    Alright, let me put this in a simpler message: Does anyone know if it is possible to change the video card currently in my laptop, the HP Pavilion g7-1075dx, for a newer and better one. ATI Mobility Radeon HD 4250 to ATI Radeon HD 4850 or higher.

  • Can I change the background color when I'm in a brochure layout?

    can I change the background color when I'm in a brochure layout? I've tried making a box in desired color but cannot push it to the back(not an option, it's greyed out)

    Then you are in a Layout template and the shape is already the back most object.
    Peter

Maybe you are looking for

  • File unreadable in Illustrator CS4

    Dear All, I'm using Adobe Illustrator CS4. I been working on my project and I found out that a couple of file which I do is unable to open. Sometime is unable to save the file too. There are times I tried to open my project file it take a long time t

  • Photos are not automatically marked for republishing

    I use Lightroom 5.2 and Photoshop CC.  I also use a number of publish services.  If I use Lightroom to edit a photo that has previously been published, it will be marked automatically for republishing.  If I use Photoshop to edit a photo that has bee

  • EA6500 and Media Prioritization (MagicJack)

    I just recently purchased the EA6500 (Linksys-branded AC 1750) and have been trying to figure out the Media Prioritization widget. I thought that by adding my two MagicJack devices to the Prioritization list it might help with the outbound bandwidth

  • SQL for dates output

    SQL pasted below is expected to return dates output in format shown, with weekday begining 'MONDAY'. The SQL can be ran by creating a dummy table 'CAL_MONTHS' with one number column with around 200 null rows. The SQL I have written works fine up to t

  • Deltas of inventory

    Hi experts, Should we compress the requests of delta loads of inventory. Thanks & Regards, V N.