Need Help to locate a file on a FTP server using MediaLocator class

Hi Friends,
This is Venkat. Iam currently working on a Multimedia J2EE web project. Iam working on a requirement to
show Thumbnail view for uploaded media. For this i have downloaded a standalone code from the following site.
http://www.exactfutures.com/index02.htm.
This code converts frames of a media files to jpg images which i can use them to show as Thumbnails.
The code takes file name which is present in project folder as parameter. But in my web project iam using a FTP server to store my media files.
The above code uses Java Media Framework along with another API Fobs4JMF. The media file name is passed to MediaLocator class constructor which is located in the project folder. Iam talking about a standalone application here.
But my project is a J2EE web application.
Now my problem is that, how can i refer a file which is located on a external FTP server and pass it to MediaLocator or some other class.
Say the ftp file URL is mms://wm.testuser.net/12365741/testvideo.wmv
Guys hope you are clear abt my problem. Please help me ASAP.
Below is the part of code
     * Constructor
     public vid2jpg(String path) {
          MediaLocator ml;
          String args = path;
          if ((ml = new MediaLocator(args)) == null) {
               System.out.println("Cannot build media locator from: " + args);
          if (!open(ml)) {
               System.out.println("Failed to open media source");
     * Given a MediaLocator, create a processor and start
     private boolean open(MediaLocator ml) {
          System.out.println("Create processor for: " + ml);
          try {
               p = Manager.createProcessor(ml);
          } catch (Exception e) {
               System.out.println("Failed to create a processor from the given media source: " + e);
               return false;
          p.addControllerListener(this);
          // Put the Processor into configured state.
          p.configure();
          if (!waitForState(p.Configured)) {
               System.out.println("Failed to configure the processor.");
               return false;
          // Get the raw output from the Processor.
          p.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW));
Thanks in Advance for your time.
Venkat
Edited by: VenkataGuru on Jul 23, 2008 5:30 PM

Hi Mani,
Below is code that ran successfully on a cRIO-9002.  It looks much the same as yours, please double-check the formatting of your string controls.  If things still do not work, let's look at the cRIO more closely.
Message Edited by Pie56694 on 06-30-2008 09:45 AM
Attachments:
FTPDELE3.jpg ‏28 KB
FTPDELE.jpg ‏24 KB
FTPDELE2.jpg ‏18 KB

Similar Messages

  • Getting the file from IIS FTP Server using ALSB

    Hi,
    I want to extract a file from FTP server in ALSB.I am using ALSB2.5 and Microsoft IIS FTP Server.
    Now i want to know that
    1.Do i need to configure a Proxy service or Business Service to poll a file from FTP server?
    2.How to read the contents of the file once the File comes in?
    Regards,
    Indu Garg

    You need to configure a Proxy service for the polling.
    The contents of the file will be inside the context variable $body.

  • Needed help in: how to import image in InDesign Server using Java Code

    New to InDesign Server.
    I am not been able to import image to document.
    I tried to import image using the sample snippets "PlaceTextFileInFrame.java".
    modified the line:
    String placefilepath = "C:\\placeFile.txt";
    to
    String placefilepath = "C:\\Image.jpg";
    myTextFrame.place(placefilepath);
    Is this the correct way to import image or there is another solution.
    1.The image gets imported but i am getting blur image(Zoomed image).
    2.The image gets imported to its original image width & height.
    3.I need to know how to set the image width & size.

    My Requirement is-- I ve to connect to msn search page in order retrieve the result set from msn search. The same code which I do pasted below is working for GOOGLE n YAHOO with minor changes.But not for MSN.., Can any one help me.
    I've pasted the code for msn..,
    import java.io.*;
    import java.net.*;
    public class File {
    public static void main(String[] args) throws IOException {
    Socket s = new Socket("search.live.com", 80);
    String query = "java";
    PrintStream p = new PrintStream(s.getOutputStream());
    p.print("GET /results.aspx?q=" + query);
    p.print("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0\r\n");
    p.print("Connection: close\r\n\r\n");
    InputStreamReader in = new InputStreamReader(s.getInputStream());
    BufferedReader buffer = new BufferedReader(in);
    String line;
    while ((line = buffer.readLine()) != null) {
    System.out.println(line);
    Edited by: Lijo_Java on Jul 13, 2008 9:03 PM

  • This Adobe muse site file requires a newer version of Adobe Muse. I want to comeback to old version Adobe muse i need help to open my file thanks

    This Adobe muse site file requires a newer version of Adobe Muse. I want to comeback to old version Adobe muse i need help to open my file thanks

    Hi,
    You may need to design the site again in older version OR may be copy and paste in place from new to old except what is new in the latest version.
    Hope that helps!
    Kind Regards,

  • I need help with a PDF file that is an image, the "Read Out Loud' option does not work, please help!

    I need help with a PDF file that is an image, the "Read Out Loud' option does not work, please help!

    You mean an image such as a scanned document?
    If that is the case, the file doesn't contain any text for Reader Out Loud to read. In order to fix that, you would need an application such as Adobe Acrobat that does Optical Character Recognition to convert the images to actual text.
    You can also try to export the file as a Word document or something else using ExportPDF which I believe offers OCR and is cheaper than Acrobat.

  • Need help in laoding flat file data, which has \r at the end of a string

    Hi There,
    Need help in loading flat file data, which has \r at the end of a string.
    I have a flat file with three columns. In the data, at the end of second column it has \r. So because of this the control is going to the beginning of next line. And the rest of the line is loading into the next line.
    Can someone pls help me to remove escape character \r from the data?
    thanks,
    rag

    Have you looked into the sed linux command? here are some details:
    When working with txt files or with the shell in general it is sometimes necessary to replace certain chars in existing files. In that cases sed can come in handy:
    1     sed -i 's/foo/bar/g' FILENAME
    The -i option makes sure that the changes are saved in the new file – in case you are not sure that sed will work as you expect it you should use it without the option but provide an output filename. The s is for search, the foo is the pattern you are searching the file for, bar is the replacement string and the g flag makes sure that all hits on each line are replaced, not just the first one.
    If you have to replace special characters like a dot or a comma, they have to be entered with a backslash to make clear that you mean the chars, not some control command:
    1     sed -i 's/./,/g' *txt
    Sed should be available on every standard installation of any distribution. At lesat on Fedora it is even required by core system parts like udev.
    If this helps, mark as correct or helpful.

  • I have misplaced my iPod Touch 4th Generation. According to Find my iPhone, it should show up in offline mode. I need help on locating it with a software or some other way. Help?

    I have misplaced my iPod Touch 4th Generation. According to Find my iPhone, it should show up in offline mode. I need help on locating it with a software or some other way. Help?

    There is no other way.
    Sorry

  • Help Fetching files from an FTP server into a DBase or local folder

    Hello Gurus!
    I need help to automate or design/write an app capable of (replace a manual process) reading log files in an ftp server folder, this log files are called CDR (Call Detail Record) and named as follow cdr.txt.20020221010000 meaning that this log file was created on 2002/02/21 at 01:00:00.
    This CDR log files are generated every hour by a Lucent telephone switch using a software/program called EXS ExchangePlus in ASCII format (fixed length delaminated, Char data type). EXS ExchangePlus writes a record in this CDR/log files after the call is completed, i.e. Calling_Number, Called_Number, Date_connect (yyyymmdd), Time_connect (hhmmss), Charged_time (hhmmss, duration of the call), and so on.
    The manual process I am using now is:
    1. Log in the ftp server into the folder where the CDRs log files are, located the latest generated CDRs log files and downloaded them into a local folder/directory. Normally I download the CDR for full day or 24 CDRs log files.
    1a. Optionally sometimes I used a program called VEdit compiled/gather all 24 CDRs into a single file.
    2. Once I have downloaded the CDRs I want to process (normally I process a full day 24 CDRs) I imported then into a Data Base temp table, where then I do the conversion of data types (i.e. Dates and times fields from char type -> to ->Date type) and calculations for billing purposes.
    So if somebody can help with this, I would really appreciated ideas or any kind of information on how to automated this process.
    I�m familiar with Java2 platform (using JDeveloper ) so if somebody has done something like this before using java, this would very helpful. Or Maybe using Visual Basic 6.0 would help too.
    Thanks Gurus, and I look forward to hear from you soon!
    Alf Pathros!

    Thanks for the idea, even though an example would help me more.
    I already found the FTPClient class.
    I also would like to knwo if there is a away Ican append/merged various files CDRs into a single/one to then dump/import it into the database

  • Need help w/ setting up ports to run a server for America's Army

    Need help w/ setting up ports to run a server for America's Army. I read wat u need to change the ports but i dont understand wat to put. here is wat the site says
    Q: How do I run my own server?
    A: Quick and dirty server info:
    1. Edit RunServer.bat to change the map.
    2. Run RunServer.bat
    Or:
    server.exe LAN MAPNAME.aao (Host a LAN game)
    server.exe global MAPNAME.aao (Host a Public game)
    Also: When you create a server setup and want to allow other users to join your server, you need make sure the following ports are open for outgoing and incoming traffic in your firewall: 1716 (UDP), 1717 (UDP), 20025-20045 (TCP), and 20047 (TCP). Failure to open these ports will prevent the server from accepting connections from other players or prevent other players from being able to see your server online.
    There are several settings that also need to be defined in your server configuration INI file (in the Windows version, these files are located in “My Documents\America’s Army Server Settings\{settings file name}.ini”).
    [Engine.GameEngine]
    ServerActors=Andromeda.AndromedaMBS
    [Andromeda.Andromeda]
    GameServerIp=
    Make sure that you set the actual IP address of the America’s Army Server under GameServerIp= (for example, “GameServerIp=000.000.000.000”). The supplied address must be your actual internet IP address, if this is left blank or you supply the IP address for your internal network (such as 192.168.0.x), your server will not be able to accept connections from the internet.
    If your server.ini file contains the setting shown below, please change the QueryPort setting to 20025. This setting can also be removed, as the default setting is port 20025.
    [Andromeda.AndromedaMBS]
    QueryPort=20025
    Punkbuster user fix correction.
    If [Engine.GameEngine] block has been changed to read as below:
    [Engine.GameEngine]
    ServerActors=IPDrv.AndromedaMBS
    Please add the following block to your INI file:
    [IpDrv.AndromedaMBS]
    QueryPort=20025
    (Last Updated: 2006-04-20)

    Your images are not stored in the catalog. They are stored in folders on your computer. If you imported images that were already on your computer using the "Add" Option they are still in that same folder. If you imported images from your camera then they are in the folders that you specified when you imported. The catalog points to those images wherever they are located, and records all of the adjustments that you make to the image. When you send an image to Photoshop for further editing and save that image in Photoshop, it is normally saved back in the same folder as the original image.
    Images are not "saved" in Lightroom. The basic default workflow in Lightroom is to store all of the adjustments in the catalog, leaving the original image completely unmodified. The catalog becomes the central controlling mechanism. It is a database that contains pointers to where the images are located and a record of all adjustments made to those images using Lightroom. Properly managed, you only have those original master files and secondary files for the ones that you have sent to Photoshop for further adjustment. When you want to provide a copy for someone else, you use the export dialogue for that purpose. I often export JPEG images to share with others or to post on the web. After I have usedthe JPEG for its intended purpose I delete it.

  • I need help Centering a div box to a background image using dreamweaver cs5.5.

    I need help Centering a div box to a background image using dreamweaver cs5.5. Everything shift left when viewing on different size monitors?  See what I mean at
    www.woodlandhospice.com

    Have you looked at your page with images disabled?
    I urge you to re-think this approach to web design because images of text are not indexed by search engines, screen readers or translators.  Given the demographic group your site is targeting, you really need to ensure maximum web accessibility for all users.
    Navigation, headings and descriptions all need to be in real text -- not images of text.
    Ken is right.  Absolute positioning is pure poison for such a simple layout.  My advice is to start over with one of the pre-built Starter Pages in DW.  Go to File > New > Blank page > HTML.  Select a layout from the 3rd column and hit CREATE button.
    Nancy O.

  • Need help about the SHA Message Digest ? & what is use of Message Diagest ?

    need help about the SHA Message Digest ? & what is use of Message Diagest ?
    1>i have one program of making message digest
    2>which requires two files name
    3>one for input like txt
    4> second is out put file of message digest
    can any one tell what is the use of second generated file .

    MessageDigest md = MessageDigest.getInstance("SHA");
    FileInputStream fis = new FileInputStream(args[0]);
    byte[] b = new byte[1024];
    int readed = -1;
    while((readed = fis.read(b)) > 0)
         md.update(b, 0, readed);
    fis.close();
    FileOutputStream fos = new FileOutputStream(args[1]);
    byte[] d = md.digest();
    StringBuffer sb = new StringBuffer();
    for(int i = 0; i < d.length; i++) {
         String str = Integer.toHexString(d[i] & 0xff);
         sb.append(str.length() < 2 ? "0" + str : str);
    fos.write(sb.toString().getBytes());
    fos.close();

  • Do I need to leave location services on all the time to use the "Find my iPhone" app?

    Do I need to leave location services on all the time to use the "Find my iPhone" app?

    The Find My IPhone app is used to find OTHER lost devices, it does nothing to make your device "findable".  To make it findable, you must turn on "Find My IPhone" in settings. And than you need location services on.  This however does not guarantee that you'll always find it if lost. A thief can set it to factory settings, even remove the sim card. Then it'll be unfindable.

  • I would like to remove a short gray edge from two images. I need help in that I am not yet able to use PhotoShop. Could somebody kindly help me with this?

    I would like to remove a short gray edge from two images. I need help in that I am not yet able to use PhotoShop. Could somebody kindly help me with this?

    I doubt it Doc Maik, but I am certainly happy to learn The image is this one (and a similar one). They would be beautiful portraits if not for the "extra mouth". The grey edge that I would like to remove is the excess of (grey) mouth that is actually my horse's chin, but that in the pictures looks like a wider, looping mouth. Practically, looking at the picture, the "extra mouth" to the left. What I would love it to be able correct that to look like a normal mouth, which means that half of the protruding edge should be removed. I am not sure I was able to explain myself, but here is one of the two pictures. I thank you for you kindness in being available to advise me.

  • How do I copy a file to a remote server using runtime exec - plz Help!

    Hi,
    I am trying to copy a file to a remote server using a runtime exec command as follows:
    Runtime.getRuntime().exec("scp "+getProperty(ListNewHandsetDetailsConstant.PROP_OUTPUT_PATH_JAR)+getProperty(ListNewHandsetDetailsConstant.PROP_OUTPUT_JAR_NAME)+".jar "+" "+getProperty(ListNewHandsetDetailsConstant.PROP_OUTPUT_PATH_TWO_USERNAME)+"@"+getProperty(ListNewHandsetDetailsConstant.PROP_OUTPUT_PATH_TWO_URL)+":"+getProperty(ListNewHandsetDetailsConstant.PROP_OUTPUT_PATH_TWO_JAR));
    Problem is this statement does not execute, as when I try it directly on command line, it requests for a password. Any suggestions on how I can get rid of that? I think I might have to configure my ssh_config file, but when I did some "Googling", I found the configuration settings of a ssh2_config file. I tried those (changing it to Host-based Authentication), but it didn't recognise them. Please help, this is so urgent!
    Regards,
    Simz

    Don't use Runtime.exec (or ProcessBuilder) for this. Check out JSch at JCraft (or some other Java SSH API.

  • Sender File Adapter - remote FTP server program execution

    Hi all,
    I have a scenario
    X12 -> XI -> File
    where sender File adapter is used. The input file is X12 txt document which needs to be converted into X12 xml format. I have created astylus studio XSLT mapping which uses Convertor to convert this txt file to X12 XML.
    I don't know how to configure sender file adpater to run this mapping on the source file before picking it up. have created a windows batch file on the FTP server which runs tis XSLT mapping on the txt file and replaces it with X12 format xml. This batch file uses command line parameters of stylus studio to run XSLT mapping on input txt file and generates an xml.
    I am not sure how to run this mapping on the input file before processing starts in PI file adapater.
    I tried running command line parameters of Sender file adapter but that didn't worked.
    Please help.
    Thanks
    -Kulwant

    Hi, Kulwant:
    Looks like you would like to execute your mapping program before file adapter pick it up.
    Right ? for one interface, it seems out of the XI scope, however if this is your requirement, you can separate into two interfaces:
    The first interface is file to file scenario, it is used to execute your mapping program:
    The file sender just pick up the txt file, send to integration engine.
    Your Message Mapping program need to specify your XSLT mapping, after the mapping, the message is XML format,
    then you will use file receiver to send it to certain directory.
    Now the XML format file is your input of your second interface.
    Regards.
    Liang

Maybe you are looking for

  • I have the same image 200 times on a webpage... how can I relink them all at once?

    Hi, first I'm french and I might not be using the right terms in the 'search engine' as I'm unable to find the answer and I have been looking for more than an hour... I unfortunately saved my htm document on my desktop. After putting the file in its

  • Include Graph / Chart in a jsp file

    How we can include the Graph in a jsp file?

  • Dock won't hide in full screen mode

    When editing pictures in full screen mode, the dock does not disappear. I don't think it's always been this way -- I could swear that it used to disappear, which is what I want it to do. With the way it is now, i have to manually hide the dock in ord

  • What privileges for GATHER_TABLE_STATS on table in other schema

    Hi, I'm trying to gather some histogram data for a table in another schema and run into the following error: begin DBMS_STATS.GATHER_TABLE_STATS('NGM101','NGG_BASISCOMPONENT', METHOD_OPT => 'FOR COLUMNS SIZE 75 tre_id_o'); end; ORA-20000: Unable to a

  • User defined table/object with system form

    Hi, I added an extra tab on the invoice form. But I want to save the info in another user defined object. The new fields are coupled on the new added dbdatasrource. But it seems like the new added datasource is as much restricted than other dbdatasou