How can I get metddata of video?

Hello
I'm developing video player & annotation system with JMF & Fobs4JMF.
video player works well.
however, I want to get metainformation about video source.
such as video resolution, the number of total frames, duration, and so on.
on the controlPanelComponent of JMF, media property busson shows that meta-information.
but I want to get those information and save into my variables.
how can I do that?
thanks in advance.

You have to look a few different places for the info you're looking for, but here's some sample code to help you out...
/* Load our input video into a DataSource */
DataSource video_in = Manager.createDataSource("test.avi");
/* Create a processor and realize it for our video */
Processor P = Manager.createProcessor(video_in);
P.realize();
/* Extract the TrackControl for the visual track of our video */
TrackControl tc = null;
for (TrackControl temp = P.getTrackControls()) {
     if(temp.getFormat() instanceof VideoFormat) {
          tc = temp;
          break;
/* Check to make sure we have video data */
if (tc == null) {
     System.err.println("Error. Source has no video data!\n");
     System.exit(1);
/* Get the VideoFormat object of our video */
VideoFormat vf = (VideoFormat)tc.getFormat();
/* Print out some info about our video */
System.out.println("Frame rate:  "+vf.getFrameRate());
System.out.println("Duration:    "+P.getDuration());
Systme.out.println("Total frames:"+(int)(vf.getFrameRate() * P.getDuration()));
System.out.println("Resolution:  "+vf.getSize().getWidth()+"x"+vf.getSize().getHeight());
System.out.println("Encoding:    "+vf.getEncoding());

Similar Messages

  • How can I get an mp4 video running on iPad Mini?

    How can I get an mp4 video running on iPad Mini, which is already in the iTunes File?

    Pad2, the new iPad Supported Video Formats & Movie Formats
    H.264 video up to 1080p, 30 frames per second, High Profile level 4.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats;
    MPEG-4 video up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats;
    Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format
    You can use a USB flash drive & the camera connection kit.
    Plug the USB flash drive into your computer & create a new folder titled DCIM. Then put your movie/photo files into the folder. The files must have a filename with exactly 8 characters long (no spaces) plus the file extension (i.e., my-movie.mov; DSCN0164.jpg).
    Now plug the flash drive into the iPad using the camera connection kit. Open the Photos app, the movie/photo files should appear & you can import. (You can not export using the camera connection kit.)
     Cheers, Tom

  • How can you get your iPhone videos to compress to one video instead of 5 different frames?

    How can you get your iPhone videos to compree to one video instead of different frames

    It sounds like you to 5 separate videos. If you start recording, then stop it, then start it again, you will have 2 videos. Not 1. As for splicing them together, you will need a video editing package for your PC. I don't know if Windows Movie Maker (or whatever they're calling it now) can handle this or not. On a Mac, I'd say just use iMovie.

  • How can I get an inserted  video (FLV) in Presenter 7 to stay on the screen once it has finished pla

    How can I get an inserted  video (FLV) in Presenter 7 to stay on the screen once it has finished playing? Right now it disappears once it is done. I'd like it to remain on the screen, or loop if possible, until the user manually moves the presentation forward.

    Hi,
    You may set the slide setting as 'Advance by user'.
    So,
    a. Insert flv on a slide.
    b. On presenter ribbon goto Slide Manager .
    c. Select the slide on which flv is inserted and set Advance by user 'Yes'
    Hope this solves your purpose.
    Thanks,
    Alpi

  • In the iMovie 11 event library, how can I get the iPhoto video clips to combine with my camcorder pics listed below and in chronological order?

    In the iMovie 11 event library, how can I get the iPhoto video clips to combine with my camcorder pics listed below and in chronological order?

    Try forcing iPhoto to load the Library on the External Hard drive by launching it while holding down the Option key. Choose the Library on the External HD, and quit iPhoto, see if iMovie can see the Library with the iPhoto Videos contained inside.

  • How can i get my iPhoto videos to my iPhone?

    how can i get my iPhoto videos to my iPhone ?

    Hi jocelyn279,
    Welcome to the Apple Support Communities!
    To sync videos from iPhoto to your iPhone you would use iTunes to facilitate the syncing. Please use the attached article for information and instructions on how to sync videos.
    iTunes: Syncing photos
    http://support.apple.com/kb/HT4236
    To sync photos from a Mac or Windows PC to your device using photo applications
    Select "Sync Photos from."
    Choose the application you want to sync photos from in the pop up menu.
    Choose to sync all photos or selected photos. Select "Include videos" to sync videos stored with your photo library.
    Click Apply.
    Have a great day,
    Joe

  • HT3775 How can I get a youtube video that I have stored on a flash drive to play?

    How can I get a youtube video that I have stored on my flashdrive to play?  I have tried to open it with quicktime but it still will not open.

    Have you tried VLC ?
    http://www.videolan.org/

  • I just recently upgraded to iMovie 10.0.1.  Now whenever I import video longer than 30 minutes, it automatically splits it at 30 minutes.  How can I get my entire video clip at once without a break again?

    I just recently upgraded to iMovie 10.0.1.  Now whenever I import video clips that are longer than 30 minutes, it automatically splits them at 30 minutes.  How can I get my entire video clip without a break again?

    As long as you know your serial number you can download PSE from here:
    Download Photoshop Elements products | 11, 10
    If you don't know your serial number:
    Find your serial number quickly

  • Hello, how can i get my photos,videos,and contacts of my iphone transfer to my pc. As i have lost my iphone 4

    Hello, how can i get my photos,videos,and contacts of my iphone transfer to my pc. As i have lost my iphone 4

    If you don't have your iPhone anymore, you can't access the data on it remotely.
    However, if you are syncing to iCloud, you can set up iCloud syncing on your computer and at least get your contact info.
    iCloud: Set up iCloud on your devices
    You might also think about putting your device in lost mode or erasing it:
    What steps should I take if I misplace my device?
    If you ever misplace your device—whether it’s just lost or you think it may have been stolen—you should put it into Lost Mode immediately using Find My iPhone.
    Lost Mode locks your screen with a four-digit passcode and lets you display a custom message with your phone number to help you get it back. You can also remotely erase your device if needed, and your custom message will continue to display even after the device is erased.
    While Activation Lock works in the background to make it more difficult for someone to use or sell your missing device, Lost Mode clearly indicates to anyone who finds your device that it still belongs to you and can’t be reactivated without your password.
    To put a device into Lost Mode, sign in to icloud.com/find from a Mac or PC or use the Find My iPhone iOS app.
    For more information, read what to do if your device is lost or stolen.
    copied from Find My iPhone Activation Lock

  • How Can i get my ipod Video 60gb to play on my XBOX 360???

    How Can i get my ipod Video 60gb to play on my XBOX 360???

    she only needs to do that if he needs to change the format. For example if she recorded the clips via her  phone and it's not in a format iTunes will play.  For example if I have a .wmv iTunes won't touch it until I convert it. She could also be talking about video that she recorded on a DVD camcorder that burns the video to a DVD not a memory card. ITunes doesn't convert everything.
    She's transfered the clips to her ipad and the ipad won't play them. So she needs to get them to a m4v or mp4, and you use format converters for that. Not apps but something on the computer.

  • How can I get my icloud videos not to show on my iphone

    Before I downloaded the new iOS 7.02 on my iPhone 4s, only the videos I actually downloaded on my phone would show. Now all of the videos I have on icloud show. How do I get only the videos that I specifically put on my phone to show? I only want to see the ones I put on my phone not all of them. What can I do to stop them all from showing?

    Settings | Video | Show All Videos

  • How can I get high quality video that will play on my Touch as well as ATV?

    Within iMovie there are output settings for the iPod and for the Apple TV. Now I fully understand the video resolution restrictions of the iPod Touch, so I am happy using a widescreen resolution of 640x360 ("Medium" output setting). What I am not happy about is the quality of the Medium setting, which iMovie states is 1.7Mbps. The results are rather blocky to say the least. In comparison, I can output the same movie as "Large", with a res of 960x540 and a bitrate of 4Mbps, and it comes out a little soft, but the blocky artefacts have all but vanished. Unfortunately, of course, the iPod Touch won't play a video with this resolution. I have tried "Export using Quicktime" and can get good quality results. However, the video (although H.264 and 640x360) ends up NOT being compatible with my iPod Touch.
    Basically, how can I output a video of 640x360 that is of the quality I want, and that also plays on my iPod Touch? If the "Export using Quicktime" can be used to achieve this, what are the settings to use?
    Thanks.

    But why shouldn't I be able to have one video to suit both. I am happy with the resolution of 640x360, even on my ATV.
    You can. Unfortunately, your desire for both a data rate greater than 1.7 Mbps (H.264/AAC compression) and the ability to play them on an iPhone/Touch/iPod is mutually exclusive at this time. Thus, you will either have to make different files targeted for different data rates for maximum quality on each device or you make a single file using the maximum allowed data rate for playback on the "slower" device and accept the quality it produces on whichever device you are currently using. If all you want is a higher data rate, use the MPEG4 Simple Profile which allows data rates up to 2.5 Mbps. Just remember that the H.264 codec is about 2.0-2.5 times as efficient and is roughly equivalent to an MPEG-4 Simple Profile file with video encoded at 3.00-3.75 Mbps.

  • How can I get rid of videos?

    For about 10 ten days  free downloads were offered by apple for the iphone. I downloaded them all: music, books, videos. Now I want to get rid of most of them, but I don´t know how? Can somebody help me? (I use itunes match).

    Thank you for your answer. It worked. But I have some more music videos which cannot be deleted that way. There is the icloud icon next to them. I think that means that they are in the icloud and not on the phone. When I open my icloud account there is no itunes library to see, so how can I delete them?

  • How can I get a .MOV video to open?

    A friend of mine has send me a 15-second-long .MOV video file, but I can't open it in QuickTime 10 or QuickTime 7. VLC, Perian, Flip4Mac, and RealPlayer are all duds. The video codecs are H.264 and Linear PCM. I have QuickTime Player 7 in addition to the latest version of QuickTime Player 10. When I try to open the file, QuickTime 10 says "QuickTime Player can't open "MVI_9730.MOV". To see if additional software is available that will enable QuickTime Player to open the movie, click Tell Me More." I clicked that, but it only told me that QuickTime 7 might work. So, I opened it in QuickTime 7, and the application just freezes while saying "Searching for movie data in file "MVI_9730.MOV".". I had to force quit the application because it stopped responding. Any suggestions?

    The file, according to the Finder info window, is about 71 kb in size. The resolution is 1280x720, and, as I previously stated, the video is 15 seconds in length, so the size is somewhat unbelievable. As you say, it sounds like it could be a reference file. How can I tell her to get to the original file? Did she maybe pull it from her camera wrongly? Could she have maybe gotten it out of iPhoto or some other photo library program incorrectly? I'll ask her about the system she's on and what software she's using, maybe that would help with your diagnosis of this could-be "reference file".
    The reason I asked for the combined total data rate was to calculate the "expected" reasonable size of the 15 second file and compare that to the actual size of the file according to the Finder. This will normally confirm whether or not the files is a "reference" file even when th file resource references cannot be accessed in the "Inspector" or "Properties" window. As to how a "reference" file could have been created, there are several possibilities. QT 7 Pro or the MakeReference application can used to deliberately create "reference" files. Editing apps (especially those used on IOS devices) frequently do their editing using reference files to conserve storage space on such devices.
    Edit: Also, the audio data rate is impossible to find from the QuickTime 7 info window. When I try opening the file in QT7, the program says "Searching for movie data in file "MVI_9730.MOV"." However, as a development, the program finally began responding and asked me to search for the file, but I wasn't allowed to link it to the original video, so it said something about how it was missing "required data" to play the video file. Simply put, the file won't open in QT7. In QT10, access to the file is limited, because when I click "OK", the file closes, leaving the program blank and idle with nothing open.
    This is where a media information utility app really comes in handy. For instance, another user had a similar problem recently. In his case the video files were recorded on an iPhone 4 and edited with an app called ProCamera 3.5.5 which created reference files. While the reference files would not open in QT 7, the MediaInfo app was able to provide the following information:
    And, based on this information, it was relatively easy to calculate that the 25 KB reference file was supposed to be resourced to a standalone file on the order of 3,000 times the size of the reference file. Further, the reference file contained the name of the editing application that actually created the reference file. As to the delay in opening your reference file in QT 7, that was due to an automatic attempt by the media player to search your system for the missing standalone file and, when it could not be found, wanted you to locate the file manually if still available elsewhere.

  • How can I get 4:3 video be 16:9 non-stretched but cropped, please

    Hi, I'm new.
    I have a 4:3 digital video camera and a beautiful new 16:9 HD widescreen TV and I am obsessed with the full screen picture. Please can anyone tell me how can I make my 4:3 video become 16:9 non-stretched but cropped, in iMovie.
    I have been editing little clips in iMovie, then exporting to Quicktime Pro where I change the size (crop the size) before exporting to iDVD. Seems to work but also seems cumbersome.
    Can this be done in iMovie?

    I prefer to convert 4:3 <-> 16:9 with MPEG Streamclip. It can do it with or without cropping:
    http://www.sjoki.uta.fi/~shmhav/SVCDon_aMacintosh.html#43-169

Maybe you are looking for

  • [SOLVED]pacman -Sf zim makes arch read-only filesystem

    Hi, Last night I was trying to install zim, it looks like there were a couple packages which weren't properly installed before.  I googled the error I received and found somewhere on the forum the tip to use pacman -Sf package I ran the command and i

  • COBL-PRCTR in transaction VL01N

    Hi Friends, In Vl01N transaction (delivery note creation) we want to make the screen field COBL-PRCTR as input field in an editable mode. Currently this field and all the other filed of COBL are in display mode. Business needs this because of the bel

  • Unzipping

    Have a scenerio in which source is a zip file The zip files contains xml files Sender Adaper : JMS Have to unzip the file in Sender adaper. There is a standard module which meets this functionality. Module Name: AF_Modules/PayloadZipBean(Sap Note:965

  • Lock Box Configuration

    Can anybody told me Configuration for Lockbox in SAP FI module.

  • Shrink file (log) from within a procedure

    I'd like to incorporate the DBCC shrinkfile command to my maintenance procedure. This procedure gets called after I've finished my weekly importing process. I only need to shrink the log files as almost all the modifications are either a record updat