How to get the Frame size in H.263 by JMF ?

Dear all,
How to get the individual frame size in H.263 format if the H.263 file is a format of InputStream ???

VideoFormat.getSize() returns a Dimension of a frame. H263Format is a subclass of VideoFormat. Guess you could get that object from getFormat() in your stream if it's a PullBufferStream. Or, with a Processor, you could do getTrackControls() and iterate through the TrackControl.getFormat()s until you find the VideoFormat.
Suppose you could also get a FrameGrabbingControl, grab a frame and get the Dimension from him.
--invalidname

Similar Messages

  • How to get the correct size of the loaded swf file?

    final public class main extends Sprite
      public function main()
       loaderInfo.addEventListener(Event.COMPLETE, _onLoadCompleted);
      private function _onLoadCompleted(event: Event): void
       var tw: int = stage.width;
       var th: int = stage.height;
       var tsw: int = stage.stageWidth;
       var tsh: int = stage.stageHeight;   
    Above is my simple as3 project in flex builder 3.
    My screen resolution is 1920*1080, when debugging, the swf is stretched to the full client area of the IE, but the stage.stageWidth is 500 and the stage.stageHeight is 375, both the stage.widht and stage.height are 0, who can tell me why and how to get the right size of the swf file, named the client area size of the IE in this situation?
    Thanks very much!

    The HTML wrapper might resize the SWF later, so wait a frame and check stageWidth/stageHeight again.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • How to get the file size (in bytes) for all files in a directory?

    How to get the file size (in bytes) for all files in a directory?
    The following code does not work. isFile() does NOT recognize files as files but only as directories. Why?
    Furthermore the size is not retrieved correctly.
    How do I have to code it otherwise? Is there a way of not converting f-to-string-to-File again but iterate over all file objects instead?
    Thank you
    Peter
    java.io.File f = new java.io.File("D:/todo/");
    files = f.list();
    for (int i = 0; i < files.length; i++) {
    System.out.println("fn=" + files);
    if (new File(files[i]).isFile())
         System.out.println("file[" + i + "]=" + files[i] + " size=" + (new File(files[i])).length() ); }

    pstein wrote:
    ...The following code does not work. Work?! It does not even compile! Please consider posting code in the form of an SSCCE in future.
    Here is an SSCCE.
    import java.io.File;
    class ListFiles {
        public static void main(String[] args) {
            java.io.File f = new java.io.File("/media/disk");
            // provides only the file names, not the path/name!
            //String[] files = f.list();
            File[] files = f.listFiles();
            for (int i = 0; i < files.length; i++) {
                System.out.println("fn=" + files);
    if (files[i].isFile()) {
    System.out.println(
    "file[" +
    i +
    "]=" +
    files[i] +
    " size=" +
    (files[i]).length() );
    }Edit 1:
    Also, in future, when posting code, code snippets, HTML/XML or input/output, please use the code tags to retain the indentation and formatting.   To do that, select the code and click the CODE button seen on the Plain Text tab of the message posting form.  It took me longer to clean up that code and turn it into an SSCCE, than it took to +solve the problem.+
    Edited by: AndrewThompson64 on Jul 21, 2009 8:47 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to set the frame size?

    Hi,
    Can some one show me how to set the frame size in this program? History: I have created a window and added a button but its to small. So I want to increase the size of the frame to at least 600X400 pixel.
    private static void showGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("ButtonDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            Main newContentPane = new Main();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        }It would be nice if you could show me how to do it.
    Thank you very much for reading this.

    Challenger wrote:
    Simply adding
    frame.setSize(new Dimension(600,400));to the end of your code should work perfectly.Or, if you want to do it correctly, .setPreferredSize() on your frame before you .pack() it. The default layout manager for JFrame is BorderLayout, which uses the preferredSize of each component to calculate sizes during the .pack() call.

  • How to get the byte[] size dynamically from the StreamMessage object

    Hi all,
    Using JMS, I am receiving the FDF file as StreamMessage from the queue and attaching it to the PDF file which is present in the local system.
    For that, I have written the code as follows:
    {color:#0000ff} Message msg = jmsTemplate.receive();
    if(msg !=null && msg instanceof StreamMessage)
    StreamMessage message = (StreamMessage) msg;{color}
    {color:#ff6600}//hardcoded the byte array size value
    {color}{color:#0000ff} byte[] bytes = new byte[{color:#ff0000}856{color}];
    System.out.println("read msg="+message.readBytes(bytes));{color}
    {color:#0000ff}PdfReader pdfreader = new PdfReader("D:\\Managing_Workflows_No_Comment.pdf");
    PdfStamper stamp = new PdfStamper(pdfreader, new FileOutputStream("D:\\12345.pdf"));
    FdfReader fdfreader = new FdfReader(bytes);
    stamp.addComments(fdfreader);
    {color} {color:#0000ff} stamp.close();
    {color}{color:#000000}The above code is working fine except with the hardcoded of {color:#ff0000}byte array{color}{color:#ff0000} size value{color} which is given in {color:#ff0000}RED{color} in color.
    Can anybody know, {color:#000000}*how to get the byte[] size dynamically from the StreamMessage*{color} object ?
    Any help would be highly beneficial for me !!!!
    Thanks and Regards,
    Ganesh Kumar{color}

    When you create your stream message you could add an property to your message, something like streamSize that would contain the number of bytes in your stream message. Then you could get this property from the message before declaring your array.
    Tom

  • How to get the frame rate of my application

    Hi again...
    How can I get the frame rate of my application?
    I also want the frame rate value to be the title of the frame, updated every second. How do I do that?
    thanks in advance...

    To get the path where your application has been installed you have to do the following:
    have a class called "what_ever" in the folder.
    then you do a litte:
    String path=
    what_ever.class.getRessource("what_ever.class").toString()
    That get you a string like:
    file:/C:/Program Files/Cool_program/what_ever.class
    Then you process the result a little to remove anything you don't want:
    path=path.substring(path.indexOf('/')+1),path.lastIndexOf('/'))
    //Might be a little error here but you should find out //quickly if it's the case
    And here you go, you have a nice
    C:/Program Files/Cool_program
    which is the path to your application.
    Hooray

  • Help ...how to get the file size on a server

    Hi.I use this code to parse a file that is on a server.
    The question is: how can i get the file size (bytes size)?
    Thanks.
    //Open the file for reading:
    URL u = new URL(entry);
    InputStream inputXML = u.openStream();
    //Build document:
    DocumentBuilder builder = factory.newDocumentBuilder();
    doc = builder.parse(inputXML);

    Try this instead:
    URL u = new URL(entry);
    URLConnection conn = u.openConnection();
    // get the file size
    int size = conn.getContentLength();
    // open the input stream from the URLConnection (which is functionally the same as opening it directly from the URL)
    InputStream inputXML = conn.getInputStream();
    Shaun

  • How to get the disk size

    Hi, everyone, does anyone know how to get the size of the disk, say hard disk? In the Writing Device Driver it says that the block device driver must create an 'nblocks' property for each minor block device. I want to get the size of the block device in another driver. Is there any DDI/DKI kernel function for this?
    How to get the same thing in a user mode application? Is there any API to do this?
    Thank you very much.

    I just found a function in include/sys/conf.h. The prototype is:
    extern int bdev_size(dev_t);
    Can I use this function to get the disk size of the device dev_t? I couldn't find the documentation of this function.
    Thanks

  • How to get the current size of screen in developer/2000 2.1?

    sir:
    I want to design the program that can be suitable for the
    various sizes of screen ,for example 640*480,600*800,At the same
    time ,According to the size,I can change the size of form ,
    how can I do that?
    null

    maximize the MDI window by
    set_window_property(forms_mdi_window,window_state,maximize);
    then get the size of MDI window which is the size of screen.
    by get_window_property;
    gang lee (guest) wrote:
    : sir:
    : I want to design the program that can be suitable for the
    : various sizes of screen ,for example 640*480,600*800,At the
    same
    : time ,According to the size,I can change the size of form ,
    : how can I do that?
    null

  • How to get the frame position after being moved.

    I created a frame, after I moved it by my mouse, how can I get the new position?

    you could use getLocation() of a JFrame, maybe call it with a mouselistener or windowlistner.

  • How to get the frame number of a label in a different scene.

    I am completely stumped on this.
    I have my project setup as the gameplay in one scene, and another scene for the outcome.
    The outcome scene, say called, GameDone, has 2 frames. The first frame for win, labeled it WON, the second frame for lost, labeled LOST.
    I could do the very simple thing and just gotoAndStop("GameDone", 1); but thats a bad practice, I believe.
    Ive gone through google and found the closest thing needing a MovieClip. I could not figure out what to give it? A random MovieClip? a new one? one from the next scene? one from the current scene?
    import flash.display.Scene; 
    for (var i:uint = 0; i < mc1.scenes.length; i++) {
         var scene:Scene = mc1.scenes[i];
         trace("scene " + scene.name + ": " + scene.numFrames + " frames");
    That was an adobe sample.
    So how could I, in the gameplay scene, the frame number for either WON or LOST in the "GameDone" scene?
    Thanks.

    Try doing the simple thing that you think is a bad practice.  I don't know why you think it is.  The only problem with it is that you appear to have it backwards for AS3... in AS3 it is gotoAndStop(frame,scene);
    Why don't you use the frame labels instead of frame numbers?  gotoAndStop("Won", "GameDone");

  • How to get the database size of several system

    Hi
    We've got a lot of database system on our landscape. I want to make a simple report to get the size the all our database on a weekly base.
    I try to get a RZ20 value on it without succes.
    Do you know a sql request that i could launch on all my database to get this information ? i did'nt find any V$^view with this information.
    thanks for your help
    florent

    "The database size" can be
    - the total size
    - the filled size
    - the filled size without undo/temp
    You can use DBACOCKPIT to centrally manage multiple instance and check the sizes.
    Markus

  • How to get the Database size?

    Hai Friends,
    I have created a Z Table with 100 fields. i want to check the database size after uploading the data. How can i do this?. That is, after uploading the first entry i want to know the size and again i want to upload 5 more entries and to check the growth.
    Where can i see this?. i have checked in DB02 but even after data upload i didnt see the size. kindly explain me the process.
    Thanks..................

    Hi,
    In the Go to Menu then Check the Number of entries to track your current set of entries.
    For DB Size  check Technical Settings . Tab Logical Settings parameters the Data class and Size category can give you how much data the table can hold.
    Thanks,
    Anita

  • Can any body tell me  how to decrease the frame size of the calendar(in calendar.js)

     

    Hi Kamala,
    suppose..two fields are there in screen Material and Material desctiption.
    After entering Material if u press enter material description aslo dispaly in the corresponding field.
    for this.
    PBO.
    >>>>>>>>>
    PAI.
    MODULE  get_materail_description.
    Mobule Get_materail_descripton.
    If sy-ucom is SPACE.
    Select Maktx into (screen field) from MAKT.
    ENDIF.
    END MODULE.
    Regards,
    Sunil.

  • How do I get the byte size of a server file before sending output via HTTP?

    I need to get the byte size of the file prior to streaming it. I can't seem to find a class/method I need. Basically, I have the path c:\\tomcat\\webapps\\documents\\sample.pdf in the servlet, I was hoping I could just use something from the File class but I couldn't find anything that seems to do the trick?
    thanks, in advance,
    Chuck

    maybe the source of the problem will help...I am trying to stream a PDF to IE and a blank page is being generated although all other file type work.
    I have found a lot of answers in the forum but no specific code examples. Here's what I have so far from picking through threads in here (can someone please show me how to get the byte size of the file so that I can assign it to the method response.setContentLength();?):
    String CONTENT_TYPE = " ";
         String target = " ";
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
         StringBuffer buf = new StringBuffer();
         HttpSession session = request.getSession();
         String file = request.getParameter("filename");
         target = file;
         int end = file.length();
    int beg = end-2;
         String type = file.substring(beg, end);
         if (type.equals("DOC")){
              CONTENT_TYPE = "application//vnd.msword";
         }else if (type.equals("XLS")){
              CONTENT_TYPE = "application//vnd.x-excel";
         }else if (type.equals("PPT")){
              CONTENT_TYPE = "application//vnd.ms-powerpoint";
         }else if (type.equals("PDF")){
              CONTENT_TYPE = "application//vnd.x-pdf";
         }else if (type.equals("MPP")){
              CONTENT_TYPE = "application//vnd.ms-project";
         }else if (type.equals("ZIP")){
              CONTENT_TYPE = "application//ZIP";
         }else if (type.equals("TXT")){
              CONTENT_TYPE = "text//plain";
         }else {
              CONTENT_TYPE = "text//html";
         //File f = new File(file);
         //int l = f.length();
         response.setContentLength(l); <----- supposedly this fixes my problem but I don't know how to get the byte szie of the file in an integer??
         // reset the response
         response.reset();
         response.setContentType(CONTENT_TYPE);
         try{
         // Get streams
         FileInputStream fileInputStream = new FileInputStream(target);
         ServletOutputStream servletOutputStream = response.getOutputStream();
         // Init byte count and array
         int bytesRead = 0;
         byte byteArray[] = new byte[4096];
         // Read in bytes through file stream, and write out through servlet stream
         while((bytesRead = fileInputStream.read(byteArray)) != -1) {
         servletOutputStream.write(byteArray, 0, bytesRead);
              servletOutputStream.flush();
         // Flush and close streams
         servletOutputStream.flush();
         servletOutputStream.close();
         fileInputStream.close();
         } catch (Exception e) {
         System.out.println(e.toString());

Maybe you are looking for

  • The google feeling lucky app from the address bar is not working, a program called vshare performs a search instead and I am unable to restore the original function. please help

    I do not know how but vshare, has been performing a search everytime I type something in the address bar that is not a complete website i.e. facebook instead of facebook.com this is very annoying and I am unable to uninstall vshare, I have even tried

  • PDF form  in "extended PDF Reader"

    I create a PDF form and save it as "extended PDF Reader", enabling additional features. When I open it with Acrobat Reader, the first time I can save, but when I open it a second time, not to save directly but asks me to save with another name. Can I

  • Can't restore ipod or update

    I have a 2nd gen ipod i've had it for a while now.. 2 years? Anyways my ipod was acting weird, like i couldnt transfer songs or delete them, itunes would just freeze. So i try restoring it, but the bar doesnt move, and i get the error message "Cannot

  • Server error '/' Application

    VIsiting some sites I get this msg: server error '/' Application Have scanned the net for solutions and tried these: 1. DNS flush (dscacheutil -flushcache) 2. Reset browsers. I have tried Firefox, Safari and Camino. All show the same error msg on tho

  • 500 Internal Server Error in webdynpro

    Hi all,           i am getting the following error when i tested the application in QAE. The error stack trace is com.sap.tc.webdynpro.services.session.LockException: Thread SAPEngine_Application_Thread[impl:3]_14 failed to acquire exclusive lock on