Help me set video format

Hi ALL!
I am trying to set the video format, but it doesn't work, can someone help me?
public void initDevice(int wantedHeight, int wantedWidth, int wantedDepth) {
System.out.println("<initDevice()>");
Vector videoDevices = CaptureDeviceManager.getDeviceList(new RGBFormat());
VFWDeviceQuery deviceQuery = null;
CaptureDeviceInfo deviceInfo = null;
for(int i = 0; i < videoDevices.size(); i++) {
deviceQuery = (VFWDeviceQuery) videoDevices.elementAt(i);
if(deviceQuery == null) {
continue;
deviceName = deviceQuery.getName();
deviceInfo = CaptureDeviceManager.getDevice(deviceName);
if(deviceInfo == null) {
deviceName = null;
continue;
Format[] formats = deviceInfo.getFormats();
int bitsPerPixel = 0;
for(int j = 0; j < formats.length && userFormat == null; j++) {
if(!(formats[j] instanceof RGBFormat)) {
continue;
userFormat = (RGBFormat) formats[j];
if(wantedHeight != userFormat.getSize().height) {
userFormat = null;
} else if(wantedWidth != userFormat.getSize().width) {
userFormat = null;
} else if(wantedDepth != userFormat.getBitsPerPixel()) {
userFormat = null;
if(userFormat == null) {
errorMessage = "Format not found in system devices";
return;
locator = deviceInfo.getLocator();
if(locator == null) {
errorMessage = "Device info not found";
return;
try {
player = Manager.createRealizedProcessor(new ProcessorModel(locator, new Format[]{userFormat}, null));
} catch(Exception e) {
errorMessage = "Player/Processor not found: "+e.getMessage();
player = null;
return;
// player.addControllerListener(this);
if(player instanceof Player) {
visualComponent = ((Player) player).getVisualComponent();
if(visualComponent != null) {
videoPanel.add(visualComponent);
((Player) player).start();
System.out.println("</initDevice()>");

Even though you have posted almost all of your code you don't give enough information.
Are there any exceptions being thown? In there are what is the stack trace? Is the programme running without any problem but there seems to be no effect on the transformation of the video dimensions??

Similar Messages

  • Need help identifying this video format

    A lady on the east coast made a documentary video but said that it was filled with pauses, for some reason. I told her that I'd import it into FCP and edit out the pauses for her.
    So she mailed me the DVD-R, and I tried to play it on my Mac, but DVD Player won't open it (a message appears saying "The media type is not supported.") Nor will the DVD player in a TV I have. Quicktime Player doesn't recognize it either.
    So I have to figure out how to play this thing.
    When I put the DVD-R into the Mac's optical drive, the icon of a DVD appears on the desktop. When I double-click on the icon, a window appears with a folder labeled DVD_VIDEO_RECORDER
    Inside this folder is another one labeled VIDEO_TS
    Inside that folder is a bunch of gray icons with "Exec" on them, labeled VIDEO_TS_BUP, VIDEO_TS_IFO, VIDEO_TS_VOB, and several labeled VTS_01_1.VOB, VTS_01_2.VOB., etc.
    Can anyone help me identify what format this video is in, and what sort of a player can play it?

    It's a DVD Video disc but it sounds like it was not "finalized" in the recorder that made it.
    You might be able to extract the .VOB files (the only interesting parts) with MPEG Streamclip.
    Read this: http://www.secondchairvideo.com/?p=739

  • Need help with Report Generation Toolkit: Excel Set Cell Format.vi

    Hi people,
    I've been searching and found this old thread of someone asking what is the input parameter "Number format". And I dont know what should I put in there. I've tried so many possibilities, but nothing works so far, such as:
    0,0
    0,?
    0,#
    #,0
    ?,0
    and also with @, doesnt works. Where would I find help about this parameter?
    I'm using Excel2003, german version, thus local decimal separator is a comma.
    I also found this help from NI, but seems doesnt help me either. Do I miss something important?
    thanks,
    Yan. 

    Hi,
    I've used your suggestion and some numbers in excel doesnt need to get "right click, change to numbers" anymore (green indicators on the left-top side in some cells are gone). But, I think its still not a number, because I cant use a simple formula, such as in cell A10 I type "= A1/2" (cell A10 equals cell A1 divided with 2) . I got error which says its not a number.
    Well, but other thing is found, any format-string I put in the input of Excel Set Cell Format.vi, such as #,########, will be shown the same as "customize #,########" if I right click in a cell in excel and click "Zellen formatieren" (formatting cell). But however, the numbers are still depends on the input of the format I put in the Append Table to Report.vi.
    regards,
    Yan.

  • Please help i started my project video format 720HD resolution 12x720 rate 25p at last when i finish and burn to dvd the edges are cut off any one help please i am really in trouble

    please help i started my project with  video format 720HD, resolution 12x720, rate 25p.  at last when i finish and burn to dvd the edges are cut off and my logo cut off the screeen aswell any one help please i am really in trouble. thanks

    Sorry, but I don't know anything about that app.
    I did go to their Web site and I see they have a support link. Perhaps you can get help there or in their forum.
    If you are OK with a DVD with a basic menu, you could try the Share>DVD option in FCP.
    Good luck.
    Russ

  • Please help! Not able to set Video input Port(S-Video or Composite)on Linux

    Hi
    I am using JMF2.1.1e(Linux performance pack) for video capturing on Linux OS. I want to set video input port(S-Video or composite) through my application. I am using the following code:
         if ( dataSource != null )
              arrControls = dataSource.getControls ();
         if ( arrControls != null )
              nCount = arrControls.length;
         System.out.println("No. of Controls: " + nCount);     
         for ( i = 0; i < nCount; i++ )
              if ( arrControls[i] == null )
                   continue;
              if ( !(arrControls[i] instanceof Control) )
                   continue;
              componentControl = ((Control)arrControls).getControlComponent ();
              System.out.println("ComponentControl : " + componentControl);
              if ( componentControl == null )
                   continue;
    But, i am getting No. of Controls: 0 (Zero). So i am not able to get any control component also. Rest of the application is working fine. Please help me solving this problem.
    Thanks in advance.

    To go a stage further.
    Google run a Jabber server for their service.
    Jabber apps (those that can) use a Protocol called Jingle to make the A/V connections.
    Google's version is not even that compatible with other Jabber apps. (See Here)
    The Plug-in in the Google Install (Or the Standalone Web Browser Plug-in allow Browsers to access the GoogleTalk A/V side as does the Standalone PC app called GoogleTalk as well.
    iChat uses a process called SIP (Session Initiation Protocol) to connect to other iChat Users or to the AIM for PC app.
    However this also works in any iChat to iChat Connection no matter if the Buddy List is an AIM Login based one, Jabber (including GoogleTalk) or A LAN based Bonjour Chat.
    In you care this is not going to work.
    Getting the Standalone (Intel only) Browser Plug-in and using the Chat option in the Google Mail Web page is probably the easiest option.
    7:31 PM Friday; January 7, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"

  • Looking for help with converting a ppsx file to a video format such as .mov or mp4

    Hi All,  I am looking for conversion software that will allow me to convert a ppsx file to a video file on OS10.5.8. 

    Hi Klaus1, Thanks for your response.  I can open and view the file without difficulty.  My issue is getting into a video format that I can upload to a Website for client viewing.  All the conersion products I can find are for a newer OS then 10.5.8.  I am working on a deadline of midnight tonight-and cannot upgrade that quickly.  So What I need is a conversion program that will still run on my OS

  • How to use different video formats in the one timeline?

    Hi everyone,
    So I am in the middle of stringing together a rough cut for a surf flick/documentary shot in some remote Indonesian islands…
    Things so far are going well, but I am slightly confused regarding the best way to tackle a slight issue (hopefully slight!) of video format compatibility.
    The main shooting for the film was done with .mov video format and this has been imported/captured into final cut pro 7 using the correct settings, which has now formed the basis for my rough cut.
    However, I did a lot of filming with some other cameras (underwater, POV etc) and so also have some crucial footage in different formats that to my knowledge will not be compatible with the timeline that I have already created in FCP.
    The files are as following:
    AVI
    MOD
    MP4
    I am assuming the best way to go about things is convert all these different files into a compatible form that I can then drop straight into my existing timeline.
    Unfortunately, I am just beginning to learn the more techy aspects of editing and I don’t have the first idea of how to go about doing this…?
    Any helpful feedback would be greatly appreciated…
    Thanks in advance,
    m

    Although there are kinds of standard workflows for best quality in final product, it helps to know a bit more about your setup... what is your primary format? Without knowing that, the best way forward is to convert all of your footage to Apple ProRes. Especially the MP4 stuff. There are different ways about doing that, but I personally recommend Compressor. This can take some time depending on the amount and lengths of your shots, but it is well worth the process.
    Make sure you choose 48k / 16bit AIF for all of your shots that have audio. If some of your footage is 1080p and some is 720p, I personally leave that alone because when you have this type of a difference in footage, I like to set my sequence to 720p giving me the option to move or pan the 1080p clips inside of the 720p sequence. Final Cut Pro is very good at handling that difference.
    Hope the edit goes well; sounds like a nice project!

  • 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.

  • When I load pages with video contents like m3u8 I can't see the content from firefox because it says "video format or MIME type is not supporte"

    When I open a link like this:
    http://video.gazzetta.it/puntata-milan-kaka-fa-fuori-faraone/4494065a-13b0-11e3-a11e-38d7c867cc00
    I can't see the video content and I get this error message: video format or MIME type is not supported
    I have adobe flash updated
    I tried to reset firefox
    I have vlc installed
    I can correctly see this link with internet explorer. This is a PARADOX!
    Can somebody help me?

    I see that message when the Flash plugin is disabled.<br />
    If the Flash plugin is enabled or set to click-to-play then a Flash player plays the video.<br />
    Otherwise a video tag is created with a link to an m3u8 stream that Firefox apparently doesn't support.
    You can try to disable all other plugins that deal with media files (start with VLC) to see if that helps.

  • Need help on playing videos on 80 Gb I Pod Classic

    Hi,
    I need help!!!!!!!!!!!
    My I Pod Classic 80 GB jus wont play any video files.
    I have set it to manually sync songs and videos using iTunes.
    I dont have a problem with any of the music files.
    The video files just would'nt play.
    The video files are in the .mov format and play both in my quick time player and in i tunes.
    However, when I try to add the videos to the iPod, it displays the following error message
    "MC_1 was not copied to the iPod 'ar iPod' because it cannot be played on this iPod"
    This ipod is new and since i brought it it this is the first time am adding videos to the iPod.
    Any suggestions?
    P.S. I have also tried automatic sync from itunes and also reset iPod to the factory settings.
    Message was edited by: ar_08

    Hi Ar_08. It is probably a problem with video format. Make sure you are using a compatable format. What extension does the filehave on it. Check this link - http://support.apple.com/specs/ipod/iPod_classic.html . It will give you information about video and audio format. Good luck.

  • 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.

  • Unconstrained video format.

    I am currently working on a 3500x1000 video but I am unable to render it at full 3500x1000 pixel as most of the output format have been constrained to maximum of 1920x1080
    can anyone please help me with a setting that can compress the video into a good quality yet compressed video size? I have tried Quicktime compression but for 10 seconds, the video was like 600MB+
    I am using the video for a LED wall and using a Windows operating system (Dataton Watchout) as the player, I have tried to split the video into two 1750x1000 but there was delay between 2 videos when projected on the LED wall, and large video format will just slow down the system. My final solution was to create a 1920x1080 video and double it to 3500 pixels but I am avoiding to do so.
    Thanks in advance
    p.s. I have seen someone actually created a 3840x1080 quicktime video and then using a mac system to convert it into .mpeg video with 3840x1080. But I have no idea how it was done.

    Render to a lossless format like Quicktime Animation (100% quality) from After Effects.  Then compress using another compression tool:  Adobe Media Encoder, Apple Compressor, Quicktime Pro, Episode Pro etc.
    What is the the Watchout system driving - how many displays?  In what format/arrangement?  Typically, it's best to provide Watchout video in segments suitable for each output device, rather than one huge file on all devices.  The delay you experienced between files was probably the result of inadequate drive I/O speed.
    If, for example, the display is created using two parallel projectors at 1920x1080, you're far better off building your comp at the full resolution, then rendering two segments at the native resolution of the two projectors, taking overlaps etc into account.

  • ZEN 4GB Video Format H

    Hey, before i?buy the zen 4gb i'm wondering what video format the player plays without having to transcode. For example, if I put an avi divx movie on the memory card will it play on the device, just like that, without transode?You can tell me technical stuff i'll understand, for example: format:avi?video codec:divx audio codec:mp3?thank you jimi :-D

    cos u used the included bundled software... the bundled software has already helped u to transcode the video files from other format to WMV... at the same time, with the resoultion set to ur player designated resolution.... thats reason allowing u to play all video u want to put it into ur ZEN V...For the ZEN, u can just put video files?(DivX, XviD, WMV, MJEGP,?simple MPEG4)?into ur player without the need of u to use the bundled software to convert them to WMV... but as other has said ur solution has to be 320x240 which in most of the case u might need to use teh bundled software since most video files are set to resolution higher than this....

  • 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

Maybe you are looking for

  • How do i stop my Yahoo email from auto signing me into it when i sign into firefox

    when i sign into firefox, and if i have new email, my email auto opens when i sign into firefox. i don't have to give my password. in the bottom right part of the page, a box pops up and says i have (so many) new emails, there is a box to click on an

  • Context Index and performance

    Hi, I want to create a context index on one column which contains large text. And the table contains millions of records and daily inserts happen into the same table. My question is 1.Do we need to run any procedures after inserting the records daily

  • Blackberry Bold 9900 would not sync with Desktop Software for MAC

    When connecting my Bold 9900 to my MAC the Desktop Software opens correctly, phone is recognised and connected but the SYNC option is not available. I cannot click the Green sync button nor click the relevant sync button under the device tab. All ans

  • JAR file including database connection

    Hello, I made an application ( GUI ) which uses a MS acces Database. I used Netbeans, so a JAR file is automatically created. The only problem is that when I run the Jar file ,the application isn't able to find the connection with the database. Very

  • IPhone 6+: MMS wrong charges.

    I have recently noticed I have been charged for MMS (33.3p) messages that were none of the things below: - NOT more than 5 group message. - NOT over 160 chars (with NO emoji). - NOT containing links or media.  This is really annoying, as then I have