How can I extract metadata using JMF

Hello, I want to extract metadata such as artist, pulisher, name, author
, etc. from media files. Can Java Media Framework do? Personally, I did
not find any APIs from JMF Javadoc.
thank you

please help me, thanks :)

Similar Messages

  • How can I extract metadata from file names?

    If I want to extract metadata from file names? How can I do that? I want to read through the file names and when I get to a certain character ("-"), I can take the string just before that character and store it in a column in SharePoint. Is this
    do-able through scripting? 

    If I want to extract metadata from file names? How can I do that? I want to read through the file names and when I get to a certain character ("-"), I can take the string just before that character and store it in a column in SharePoint.
    Is this do-able through scripting? 
    You should be able to leverage the split method.
    In PowerShell It would look like:
    # Gather the file name
    $file = "myawesome_filename-Month-Day-Year-Ect.doc"
    #split the file name by the "-" character
    $file = $file.split("-")
    # Use a foreach Loop to gather the individual items.
    foreach ($item in $file) {
    write-host $item
    #Outputmyawesome_filename
    Month
    Day
    Year
    Ect.doc
    # If you want to only grab the first item, you can do $file[0] <-- powershell starts counting with zero base.
    $file[0]
    #output
    myawesome_filename
    Entrepreneur, Strategic Technical Advisor, and Sr. Consulting Engineer - Strategic Services and Solutions Check out my book - Powershell 3.0 - WMI: http://amzn.to/1BnjOmo | Mastering PowerShell Coming in April 2015!

  • How can i extract using while the time from the string ?

    First time how can i extract the time as string ?
    And second how can i extract the time as DateTime.Now ?
    public static void ExtractDateTime()
    htmltoextract = new Uri("http://test.com");
    client = new WebClient();
    f = client.DownloadString(htmltoextract);
    client.Dispose();
    int index = 0;
    while (index != -1)
    int t = f.IndexOf(firstTag);
    int g = f.IndexOf(lastTag);
    a = f.Substring(t + firstTag.Length, g - t - 8);
    The string look like this: thisisateststring201309202145andthenextimeinthestringis201309202130andthelastofthisexampletimeinthisstringis201309202115
    What i need to do is first time to extract the time as string to a List<string> like this:
    index 0 201309202145
    index 1 201309202130
    index 2 201309202115
    The second time to extract the times as this time format: YYYYMMDDhhmm and also to add the times to a List.
    First time and second time i mean first example and second example. To use my code but first time to extract it as strings second example as the format of YYYYMMDDhhmm
    And i need to use the while and indexof and substring in this cases.

    Is the region always going to be "eu" or are you going to have more than one region.  Since you are reading a string DateTime from different timezone than the computer you are reading the data you have to convert to a different timezone. 
    It looks like you have at least 'is' and 'eu' for regions.  I don't know what offsets you need so try something like this.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Text.RegularExpressions;
    using System.Globalization;
    using System.IO;
    namespace ConsoleApplication1
    class Program
    static void Main(string[] args)
    string input = File.ReadAllText(@"c:\temp\test.txt");
    string pattern1 = @"imageUrls = \[[^\]]*\]";
    Regex ex1 = new Regex(pattern1, RegexOptions.Singleline);
    string pattern2 = @"region=(?'region'[^&]*)&time=(?'time'\d{12})";
    Match match1 = ex1.Match(input);
    Regex ex2 = new Regex(pattern2, RegexOptions.Singleline);
    MatchCollection matches2 = ex2.Matches(match1.Value);
    IFormatProvider provider = CultureInfo.InvariantCulture;
    List<DateTime> dateTime = new List<DateTime>();
    foreach (Match match2 in matches2)
    string region = match2.Groups["region"].Value;
    DateTime dt = DateTime.ParseExact(match2.Groups["time"].Value, "yyyyMMddHHmm", provider);
    switch (region)
    case "eu" :
    dt.AddHours(1);
    break;
    case "is":
    dt.AddHours(-1);
    break;
    dateTime.Add(dt);

  • How can i extract data strings (temp. press. rel.hum etc) using a Virtual interface through an RS-232 connection​?

    How can i extract data strings (temperature, pressure, relative humidity etc) using a Virtual interface through an RS-232 connection?

    Try this.  It is in LV 8.5.
    Note the double % in the format string.  This is so the % in the input string is treated as a percent rather than a code.
    You may also have to work with the line feed characters in case they are different in the string coming in compared to how the string shows up in the web browser.
    Message Edited by Ravens Fan on 02-12-2008 10:19 PM
    Attachments:
    Example_BD.png ‏4 KB
    Untitled 11.vi ‏9 KB

  • How can I extract only the audio as an aiff file?

    Using a Sony DSC-N2 Cybershot Camera I recorded video that was saved as “MOV01606.MPG”. The video plays back with sound in Quicktime Pro and iTunes but how can I extract only the audio as an aiff file?

    Use MPEG Streamclip (free) to convert your .mpg files to QuickTime formats.
    QuickTime can't extract audio from muxed file formats.

  • How can I extract the two channels from a stereo track?

    Hi,
    I am writing a class that is able to draw an audio signal. It seems to be working well but I have a question. If I load a mono audio file I am able to draw it on a graph by using the byte[] array and everything is ok until now. That's the code:
    void Draw(byte[] x)
                Graphics g=getGraphics();
                Graphics2D g2=(Graphics2D)g;
                g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,                     RenderingHints.VALUE_ANTIALIAS_ON);
                for(int i=0; i<x.length-6; i++)
                    g2.draw(new Line2D.Float(((i*(getWidth()-6))/x.length)+5, (getHeight()/2)-          ((x*(getWidth()-6))/x.length), (((i+1)*(getWidth()-6))/x.length)+5, (getHeight()/2)-     ((x[i+1]*(getWidth()-6))/x.length)));
    The results is correct only if I have a mono track. Obviously when I get a stereo track the array becomes very large so here the question. How can I extract the two audio channels from a stereo track?
    Thanks in advance.
    Maurizio Di Vitto                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    A mono audio stream is stored [sample, sample, sample, sample], so just a list of samples in an array.
    A stereo sample is interleaved in the same manner, so you get [left-sample, right-sample, left-sample, right-sample]
    So every nth sample is the 1st channel, every nth+1 is the 2nd channel...

  • How can I extract the data from Xstring .

    Hi Gurus ,
    How can I extract the data from a XSTRING  .
    I have to get the data which is filled in the survey form the data is getting saved in form of xstring .
    Someone told me that there is a standard FM for that . but I am not able to find .
    Please reply with the FM in case some one knows about it .
    Thanks in advance .

    The following code works as of 7.0 (in any SAP system):
    FORM XSTRING_TO_STRING USING input TYPE xstring CHANGING output TYPE string.
    TYPES : BEGIN OF ty_struc,
              line TYPE c LENGTH 100,
            END OF ty_struc.
    DATA lt_char TYPE TABLE OF ty_struc.
    DATA length TYPE i.
    length = xstrlen( input ) / cl_abap_char_utilities=>charsize.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
      EXPORTING
        buffer                = input
      tables
        binary_tab            = lt_char.
    CONCATENATE LINES OF lt_char INTO output RESPECTING BLANKS.
    output = output(length).
    ENDFORM.
    Edited by: Sandra Rossi on Mar 30, 2010 12:24 AM

  • How can I extract the results of my squence?

    Hello, I'm a beginer of test Stand.
    I've created a main squence with LabView & TestStand, and works well, when it finish TestStand automatically creates my report. I need to extract these results of my sequence in order to create a custom document automatically, creating an action with LabView that works with these results, without any action of an operator.
    How can I extract these results? Thanks you very much.

    Hello,
    you've got several options here, although it seems you might want to go with the first option:
    1) After running your sequence, you'll find all the results needed for creating a report on the variable Locals.ResultList, which is an array of objects (of the Result type). You can pass this array to external code for it to use the information (i.e. create a report)
    2) You can override the report generation callback on your process model (Test Report callback)and create your own LabVIEW-based report generation sequence/routine
    3) You can modify the report generation sequences on the process model to suit your needs (always make backup copies and place your modifications on the /Components/User folder !)
    I would also recommend you to assist National Instruments Training Courses, as these things can be seen in detail and provide you a better understanding of all the options TestStand has.
    Regards,
    Jorge M.Mensaje editado por Jorge M.

  • How can I extract a page from a document if I don't have that option on my tools menu?

    How can I extract a page from a document if I don't have that option on my tools menu?

    iPhoto on the iPad can be used to make photo books, but not calendars. It is a very different program from the Mac version of iPhoto. I hope you have access to a mac to create your christmas calendar.
    http://help.apple.com/iphoto/ipad/2.0/?handbuch#blnkbc26e276
    Search the AppStore for "Foto Calendar". I have not tried any of these apps, but there are quite a few, that claim to be able to create an "Awesome foto calendar"

  • How can I extract single pages from pdf document

    how can I extract a single page from pdf document

    Purchase and install Acrobat XI. 
    Open a multi-page PDF.
    Use the click path of:
    Tools - Pages - Under "Manipulate Pages": Extract
    Be well...

  • BootCamp driver won´t work on my MacBook. How can I extract it from DVD?

    Hi folks.
    I´m new on BootCamp.
    After installing Windows XP SPII, witch works fine for me, I tryed to install the BootCam drivers.
    But: The Leopard DVD won´t start - like in the manual How can I extract the Drivers from the
    Leopard DVD to copy them to the BootCam partition to install them manually?
    Thank you al lot!

    It is a known problem on Microsoft's end.
    From their site:
    "SYMPTOMS
    Microsoft Windows XP Service Pack 2 (SP2) cannot read DVD-RW disks that use the Universal Disk Format (UDF) 2.00 defect management system. When you view the DVD contents by using Windows Explorer, you see an empty... ...A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.
    To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:
    http://go.microsoft.com/?linkid=6294451"
    I posted this in reply to another thread:
    "It is a known Microsoft issue with UDF in some SP2 versions, and there is a hotfix for it.
    search for this in Google:
    "DVD-RW disks appear to be empty" hotfix
    You can do it 3 ways:
    1) If you run the Xp updater (which may take hours) and follow all the instructions, reboot and run the updater again... and again until all the updates are there, then you will get the fix.
    2) Find , download and install just the hotfix... it may take some looking...
    3) contact Microsoft from their site and get the hotfix from them. "

  • How can I extract a km-iView out the portal to redefine it?

    Hello folks,
    I want to redefine the com.sap.km.cm.navigation-iView to serve generic access to the users home drive by using the <User.UserID>-variable. Therefore I have to extract/download the iView out of the Portal. I wasn't able to find KM-Content in Systemadministration->Support->Portal Runtime->Browse Deployment. What do I have to do?
    How can I extract a km-iView out the portal to redefine it?
    Regards
    Steffen

    Just as an example:
    package com.btexx.proxy;
    import com.sapportals.portal.prt.component.*;
    import com.sapportals.portal.prt.pom.IEvent;
    import com.sapportals.wcm.repository.ResourceException;
    import com.sapportals.wcm.repository.ResourceFactory;
    import com.sapportals.wcm.service.IServiceTypesConst;
    import com.sapportals.wcm.service.urlgenerator.IURLGenerator;
    public class Example extends AbstractPortalComponent
         protected void doOnNodeReady(IPortalComponentRequest request, IEvent event){
              String uname = request.getUser().getLogonUid();
              String path = "/userhome/"+uname;
              String rndLayoutSet = "ConsumerExplorer";
              String explorerServletPath = "/irj/servlet/prt/portal/prtroot/com.sap.km.cm.navigation";
                   try {
                        IURLGenerator ug = (IURLGenerator) ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.URLGENERATOR_SERVICE);
                        explorerServletPath = ug.getExplorerServletPath();
                   } catch (ResourceException e) {
              request.redirect(explorerServletPath+path+"?rndLayoutSet="+rndLayoutSet);
        public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
    + portalapp.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <application>
      <application-config>
        <property name="SharingReference" value="usermanagement, knowledgemanagement"/>
      </application-config>
         <components>
              <component name="Example">
         <component-config>
              <property name="ClassName" value="com.btexx.proxy.Example"/>
              </component-config>
                   <component-profile>
                        <property name="com.sap.portal.reserved.iview.Redirect" value= "true"/>
                   </component-profile>
              </component>
         </components>
    <services/>
    </application>
    all the best,
    dimitry

  • How can I extract a piece of video from a DVD ?

    Dear all,
    I recorded a DVD of a TV broadcast. I'd like to get an extract from it and use it in a presentation later (such as powerpoint).
    How can I extract the piece of video ?
    Is is possible to record it with quicktime (for example) or any other application ?
    thanks for your help
    Didier

    MPEG Streamclip and the Apple MPEG-2 component will allow you to edit the VOB files off the DVD and export to MPEG-4. Searching here will provide this answer several hundred times as it is asked a LOT. More so for iPod users. You cannot export or edit and then export MPEG1/2 with Quicktime unless you do not need the audio as there won't be any.

  • How can I extract ? Please help me.........

    First of all, I am very new user to XML and also Java. If my question is nonsense, forgive me, please.
    I would like to test that the string in the node are equal with some string that I want to search. I use DOM API.
    The following code are ok for the node is directly included text CDATA. The program gives the true value. In the following simple code, I tried to search the string "ACTI".
    for example; the node, <LABEL>Problem in Activity</LABEL> , I got "true".
    But I would like to match also the node ,
    <SLOT label="slot" kind="a/o" role="occurs in" class_constraint="Activity" >
    There is also "Activity" string value in class_constraint.
    So how can I extract and match that string data?
    Help me please!
    case Node.CDATA_SECTION_NODE:
    System.out.println(node.getNodeValue());
    if (node.getNodeValue() != null) {
         String aa = (node.getNodeValue().toUpperCase());
         if ( (aa.indexOf("ACTI") >= 0))
         System.out.println("true");
         else
         System.out.println("false");
    <CONCEPT>
    <LABEL>Problem in Activity</LABEL>
    <SLOTS>
    <SLOT label="slot" kind="a/o" role="occurs in" class_constraint="Activity" >
    </SLOT>
    </SLOTS>
    </CONCEPT>

    Thank you very much for your help.
    I do appreciate your reply.
    As I gave my code example in my first post, I parse the XML document and I checked each node whether it is CDATA Node or Document Node, Element Node, and so on.. I used CASE statement.
    If it is CDATA node, I compare Node value and the string I want to search.
    At that time, I faced the problem that you solved already, I didn't know how to compare in attribute node.
    With your suggestion, I can compare now.
    But the problem now is that... when I extract element by tag name, it cannot test node by node.
    So, how can I combine these two code?
    Actually, what I am going to do is that if node is not match (in anywhere) with the string what I want to search starting from parent node to all child nodes, I want to delete that node starting from parent node and it's childs. And I want to create a new XML document by deleating unmatched nodes.
    For example, in the following XML, I would like to delete the second <CONCEPT> node while I search for "Acti" string. There is no "Acti" in the second.
    <CONCEPT>
    <LABEL>Problem in Activity</LABEL>
    <SLOTS>
    <SLOT label="slot" kind="a/o" role="occurs in" class_constraint="Design" >
    <SUB_L label="" def="" role_name="" class_const="Activity" />
    </SLOT>
    <SLOT label="slot" kind="a/o" role="occurs in" class_constraint="Const" >
    <SUB_L class_const="Activity" />
    </SLOT>
    </SLOTS>
    </CONCEPT>
    <CONCEPT>
    <LABEL>Problem in REQ</LABEL>
    <SLOTS>
    <SLOT label="slot" kind="a/o" role="occurs in" class_constraint="Req" >
    <SUB_L class_const="Change" />
    </SLOT>
    </SLOTS>
    </CONCEPT>

  • How can I keep metadata on an embedded EPS file in AI?

    How can I keep metadata on embedded EPS images (from Photoshop) in Illustrator, like it does for JPG?
    The top image is an eps I embedded, and the bottom one is a JPG. They are both located on a remote server.
    Any help will be appreciated.
    Thanks!

    I do the same thing as you do...
    My music is on an external drive as to not use up gigabytes of storage that need not be used for media.
    There are a couple basic principles to iTunes that I believe you should know.
    1. iTunes is not a media storage program. It does not store your media "in iTunes". It simply is an organization tool for your media already on a hard disk.
    2. As iTunes is not a storage mechanism, it has no way to "know" whether or not the media that is listed is actually there. This is where the "design" of iTunes comes into play.
    I like to think of iTunes as a bread-crumb trail. The "music" in iTunes, isn't actually there. The bread crumb is the location on the external hard drive.
    If that bread crumb trail disappears (in this case the external drive you use). If said external drive is not plugged in, that bread crumb trail is not able to be followed. iTunes is "lost" and unable to find the media. The only way to remedy this is to place the media on your local drive.
    To address your issue of the library. If you hold down shift, you can select your library on your external drive. It will be a file with an .itl extension. The folder name will be your external drive.
    I go into edit > preferences > advanced and set my library to the correct location. Make sure you check the box "Copy to iTunes Folder when importing" (or whatever it says).
    You can't fix the issue of iTunes not seeing the media if your drive is unplugged unless you physically move the content to your OS HDD...Or any other HDD you use.

Maybe you are looking for