javaxuggle

How to know with xuggle a video is a flash video?


If I look the property of a flash video by right clicking and selecting property, it tells me that this video is:

Type: Flash video (video/x-flv)

I really would like to have the same result in java library that I am using called xuggle.

How can I identify all flv videos with xuggle?


Solution

  • First we create a Xuggler container object:

    IContainer container = IContainer.make();
    
    // open the video 
    container.open("myvideo.flv", IContainer.Type.READ, null);
    

    This will return short name like "flv":

    String myvideoFormat = container.getContainerFormat().getInputFormatShortName();
    

    This will return the long name:

    String myvideoFormat = container.getContainerFormat().getInputFormatLongName();