WebCam Video Format Problem

Hi,
I'm trying to change the video format of my webcam using JMF from it's default of 320x240 to 640x480 which it does support. However I am having problems. Can anyone help please?
I am running on Windows. My code looks like this:
//ml = a medialocator pointing to vfw://0
DataSource dataSource = javax.media.Manager.createDataSource(ml);
CaptureDevice theCamera = ((CaptureDevice) dataSource);
FormatControl formatControls = (theCamera.getFormatControls())[0];
availableFormats = formatControls.getSupportedFormats();
//Print out all formats my camera supports
for(int i=0;i<availableFormats.length;i++){
       System.err.println(i+":"+availableFormats);
}//end for
At this stage the I get the following formats reported:
0:YUV Video Format: Size = java.awt.Dimension[width=320,height=240] MaxDataLengt
h = 115200 DataType = class [B yuvType = 2 StrideY = 320 StrideUV = 160 OffsetY
= 0 OffsetU = 76800 OffsetV = 96000
1:YUV Video Format: Size = java.awt.Dimension[width=160,height=120] MaxDataLengt
h = 28800 DataType = class [B yuvType = 2 StrideY = 160 StrideUV = 80 OffsetY =
0 OffsetU = 19200 OffsetV = 24000
2:YUV Video Format: Size = java.awt.Dimension[width=640,height=480] MaxDataLengt
h = 460800 DataType = class [B yuvType = 2 StrideY = 640 StrideUV = 320 OffsetY
= 0 OffsetU = 307200 OffsetV = 384000
I then disconnect from the camera, attempt to change format and reconnect.
[code]
dataSource.disconnect();
System.err.println("ret="+ formatControls.setFormat(availableFormats[2]));
System.err.println(formatControls.getFormat());
dataSource.connect();
The "ret=" line returns the 640x480 format as exptected. However the getFormat print line returns the format.....
RGB, 320x240, FrameRate=15.0, Length=230400, 24-bit, Masks=3:2:1, PixelStride=3, LineStride=960, Flipped
.....which is not on the list of available formats. I am confused as to why this is so. It is also not what I tried to set the format to.
The connect fails with "java.io.IOException: Could not connect to capture device". If I don't try and set the format, the connect succeeds.
Any ideas?
With Thanks
LJ

Hi,
I'm trying to change the video format of my webcam
using JMF from it's default of 320x240 to 640x480
which it does support. However I am having problems.
Can anyone help please?
To specify the format, try using the following:
player = Manager.createRealizedProcessor(new ProcessorModel(new Format[] { playerFormat }, null));
Where playerFormat is a VideoFormat object from the list of formats.

Similar Messages

  • JPEG Video Format Problem

    I have a problem handling tha images received from a IP camera,
    this camera send 320x240 JPEG images, I have write my LiveStream
    that handle the frams sended from camera.
    When I start the player I receive the following messages:
    From jmf.log I receive
    ## Building flow graph for: jIntellinetTVCCProtocol://192.168.1.97
    ## Building Track: 0
    ## Input: JPEG, 320x240, FrameRate=2.0
    !! Failed to handle track 0
    XX Unable to handle format: JPEG, 320x240, FrameRate=2.0
    XX Failed to realize: com.sun.media.PlaybackEngine@9ba045
    XX Error: Unable to realize com.sun.media.PlaybackEngine@9ba045
    My player event handleder receive
    javax.media.ResourceUnavailableEvent[source=com.sun.media.content.unknown.Handler@10a519,message=Failed to realize: input media not supported: jpeg video]
    I not understand why if the JPEG video format is supported, where is my mistake ?
    Many thanks.

    I've got 10.6.8 but have this exact same problem.  Everything is grayed out.  I suspected that maybe the MP4 files from my GoPro camera were corrupted, but then I went to http://support.apple.com/kb/HT1425 and downloaded "sample_mpeg4.mp4" and even that wouldn't import into iMovie or iPhoto.  It's grayed out in iMovie and says the file format is invalid in iPhoto.
    Any suggestions?

  • Video Format problem

    Hey,
             I know i cannot stream AVI and some other formats..Do i have to convert my videos to flv or f4v myself?? before streamin..

    Hi syruspayne,
    Yes you need to encode your video files in other format to flv or f4v format before you start streaming them from FMS. If you want to encode the videos and stream please check out the Flash Media Encoding Server(http://www.adobe.com/products/flashmediaencoding/).
    Thanks
          Viraj

  • Switching webcam player video format black square problem

    switching webcam player video format black square problem:
    After the webcam player is stopped and the format changed and player is started using a new format there is a black square that appears over the screen area that partially covers up the webcam session.
    Why is this happening?

    Just incase anyone else runs into this problem, I was able to solve it by calling setVisible(false) on the current visual component.

  • Pro Video Formats 2.0.1 Update Problem

    Hello, the "Pro Video Formats 2.0.1" update keeps reappearing in my update list, after I've already downloaded and installed the update. It will say it is installed successfully, then check for updates again, and the same update will appear. No matter how many times I install it.
    How can I fix this problem?
    Thank you in advance! 

    Me too. And I'm having a further problem with my iMac monitor and mouse. The movements of the latter are either way too slow or way too fast. I suspect these have something to do with the updates, but can't be sure. Definitely not the mouse, because it works fine on another Mac, running an earlier version of the system.

  • Upside down webcam video in tent mode when in Skype. Is it Skype app problem or Yoga's?

    Hi there,
    I have a problem with Skype app in Windows 8. When I use the Yoga in tent mode, my webcam video in Skype is upside down. I have checked the Windows' camera app and in tent mode the video is OK. But when I go to Skype, Skype does not rotate the video. This is while I have seen in Yoga's advertisement that people use the tent mode to do Skype calls. It seems to me more of a Skype problem. Does anyone have a suggestion how to resolve this?
    By the way, Yoga is really a great product. Thanks Lenovo!

    Hi
    Welcome To Lenovo Community
    We are really sorry to hear about the issue you are facing,  
     Please try the following settings to check when Yoga is in Tent mode
    Open Skype, click on tools, and go to Options, Left panel click on Video Settings
    Select Camera as integrated, Click on webcam settings, Click on Camera control tab
    Here you can change the values of tilt , Pan  to check
    Do give this a try and let us know  
    Hope This Helps
    Cheers!!!
    WW Social Media
    Important Note: If you need help, post your question in the forum, and include your system type, model number and OS. Do not post your serial number.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    Follow @LenovoForums on Twitter!
    How to send a private message? --> Check out this article.
                            English Community   Deutsche Community   Comunidad en Español

  • Satellite U300 connected to TV - Non supported video format

    I am using Toshiba Satellite U300-15q and it has a vga output so i bought a cable and a box that transfers te analogue signal of vga to digital of hdmi so that i can connect it to my 32' TV Sony make.
    But if i connect it it says on the tv in yellow letters non supported video format.
    Why is that and how can i fix it ?

    In the whole story problem is that you use third part hardware or software so this described issue has nothing to do with your Toshiba notebook or Toshiba in general.
    On notebooks side is important that video signal is sent on proper way. What happen later and why this signal is not transformed correctly is matter of this box.
    Which box do you use?
    In my opinion you should contact manufacturer of this box and their support. They should know how it works and how to fix this.
    Generally speaking, Toshiba has nothing to do with this problem.

  • Mac Mini G4 Unsupported Video Format DVI to HDMI 42 Phillips 1080P LCD TV

    When connecting my Mac Mini G4 to my 42" Phillips 1080P LCD TV using a DVI to HDMI cable I get a message on the TV "Unsupported Video Format" message. I can connect my PowerBook G4 using the same cable and it connects great.
    One thing I have noticed is when connecting my Mini via DVI cable to my 17" LCD monitor the screen is a fated red. But using a VGA cable the screen is fine. I don't know if this is having to do anything with the issue of connecting to my LCD TV.
    Any suggestions?

    Make sure the connections are good and tighten down the thumb screws on all connectors. If two monitors are giving problems with DVI, it could be there is a hardware problem with the DVI port on the mini.
    Also, try starting in Safe mode (boot while holding down the shift key) and see if you get a useable screen in that case. If you still get the unsupported video format message, then that would further suggest some hardware problem with DVI.

  • Video Format Total Solution: How to Convert and Edit Video on Windows/Mac

    More and More video formats are coming out with different video encoders and it makes our spare time more and more colorful. However, it is not to say that there is no problems. Actually, different video formats make it difficult to share video with others, even your own camcorder and iPod. Is there an easy way to convert videos effectively. Yes, there is.
    In this article, I will show you guys how to convert videos on windows and mac.
    Part 1. How to Convert and Edit Videos on Windows
    For Windows users, you need a Video Converter(http://www.aiseesoft.com/total-video-converter.html) to do that for you.
    Here I use Aiseesoft Total Video Converter(http://www.aiseesoft.com/total-video-converter.html)
    Step 1: Download and install Aiseesoft Total Video Converter
    After you download it to your computer, double click it and it is really easy to install.
    You just need to click “next” and it will complete it in seconds. It will automatically run after installation.
    http://www.aiseesoft.com/images/guide/total-video-converter/screen.jpg
    Step 2: Load Video
    Click “Add File” to find the video that you want to convert and click “open”. It will be loaded automatically.
    Step 3: Select the target to decode
    In the “Profile” drop download list you can find your target according the usage of your output video, such as if you want to put the video on your iPod touch, you can select the “iPod” in the first list and “iPod touch 2 MPEG-4 640*480(*.mp4)” in the second list.
    Step 4: Set Advanced Parameters
    After you select the right output profile, you can click “setting” button to set your advanced parameters. You can adjust video and audio settings separately. In video section, you can change “video encoder”, “resolution”, “frame rate”, “video bitrate”In audio section, you can change “audio encoder”, “sample rate”, “channel”, “audio bitrate”If you want to save this profile and settings and use it next time you can click “save as” button to give a name to it. And the next time you want to use it you can find it in the profile list named “user defined”.
    Step 5: Choose a Destination
    To browse and find a output folder for your output files or just the default one.
    Finally, Click “Convert” button to begin your conversion, here in the converting
    interface you can choose “shut down the computer when conversion complete” or “open output folder when conversion complete” or you just do not choose neither one.
    Tips: How to Edit the Output Video
    This video converter is also a video editor, you can use it to edit your output video as follows:
    http://www.aiseesoft.com/images/guide/total-video-converter/effect.jpg
    1. Effect:
    You are allowed to adjust the “Brightness”, “Contrast”, “Saturation” and you can choose the “deinterlacing” to make the video more enjoyable.
    2. Trim:
    In “Trim” section you can pick up any part of the video to convert.
    There are two ways to select the part of the video you want. One is set the start and end time in the box. The other one is to drag the start and end button in the processing bar.
    3. Crop:
    This function allows you to choose a certain play area to convert. That means you can choose a part of the screen you like to convert. For example, you just like the tv in the middle of the screen, then you can drag the frame around the preview window to select the tv and the output preview will show you the output video.In this section you can also choose the “zoom mode”, such as “keep original”, “full screen”, “16:9”, “4:3”.
    4. Watermark
    In the section, you can add a watermark on the output video to show people something, such as your name, website, studio name or other things. The watermark could be words and picture. You can adjust the transparent of the watermark easily to make it more beautiful.
    Part 2. How to Convert Video on Mac
    This time you need a Video Converter for Mac(http://www.aiseesoft.com/video-converter-for-mac.html)
    Step 1: Add File
    Click “Add File” button to load the video you want to converter
    http://www.aiseesoft.com/images/guide/mac-video-converter/steps.jpg
    Step 2: Choose profile and adjust settings
    You can find your output video format from a drop-list called “Profile”You can also adjust the specific settings of the output video, such as “Resolution”, “Bitrate”, “Encoder” and so on.

    @ Tamwini
    Your only goal is to sell software.
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

  • How do i get my iMac quick time player to play video formats such as avi, etc?

    to whom it may concern,
    how do i get my quicktime player on my imac to play avi, etc video formats? i downloaded an avi video, but i got the message, quick time does not support this format.

    VLC media player - http://www.videolan.org/vlc/ - general media player that plays just about anything.
    Perian codecs for Quicktime - http://www.perian.org - plugins to add functionality to Quicktime for playing additional audio and video formats
    Quicktime audio problems, Perian, VLC - http://discussions.apple.com/message.jspa?messageID=9013669 - read note about uninstalling prior DIVX support before installing Perian.

  • DVD movies to iPod video format

    I often travell on official business, I am trying to rip a DVD to my ipod. My friend told me that Sothink ipod- converter can convert DVD movies to IPod video format. I have downloaded and try it,I think the Sothink IPod Video Converter is designed to be an easy company for my IPod.
    IBM   Windows XP   no

    If you want a really organized package for ripping your dvds into .mp4 "ipod" format use the dvd Decrypter and Videora ipod conveter. They are very organized and they put you in control of the video/audio settings... And it couldn't be easier. Here are the links if you wanna give these FREE programs a shot
    Videora ipod converter - http://www.videora.com/en-us/Converter/iPod/
    Dvd Decrypter - http://www.mrbass.org/dvdrip/
    ps... You need both because after ripping your dvd it becomes a .vob file..Ipod cannot read this so you must use videora to make it an .mp4 "ipod friendly" format.. Reply if problems occur please!!! Thanks...

  • Video format for ipod classic 30gb

    Hi,
    I've just bought a music video from the iTunes Store, but, when I try putting it on my older click wheel 30gb Ipod Classic, iTunes tells me it wasn't copied to the Ipod because it cannot be played on the Ipod. I checked the music video's format and found out it was m4v. Could that be the source of the problem? If so, do I have to convert it to mp4 or something similar? And how do I do that?
    Any advice or help?

    A 30GB iPod that plays video is a 5th gen iPod.  NOTE:  The 4th gen "classic" iPod with color display may also be 30GB, but those iPods cannot play videos.
    Video format may be an issue, because the first iPod with video capability had a lower limit for video resolution. And if the video is "HD," that video is too high-res for even a new iPod classic.
    NOTE:  You can convert videos in iTunes using the command
    menu bar -> File -> Create New Version -> Create iPod or iPhone Version
    but that command is disabled for videos that use DRM (copy protection).  A purchased video (such as a musiuc video) from the iTunes Store uses DRM.  For purchased videso that are HD, you may be entitled to also download the SD (standard definition) version at no cost.  The SD version may play on your iPod.

  • Proper video format

    Hi everyone I really would love it if someone helped me with converting my DVD to ipod Ive tried a lot. What is the proper video format that will work on the iPOD. I am using Videora is their a better software and easier has to work with windows.
    A Great big thank you to the people who helps me
    Chelsea

    Well i know of one free program that i use off the internet called handbrake, its great the only problem with it is that it takes forever like 3 hours but my computer is 4 years old so. another down side is that it puts the movie into a mpeg4 format and from there you have to convert it to setting that work with ipods but hey its free. what i do is rip the dvd when im sleeping. but besides hanbrake there are many programs that are a lot faster you just have to search for them mabey on google.

  • Webcam Video pauses when recording sound from microphone

    I have a strange problem which i am encountering when recording and playing back webcam video.
    I am developing a small application for recording webcam video and audio using FMS and playing it back later from FMS.
    I am using AS 3.0, FMS 3.5 and flash CS 5.5
    When i record only the video from webcam without sound from microphone the playback is fine. But when i record microphone sound also along with the video, and when i playback the video pauses right where the sound starts for 10 sec or more and then it starts playing. Towards the end the video pauses again and only the sound goes on till the end.
    I tried setting the buffertime to 50 before ns.publish and ns.play but that didnt help either.
    I tried using the flvplayback component and even their it pauses.
    Any help is appreciated.

    Haha, that is such a genius use of common sense! Thank you, I didn't think of that. I certainly will!
    However, does anyone know if there is a way of adjusting the program of garageband to fix this issue? Using headphones certainly fixes the symptoms of my problem, but it doesn't actually address the root cause: garageband should only be recording the input through the microphone. I shouldn't need to wear headphones. (And doing so inhibits my ability to clearly hear myself play, and stay in tune.)

  • Photoshop doesn't let me render a video as .mp4, .avi or any video formats

    I've finished my outro today and when I tried to render it as an .mp4, in the rendering screen there weren't any options that allowed me to render it with a video format. Please help!!

    Nobody can help you without system information and otehr details like document dimensions, color modes, timeline settings, render settings and so on. You could have used some weird combination of stuff, you could have a problem with your system's CoDecs. We can't know based on your non-information.
    Mylenium

Maybe you are looking for