What Presets for This Avi File?

I have a couple of .avi files of musical movies (from tv) that I would like to edit in Premiere (which I've virtually never used before, only some intermittent stuff with my little digital camera... no real knowledge ).
What I want to do is simply extract the singing and dancing from the storyline.
Windows tells me this much about the files:
624 x 352 pixels
bit rate 128kbps
audio sample size 16 bit
audio Lame MP3
video 23 frames per sec
data 1102kbps
video sample 24bit
XVID compression
and gspot gives me this, most of which I don't even understand:
container
avi v1 Interleave 1 vid frame (42ms)
Audio frames aligned on interleave
Video 304MB
User data
[ISFT] transcode-1.0.6
[USER] XviD0050
Audio
Codec: 0x0055 MPEG-1 Layer 3
Info 48000Hz 128kb/s tot, Join Stereo LAME 3.9
Video
Codec XVID Name XviD ISO MPEG-4
Len 44:23 Frms 63851 kbps 959 Qf 0.182
Pics/s 23.976 Frames/s 23.976
pic 624 x 352
sar 1.773 par 1.000 dar 1.773
Now those figures don't match any of Premiere's existing 'presets' and don't provide enough info for me to make up a custom preset.
Can anyone help me out? Tell me what presets to put in or direct me to software that will interrogate this file and get the preset info for me?
OR: if there's an easier way/software to do what i want to do - what is it?
regards,
ab

The Xvid CODEC will be a real problem. For the rest, a Desktop Preset with the attributes customized to match, will get you to editing - just not with the Xvid CODEC. I would use Harm's advice to convert to DV-AVI Type II, and issues should go away.
With Harm's other suggestion, I have found that CyberLink's PowerDirector program does an OK job with Xvid/DivX material, but it IS heavily compressed and is a streaming media delivery format. It should ONLY be used as such, and not as source footage. Also, Premiere Elements will have the same issues, as will PrPro.
For some more background on CODEC's, this ARTICLE might prove useful.
Good luck,
Hunt

Similar Messages

  • What could be the reason for this error file

    Hi,
    What could be reason for this error file, the content of the error file is :
    Compiling INSERT-PROCEDURE trigger on IOTDISPUTE_FILES data block...
    No compilation errors.
    Compiling UPDATE-PROCEDURE trigger on IOTDISPUTE_FILES data block...
    No compilation errors.
    Compiling DELETE-PROCEDURE trigger on IOTDISPUTE_FILES data block...
    No compilation errors.
    Compiling LOCK-PROCEDURE trigger on IOTDISPUTE_FILES data block...
    No compilation errors.
    Compiling INSERT-PROCEDURE trigger on IOTDISPUTEDETAILS data block...
    No compilation errors.
    Compiling UPDATE-PROCEDURE trigger on IOTDISPUTEDETAILS data block...
    No compilation errors.
    Compiling DELETE-PROCEDURE trigger on IOTDISPUTEDETAILS data block...
    No compilation errors.
    Compiling LOCK-PROCEDURE trigger on IOTDISPUTEDETAILS data block...
    No compilation errors.
    Created form file X:\IOT\IOT_SupportingSystem\Forms\IOTRAP.fmx
    I am getting this error while compiling a form with DML sources are Database Procedure.
    Thanks in advance.
    Rizly

    Hi,
    Sorry for the delayed response. These informations are generated in the FormName.err file. If its not the error, then why its not generating for other forms. As I mentioned earlier, this fom has DML sources by the Database Procedures, that could be the reason ?, this is my first project in Forms.
    The content of the IOTRAP.err file:
    Compiling DELETE-PROCEDURE trigger on IOTDISPUTEDETAILS data block...
    No compilation errors.
    Compiling LOCK-PROCEDURE trigger on IOTDISPUTEDETAILS data block...
    No compilation errors.
    Created form file X:\IOT\IOT_SupportingSystem\Forms\IOTRAP.fmx
    Thanks in advance.
    Rizly

  • HT3775 I am using OS X Mountain Lion and I have this .avi file but not able to read. What is missing in my setup and what other file do I need to download to enable me to read?  I can read mp4 files though.

    I am using OS X Mountain Lion and I have this .avi file but not able to read. What is missing in my setup and what other file do I need to download to enable me to read?  I can read mp4 files though.

    Here is a link: https://itunes.apple.com/en/app/mplayerx/id421131143?mt=12
    I agree that VLC is also a good choice but MPlayerX is more user friendly.

  • How to designate a program for all avi files

    hi. i dl-ed the vlc player recently, but i dont know how to set it as the default player for all avi files. i secondary click on a avi file and go to others... and select the vlc player with 'always use this program' checked, but this allows only that single avi file to open with vlc. the rest of avi files are still set to open with quicktime. please kindly help me to designate the vlc player to open all avi files. thank you.
    my best,
    jeff kwak

    If you use the Finder and do a 'Get Info' on your target file, you'll find additional options/dialogs that will let you choose to open all similar files with the same application...check it out and come on back if you get lost in the process, etc.

  • How to export book pdf using custom presets for all book files in indesign using javascript

    How to export book pdf using custom presets for all book files in indesign using javascript.

    Hi jackkistens,
    Try the below js code.
    Note: you can change your preset name in below (e.g, Your preset name).
    var myBook = app.activeBook;
    myBook.exportFile(ExportFormat.PDF_TYPE, File (myBook.filePath+"/"+myBook.name.replace(/\.indb/g, ".pdf")), false, "Your preset name", myBook.bookContents, "Book_PDF", false);
    example:
    var myBook = app.activeBook;
    myBook.exportFile(ExportFormat.PDF_TYPE, File (myBook.filePath+"/"+myBook.name.replace(/\.indb/g, ".pdf")), false, "[High Quality Print]", myBook.bookContents, "Book_PDF", false);
    thx,
    csm_phil

  • I want to install CCPL ,but it is not taking PAC file proxy.So please suggest an alternate way to set proxy for this exe file..

    I want to install CCPL ,but it is not taking PAC file proxy.So please suggest an alternate way to set proxy for this exe file..

    That file might have moved to a different location on the server. I think you'll need to check with RefWorks support or your local IT department on why the install page links do not work.

  • How can I read this avi file in Premiere?

    My friend gave me an avi file (created in AVS Video Editor) for me to synch the sound on, but I cannot get it to play in Premiere CS4. In Windows Media Player it plays the video but not sound, and in Premiere it plays neither. Do I need to download a codec or something? Please advise.
    audio codec 0x0055 MPEG-1 Layer 3
    44100Hz 256 kb/s tot, Stereo
    (codec installed)
    video codec H264
    name H.264/MPEG-4 AVC

    Along with Harm's suggestion, this ARTICLE will give you more background on AVI (and MPEG, MOV, WMV, etc.) wrappers, and how to always be able to "peek" inside those wrappers to see what exactly is inside.
    For adjusting sync, if you are having any issues, this ARTICLE might be useful too.
    Good luck,
    Hunt

  • Video but no audio for *some* .avi files

    I had to reinstall QT v.10 from Install disk and since, I have had a problem w/ most of my .avi files playing no audio--tho they are fine in VLC. I checked the streams w/ VLC and here's what I found:
    This plays fine:
    Video:
    Codec: MPEG-4 Video (XVID)
    Resolution: 704x288
    Frame rate: 25 fps
    Audio:
    Codec: A52 Audio (aka AC3) (a52)
    Sample Rate: 48000 Hz
    Channels: 6
    Bit Rate: 192 kb/s
    This plays w/ no audio:
    Video:
    Codec: MPEG-4 Video (XVID)
    Resolution: 624x352
    Frame rate: 23.976024 fps
    Audio:
    Codec: MPEG Audio layer 1/2/3 (mpga)
    Sample Rate: 44100 Hz
    Channels: 2 Channels Stereo
    Bit Rate: 128 kb/s
    I have other examples, but VLC showed no "Codec Details" for those. Does this make sense to anyone? I'm, duh, new. Please help!

    Download and install Perian from http://perian.org/
    You should read this support page http://perian.org/#support in case you need to delete older codecs. In Macintosh HD/Library/Quicktime/ delete any files relating to DivX (Perian already has them). However it should be noted that Perian is not an internet plugin and will not play DivX files imbedded on a website. For that you will need the DivX Player browser plugin available from http://www.divx.com/divx/mac/

  • What category for this wiki data?

    INTRODUCTION:
    Flash-based systems are appearing at a fast pace. This wiki presents one way to employ flash drives in
    an arch-based "LIVE" arrangement.
    It is important to note that the system must operate from "IDE" in order that the flash drives utilized
    are recognized as "TRUE IDE" devices thus permitting full "UDMA" operability. In addition, an
    adapter having "UDMA READY" must be used to interface the Compact Flash (CF) to the IDE 80-
    wire interface cable. The CF card(s) must also be "UDMA" rated.
    The system herein described has no HDD's and can be described as "DISCLESS".
    Two CF/IDE interfaces are utilized. When employing CF/IDE adapters, only one such device is usable
    on a given IDE 80-wire cable at a time. A "slave" device can be provided on the adapter but it cannot
    be connected simultaneously with a "master" CF card on the same cable.
    The present 2.6 kernels include provisions which eliminate the application of 80-wire cable parameters
    to IDE busses such that normal boots using standard kernels prevent "TRUE IDE" operation of the CF
    card(s).....thus, the operations are limited to UDMA 2 mode even if the UDMA RATING is much
    higher.
    Therefore, the requirement for "IDE" operation of the system is imperative and applies to the
    remainder of this "DISCLESS SYSTEM"description.
    SYSTEM DETAILS:
    Both the the primary and secondary IDE busses are utilized. The primary buss IDE cable has the
    "boot" CF card and the secondary buss IDE cable has a cachedir CF card, each having an adapter and
    connected via normal 80-wire cable. The operation of these adapters is powered by the 4-pin power
    connector of the type provided to power the floppy disk peripheral device.
    Some of the detailed results of performance outlined in this wiki apply to my system and its capabilities
    with respect to speed and veratility. (1600mhz cpu and 3GB ram).
    The system being described is arch-linux based, with larch "Live" system elements and Faunos
    elements added. It utilizes pacman and aufs for its basic operational utility.
    SYSTEM PHILOSOPHY:
    Operate as much as possible in ram.
    The primary CF card contains the boot Faunos system. It is squashfs compressed and has ~600 arch-
    linux packages, includes pacman, aufs and PacTrac capability. It executes in ram as a r/o source.
    The secondary CF card is used as a local cachedir to archive any and all upgrades to the operating
    system. As such it enables storage of downloaded packages for use at users discretion. When loaded
    into the system via pacman/aufs, the packages are decompressed into ram and operate therein, entirely
    in ram.
    Downloading packages into the cachedir permits the storage of several versions of a given
    package...the original package is NOT OVERWRITTEN, thus flash device life is unaffected. Also,
    the user can revert back to a previous version and it will be INSTALLED INTO RAM.!
    SYSTEM CONSEQUENCES:
    The need to "SAVE SESSION" via the Faunos system is reduced or eliminated at the users discretion
    thus providing fastest reboot time.
    "REBOOT" of the system without "SAVE SESSION" removes any and all packages added via the
    use of the cachedir archive.
    Adding packages in this manner allows checkout of new package impact on the system without
    interfering with the basic boot system.
    Power savings are obvious!
    Downloading via mirrors (many throttled) takes much time! The power required to download
    into HDD is nearly fully eliminated with no increase in delays (actual speed of CF is 40+MB/sec
    for UDMA 4/5).
    INSTALL from cachedir is at 40+MB/sec with UDMA 4,5.
    System cache in /var/cache/pacman/pkg is not utilized.
    PacTrac in Faunos provides a complete log of installed programs (including those installed to
    ram by cachedir) and the last installed version as well as a listing of installable programs via
    pacman. This program is inherent in Faunos boot flash device.
    Additional elements of video, graphics and text can be include in the cachedir . For example, a
    1GB .avi. This video file can be entered in ram via tmpfs and the player via pacman into
    ram...then execution and data are all in ram. The tmpfs video file can be deleted and another
    video file inserted...ad infinitum! All is readonly for the flash drives after initial install of the
    video file(s) to cachedir. A text file to provide a paste of pacman install commands for cachedir
    package groups is also an aid to users if incorporated in the cachedir.
    Larch systems would provide a similar capability except for the PacTrac that Faunos provides.
    The cachedir appears in the system as a media diak.
    All USB functions are available and a USB/HDD adapter permits access to external HDD data
    and storage. Also, external CD/DVD devices are similarly available although DVD play is not
    clean. Best is to put .vob in files of the cachedir.
    Moore's law applies to flash devices!!!!!!!!!
    INSTALLATION:
    This wiki is based on demonstrating the "LIVE" flash drive capabilities introduced by UDMA capable
    flash devices with archlinux based operational capabilities. Therefore, an arch-based installation is
    required. In this wiki, that is Faunos which is flash-installed, based on archlinux packages and Larch-
    derived install parameters. A 2GB compact flash drive is recommended with adapter, either for HDD
    use or a USB adapter, preferably a 2.0 unit.
    Faunos is soon to be released in "STABLE" version. It is maintained by RAYMANO at
    faunos.com.
    The download of faunos is installed via...."dd if=(faunos downnload.img) of=/dev/sdx".......
    The....of=/dev/sdx....is important.....do not use ...of=/dev/sda1 for example......
    If you download the usb.img. Do not change the name of the download to ....faunos.img... because
    the download has that file within it and will only address that file.
    When the flash drive is first ready to be booted, do not boot on it until you have re-sized the linux
    partition from 1GB to ~1500MB . Do so with gparted as root. Provide linux swap at this time if
    you desire.
    When ready to boot, install in primary HDD slot with adapter and set bios to recognize the flash
    drive. Some flash units do not have a label, they appear as brackets [        ] but are fully functional
    as boot devices.
    After reaching the Desktop, the internet parameters are established in WICD.
    Editing of /etc files is then accomplished as desired. Reboot and save session.
    The system can then be shut down to allow install of the CF/IDE in the secondary IDE cable.
    CONFIGURATION CHANGES FOR UDMA CF/IDE:
    At this point, a change is necessary in the boot CF/IDE device in the primary IDE slot to enable IDE
    MODE OF SYSTEM OPERATION.
        1.  Boot into Faunos.
        2.  Select "log out"
        3.  Select "end session"
        4.  "log-in" as root with root password.
        5.   With "archlinux" desktop displayed, select kwrite editor.
        6.  Go to /lib/initcpio/hooks/larch/
        7.  change: ....................line (96):
                                ....for d in /dev-sd[a-z][0-9]* ; do
           to................for d in/dev [hs]d[a-z][0-9]*; do
        1.  Edit /usr/share/larch/initcpio/mkinitcpio.conf...... as follows;
        2.  hooks="base udev fbsplash ide scsi usb larch1 larch2 larch3_aufs splashy"
        3.  Select "STORAGE DEVICES" and open the "livesys/livecd" device,
        4.  Delete file "faunos.img" to trash bin.
        5.  Perform the following to generate a new "faunos.img"
                in terminal as root: .....mkinitcpio -c mkinitcpio.conf -g faunos.img.....
            Install the faunos.img thus generated into "livesys/livecd" in the place of the original
            faunos.img.
            6. Reboot and "SAVE SESSION".
    TROUBLESHOOTING:
    The performance of the CF/IDE devices can be verified by use of hdparm.
    All devices in "STORAGE DEVICES" are identified as "media".
    See FaunOS forums for advice on boot problems or system related issues.
    CACHEDIR PARAMETERS;
    Loading of the cachedir via pacman is accomplished with the following command in terminal:
                                .....pacman –cachedir /media/disk -Sw (package name) ,,,,,,,
    This places the named -i686.pkg.tar.gz in the cachedir. The locale of the downloaded package may be
    a previously established folder, in which case the /media/disk/folderID is used in the command.
    Other files of interest may also be loaded from HDD via a primary IDE install or a flash drive via USB
    or an install via USB/HDD source. Additionally, pacman Syuw is usable:
                       ............pacman –cachedir /media/disk/upgrade -Syuw.........
    This assumes the generated "upgrade" folder.
    Subsequent installs to cachedir do not overwrite existing packages, but make new entries.
    Installing the package(s) is done with the following pacman command:
                            ........pacman -Ud /media/disk/upgrade/*-i686.pkg.tar.gz...
    This example assumes the -Syuw case of installing all packages. They can be individually installed as
    desired.
    Packages installed via pacman/aufs are in ram by default. w00t!!
    MORE RESOURCES:
    Full disclosures of problems and solutions is provided in the FaunOS forums which has over a
    hundred registered users. This forum also includes a Larch forum hosted by Gradgrind.
    I have practiced in SANDBOX but am unaware of whether that material is reproduced in any category.
    How does a user generate several pages of data in a published wiki?  It does not seem apparent...much ado about editing existing wikis but no data on how to make a new one...correct me if I am wrong, please.

    On third thought, it certainly adds a dimension providing power savings as well as utilizing an alternate archlinux install method which eliminates the hassle in getting a DE and loads much without causing an uproar with already installed operating systems.
    Basically, it is FaunOS with Larch elements and both are archlinux based.  The best way to introduce archlinux is with such a LIVE install.  Raymano has demonstrated to many users the easy install of the program.
    It does require adjustment of the install partition at this writing.  Items needing attention are the wicd , rc.conf and rc.local as well as setting up alsa.  These are required in all arch installs and the install of any discless items is not required.
    To utilize the methods I have incorporated requires more skills...most linux users could maneuver through that should they want to utilize discless operation.  I would imagine that many could use existing CF cards even if not UDMA rated to produce a usable discless system but at a slower operating speed.  Power is minimized.
    Summary statement: A Live install of FaunOS is a [u good alternative /u] starting point for new users and it opens the door to discless operation in desktop systems.  (Laptops are a different breed and may have some advantages if dual CF adapters allow both CF units to perform simultaneously).
    Just a thought.......or two.....
    EDIT:  The final release of Faunos is in the works..at present in test phase and posts regarding it are in testing mode rc4.  The next two weeks or so should provide the stable release of the latest FaunOS Live download as reported on the Forum.
    EDIT:  Installed an Adata 266x 8GB CF in the cachedir slot today.  It runs 45+ mb/s in hdparm.  I have 1.3GB of packages installed in it, r/o in the system when installed to ram via pacman/aufs.
    Last edited by lilsirecho (2008-03-11 23:51:03)

  • How to display the source code for this friggin' file.

    Below is a rather lengthy bit of code that provides the behavior and attributes of a web server for OpenCyc. I need to know if I can enter some java to have the HTML source code displayed in a separate text file whenever this class returns some resulting webpage. If you have any ideas it will be greatly appreciated.
    -"Will code for foo."
    package org.opencyc.webserver;
    * Class WebServer is simple multithreaded HTTP server
    * with CGI limited to a Cyc connection on default port 3600.
    * <p>
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import java.util.jar.*;
    import java.text.*;
    import org.opencyc.util.*;
    public class WebServer extends Thread {
         * Singleton WebServer instance.
        public static WebServer current;
         * Default HTTP port.
        protected static int DEFAULT_PORT = 80;
         * Default Cyc base port.
        protected static int DEFAULT_CYC_PORT = 3600;
         * Default directory to serve files from on non-Windows OS.
        protected static String DEFAULT_DIR = "/";
         * Default directory to serve files from on Windows.
        //protected static String DEFAULT_WIN_DIR = "C:\\";
        protected static String DEFAULT_WIN_DIR = "k:\\opencyc\\run\\httpd\\htdocs";
         * File cache capacity.
        protected static final int CACHE_CAPACITY = 100;
         * File cache to improve file serving performance.
        protected static Hashtable fileCache = new Hashtable(CACHE_CAPACITY);
         * Number of files served from this web server.
        protected static long nbrFilesServed = 0;
         * Number of files served from this web server that were found in the cache.
        protected static long nbrCacheHits = 0;
         * Server socket for accepting connections.
        protected ServerSocket server;
         * Directories to serve files from.
        protected ArrayList dirs;
         * Map from String (jar root) to JarFile[] (jar class path).
        protected HashMap map;
         * Webserver HTTP port.
        protected int port;
         * Cyc HTML host.
        protected String cycHost = "localhost";
         * Cyc HTML port.
        protected int cycPort;
         * Expand jar tress.
        protected boolean trees;
         * Requests flag.
        protected boolean traceRequests;
         * Constructs a WebServer object.
         * @param port the port to use
         * @param directories the directory to serve files from
         * @param trees true if files within jar files should be served up
         * @param traceRequests true if client's request text should be logged.
         * @exception IOException if the listening socket cannot be opened, or problem opening jar files.
        public WebServer() throws IOException {
            getProperties();
            server = new ServerSocket(port);
            processDirectories();
         * Class Task processes a single HTTP request.
        protected class Task extends Thread {
             * Socket for the incoming request.
            protected Socket sock;
             * Client socket to the Cyc KB HTML server.
            protected Socket cycHtmlSocket;
             * Output tcp stream.
            protected DataOutputStream out;
             * Contains the file request path for a not-found error message.
            protected String notFoundPath;
             * Contains the first line of a request message.
            protected String methodLine;
             * Contains the body of a POST method.
            protected String bodyLine;
             * Constructs a Task object.
             * @param sock the socket assigned for this request.
            public Task(Socket sock) {
                this.sock = sock;
             * Processes the HTTP request.
            public void run() {
                if (traceRequests)
                    Log.current.println("connection accepted from " + sock.getInetAddress());
                notFoundPath = "";
                try {
                    out = new DataOutputStream(sock.getOutputStream());
                    try {
                        getBytes();
                    catch (Exception e) {
                        Log.current.println("file not found: " + notFoundPath);
                        try {
                            out.writeBytes("HTTP/1.1 404 Not Found\r\n");
                            out.writeBytes("Server: Cyc WebServer\r\n");
                            out.writeBytes("Connection: close\r\n");
                            out.writeBytes("Content-Type: text/html\r\n\r\n");
                            out.writeBytes("<HTML><HEAD>\n");
                            out.writeBytes("<TITLE>404 Not Found</TITLE>\n");
                            out.writeBytes("</HEAD><BODY>\n");
                            out.writeBytes("<H1>404 - Not Found</H1>\n");
                            out.writeBytes("</BODY></HTML>");
                            out.flush();
                        catch (SocketException se) {
                catch (Exception e) {
                    Log.current.printStackTrace(e);
                finally {
                    try {
                        sock.close();
                    catch (IOException e) {
             * Reads the HTTP request and obtains the response.
             * @exception IOException when HTTP request has an invalid format.
            private void getBytes() throws IOException {
                // Below logic is complex because web browsers do not close the
                // socket after sending the request, so must parse message to find
                // the end.
                BufferedReader in = new BufferedReader(new InputStreamReader(sock.getInputStream()));
                ArrayList inBytes = new ArrayList(200);
                int ch = 0;
                boolean postMethod;
                methodLine = in.readLine();
                //if (traceRequests)
                //    Log.current.println("methodLine=" + methodLine);
                bodyLine = "";
                if (methodLine.startsWith("POST /"))
                    postMethod = true;
                else
                    postMethod = false;
                //if (traceRequests)
                //    Log.current.println("postMethod=" + postMethod);
                int ch1 = -1;
                int ch2 = -1;
                int ch3 = -1;
                int ch4 = -1;
                // Read the HTTP request headers.
                while (true) {
                    ch = in.read();
                    inBytes.add(new Integer(ch));
                    ch1 = ch2;
                    ch2 = ch3;
                    ch3 = ch4;
                    ch4 = ch;
                    if (ch1 == '\r' && ch2 == '\n' && ch3 == '\r' && ch4 == '\n')
                        break;
                    if ((! postMethod) &&
                        (! in.ready()) &&
                        ch1 == -1 &&
                        ch2 == -1 &&
                        ch3 == '\r' &&
                        ch4 == '\n') {
                        inBytes.add(new Integer('\r'));
                        inBytes.add(new Integer('\n'));
                        break;
                byte[] byteArray = new byte[inBytes.size()];
                for (int i = 0; i < inBytes.size(); i++) {
                    Integer ich = (Integer) inBytes.get(i);
                    byteArray[i] = ich.byteValue();
                String headers = new String(byteArray);
                if (postMethod) {
                    String lcHeaders = headers.toLowerCase();
                    int i = lcHeaders.indexOf("content-length: ");
                    String contentLength = lcHeaders.substring(i + 16);
                    int j = contentLength.indexOf("\r\n");
                    contentLength = contentLength.substring(0, j);
                    int bodyLen = (new Integer(contentLength)).intValue();
                    for (int k = 0; k < bodyLen; k++) {
                        bodyLine = bodyLine + (new Character((char) in.read())).toString();
                String line = methodLine + "\r\n" + headers + bodyLine;
                if (traceRequests)
                    Log.current.println(line);
                if (postMethod)
                    processHttpPost();
                else
                    if (line.startsWith("GET /"))
                        processHttpGet(line.substring(4));
                    else {
                        Log.current.println("Invalid request = " + line);
                        throw new IOException();
             * Processes an HTTP GET method.
             * @param httpGetPath the path of the file to get.
             * @exception IOException if the file is not found.
            private void processHttpGet(String httpGetPath) throws IOException {
                int i = httpGetPath.indexOf(' ');
                if (i > 0)
                    httpGetPath = httpGetPath.substring(0, i);
                Log.current.println(methodLine + " from " + sock.getInetAddress().getHostName());
                i = httpGetPath.indexOf("cg?");
                if (i > 0) {
                    cycHtmlRequest(httpGetPath.substring(i + 3));
                    return;
                notFoundPath = httpGetPath;
                i = httpGetPath.indexOf('/');
                if (i < 0 || map == null) {
                    if (map == null || httpGetPath.endsWith(".jar")) {
                        for (int j = 0; j < dirs.size(); j++) {
                            String dir = (String) dirs.get(j);
                            String nativePath = dir + httpGetPath;
                            nativePath = nativePath.replace('/', File.separatorChar);
                            if (fileCache.containsKey(nativePath)) {
                                writeDataBytes((byte[]) fileCache.get(nativePath));
                                Log.current.println("...cached");
                                nbrCacheHits++;
                                nbrFilesServed++;
                                return;
                            try {
                                File f = new File(nativePath);
                                byte[] fileBytes = getBytes(new FileInputStream(f), f.length());
                                writeDataBytes(fileBytes);
                                if (fileCache.size() >= CACHE_CAPACITY)
                                    fileCache.clear();
                                fileCache.put(nativePath, fileBytes);
                                Log.current.println("...from " + nativePath);
                                nbrFilesServed++;
                                return;
                            catch (IOException e) {
                    throw new IOException();
                String jar = httpGetPath.substring(0, i);
                httpGetPath = httpGetPath.substring(i + 1);
                JarFile[] jfs = (JarFile[]) map.get(jar);
                if (jfs == null)
                    throw new IOException();
                for (i = 0; i < jfs.length; i++) {
                    JarEntry je = jfs.getJarEntry(httpGetPath);
    if (je == null)
    continue;
    writeDataBytes(getBytes(jfs[i].getInputStream(je), je.getSize()));
    nbrFilesServed++;
    return;
    throw new IOException();
    * Processes an HTTP POST method.
    * @exception IOException if the file is not found.
    private void processHttpPost() throws IOException {
    Log.current.println("POST " + bodyLine + " from " + sock.getInetAddress().getHostName());
    cycHtmlRequest(bodyLine);
    * Reads the specified number of bytes and always close the stream.
    * @param in the file to be read for subsequent downloading.
    * @param length the number of bytes to read from the file.
    * @return An array of bytes from the file.
    * @exception IOException if an error occurs when processing the file.
    private byte[] getBytes(InputStream in, long length) throws IOException {
    DataInputStream din = new DataInputStream(in);
    byte[] bytes = new byte[ (int) length];
    try {
    din.readFully(bytes);
    finally {
    din.close();
    return bytes;
    * Sends the HTML request to Cyc.
    * @param cycPath the portion of the URL which is given to the Cyc HTML server.
    private void cycHtmlRequest(String cycPath) {
    String request = sock.getInetAddress().getHostName() + "&" + cycPath + "#";
    System.out.println("request=" + request);
    ArrayList bytes = new ArrayList(10000);
    try {
    cycHtmlSocket = new Socket(cycHost, cycPort);
    System.out.println("cycHost=" + cycHost + " cycPort=" + cycPort);
    BufferedReader cycIn = new BufferedReader(new InputStreamReader(cycHtmlSocket.getInputStream()));
    PrintWriter cycOut = new PrintWriter(cycHtmlSocket.getOutputStream(), true);
    cycOut.println(request);
    cycOut.flush();
    int ch = 0;
    while (ch >= 0) {
    ch = cycIn.read();
    bytes.add(new Integer(ch));
    catch (Exception e) {
    Log.current.printStackTrace(e);
    byte[] byteArray = new byte[bytes.size()];
    for (int i = 0; i < bytes.size() - 1; i++) {
    Integer ich = (Integer) bytes.get(i);
    byteArray[i] = ich.byteValue();
    try {
    writeTextBytes(byteArray);
    catch (Exception e) {
    Log.current.println(e.getMessage());
    * Responds to the HTTP client with data content from the requested URL.
    * @param bytes the array of bytes from the URL.
    * @exception IOException if there is an error writing to the HTTP client.
    public void writeDataBytes(byte[] bytes) throws IOException {
    out.writeBytes("HTTP/1.1 200 OK\r\n");
    out.writeBytes("Server: Cyc WebServer\r\n");
    out.writeBytes("Connection: close\r\n");
    out.writeBytes("Content-Length: " + bytes.length + "\r\n");
    String prefix = (new String(bytes)).toLowerCase();
    if (prefix.indexOf("<html>") > -1)
    out.writeBytes("Content-Type: text/html\r\n\r\n");
    else
    out.writeBytes("Content-Type: application/java\r\n\r\n");
    out.write(bytes);
    out.flush();
    * Respond to the HTTP client with text content from the requested URL.
    * @param bytes the array of bytes from the URL.
    * @exception IOException if there is an error writing to the HTTP client.
    public void writeTextBytes(byte[] bytes) throws IOException {
    out.writeBytes("HTTP/1.1 200 OK\r\n");
    out.writeBytes("Server: Cyc WebServer\r\n");
    out.writeBytes("Connection: close\r\n");
    out.writeBytes("Content-Length: " + bytes.length + "\r\n");
    out.writeBytes("Content-Type: text/html\r\n\r\n");
    out.write(bytes);
    out.flush();
    * Gets properties governing the web server's behavior.
    private void getProperties() {
    port = DEFAULT_PORT;
    String portProperty = System.getProperty("org.opencyc.webserver.port", "");
    if (! portProperty.equalsIgnoreCase(""))
    port = (new Integer(portProperty)).intValue();
    Log.current.println("Listening on port " + port);
    cycPort = DEFAULT_CYC_PORT;
    String cycPortProperty = System.getProperty("org.opencyc.webserver.cycPort", "");
    if (! cycPortProperty.equalsIgnoreCase(""))
    cycPort = (new Integer(cycPortProperty)).intValue();
    Log.current.println("Cyc connections directed to port " + cycPort);
    String dirsProperty = System.getProperty("org.opencyc.webserver.dirs", "");
    dirs = new ArrayList(3);
    StringTokenizer st = new StringTokenizer(dirsProperty, ";", false);
    while (st.hasMoreTokens()) {
    String dir = st.nextToken();
    dirs.add(dir);
    trees = false;
    String treesProperty = System.getProperty("org.opencyc.webserver.trees", "");
    if (! treesProperty.equalsIgnoreCase(""))
    trees = true;
    traceRequests = false;
    String traceRequestsProperty = System.getProperty("org.opencyc.webserver.traceRequests", "");
    if (! traceRequestsProperty.equalsIgnoreCase("")) {
    traceRequests = true;
    Log.current.println("tracing requests");
    * Adds transitive Class-Path jars to jfs.
    * @param jar the jar file
    * @param jfs the list of jar files to serve.
    * @param dir the jar file directory.
    * @exception IOException if an I/O error has occurred with the jar file.
    private void addJar(String jar, ArrayList jfs, String dir) throws IOException {
    Log.current.println("Serving jar files from: " + dir + jar);
    JarFile jf = new JarFile(dir + jar);
    jfs.add(jf);
    Manifest man = jf.getManifest();
    if (man == null)
    return;
    Attributes attrs = man.getMainAttributes();
    if (attrs == null)
    return;
    String val = attrs.getValue(Attributes.Name.CLASS_PATH);
    if (val == null)
    return;
    dir = dir + jar.substring(0, jar.lastIndexOf(File.separatorChar) + 1);
    StringTokenizer st = new StringTokenizer(val);
    while (st.hasMoreTokens()) {
    addJar(st.nextToken().replace('/', File.separatorChar), jfs, dir);
    * Administrative accessor method that obtains list of directories from which files are served.
    public ArrayList getDirs() {
    return dirs;
    * Administrative method that updates the list of directories from which files are served.
    public synchronized void setDirs(ArrayList dirs) throws IOException {
    this.dirs = dirs;
    fileCache.clear();
    processDirectories();
    * Administrative accessor method that obtains number of files served.
    * @return The number of files served.
    public long getNbrFilesServed() {
    return nbrFilesServed;
    * Administrative accessor method that obtains number of files served from cache.
    * @return The number of files served from the cache.
    public long getNbrCacheHits() {
    return nbrCacheHits;
    * Administrative method that clears the file cache.
    public synchronized void clearFileCache() {
    Log.current.println("Clearing file cache");
    fileCache.clear();
    nbrFilesServed = 0;
    nbrCacheHits = 0;
    * Processes the directories from which files are served, expanding jar trees if
    * directed.
    * @exception IOException if problem occurs while processing the jar files.
    private void processDirectories() throws IOException {
    if (dirs.size() == 0)
    if (File.separatorChar == '\\')
    dirs.add(DEFAULT_WIN_DIR);
    else
    dirs.add(DEFAULT_DIR);
    Iterator directories = dirs.iterator();
    while (directories.hasNext())
    Log.current.println("Serving from " + directories.next());
    if (trees) {
    map = new HashMap();
    for (int j = 0; j < dirs.size(); j++) {
    String dir = (String) dirs.get(j);
    String[] files = new File(dir).list();
    for (int i = 0; i < files.length; i++) {
    String jar = files[i];
    if (!jar.endsWith(".jar"))
    continue;
    ArrayList jfs = new ArrayList(1);
    addJar(jar, jfs, dir);
    map.put(jar.substring(0, jar.length() - 4), jfs.toArray(new JarFile[jfs.size()]));
    * Provides the command line interface for creating an HTTP server.
    * The properties are:
    * <pre>
    * org.opencyc.webserver.port=<HTTP listening port>
    * </pre>
    * which defaults to 80.
    * <pre>
    * org.opencyc.webserver.cycPort=<Cyc connection port>
    * </pre>
    * which defaults to 3600.
    * <pre>
    * org.opencyc.webserver.dirs=<path>;<path> ... ;<path>
    * </pre>
    * with the argument enclosed in quotes if any path contains an
    * embedded space.
    * The default directory on Windows is C:
    * and the default on other systems is / the default
    * can be overridden with this property. By default, all files
    * under this directory (including all subdirectories) are served
    * up via HTTP. If the pathname of a file is <var>path</var> relative
    * to the top-level directory, then the file can be downloaded using
    * the URL
    * <pre>
    * http://<var>host</var>:<var>port</var>/<var>path</var>
    * </pre>
    * Caching of file contents is performed.
    * <pre>
    * org.opencyc.util.log=all
    * </pre>
    * If the all value is given, then all attempts to download files
    * are output.
    * <pre>
    * org.opencyc.webserver.traceRequests
    * </pre>
    * If this property has any value, then the client HTTP requests are
    * output.<p>
    * <pre>
    * org.opencyc.webserver.trees
    * </pre>
    * This property can be used to serve up individual files stored
    * within jar files in addition to the files that are served up by
    * default. If the property has any value, the server finds all jar files
    * in the top-level directory (not in subdirectories). For each
    * jar file, if the name of the jar file is <var>name</var>.jar, then any
    * individual file named <var>file</var> within that jar file (or within
    * the jar or zip files referenced transitively in the Class-Path manifest
    * attribute, can be downloaded using a URL of the form:
    * <pre>
    * http://<var>host</var>:<var>port</var>/<var>name</var>/<var>file</var>
    * </pre>
    * When this property has any value, an open file descriptor and cached
    * information are held for each jar file, for the life of the process.
    * @param args an unused array of command line arguments.
    public static void main(String[] args) {
    Log.makeLog();
    System.out.println("OpenCyc Web Server");
    try {
    // Launch thread to accept HTTP connections.
    current = new WebServer();
    current.start();
    catch (IOException e) {
    e.printStackTrace();
    * Just keep looping, spawning a new thread for each incoming request.
    public void run() {
    try {
    while (true) {
    // Launch thread to process one HTTP request.
    new Task(server.accept()).start();
    catch (IOException e) {
    e.printStackTrace();

    JLundan,
    I want to thank you for responding to the thread I started on the forum at java.sun.com. Your solution to my problem of needing to print the code of the html pages that the file I included generates was just what I was looking for. However, I have some further questions to ask, if you don't mind. To clarify my task I should say that your rephrasing of the problem is accurate: "You wan't to display the contents of the HTML file that the web server produces in response of client's request?"
    Yes, this is what I need to do, but also it needs to display the source code of that html file that the server produces in response to the client's request. Also, in this case, I am the client requesting that the server return some html file, and I'm not sure where the server is. But the webserver.java file that I shared on the forum is on my local machine. I was wondering if I could modify this webserver.java file at my home so that any html file the server returns to me would automatically display the source code. This is a school project of mine and I am stuck on this one thing here.
    Further, where would I put the "foo.html" file so it can be written to?
    FileOuputStream fos = new FileOutputStream("foo.html");
    fos.write(bytes);
    fos.close();
    Thanks so much for your help. I look forward to your response, at your convenience.
    Regards

  • Please help me 2 find a Document for this jar file com.sap.workflow_api

    HI,
    I want to create a task in UWL using web dynpro application. For this I need to import the specified com.sap.workflow_api.jar jar file.
    This jar file is in our WEB AS Server
    path=
    server\c\usr\sap\W01\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.workflow.apps\lib
    I have browsed all over for a good document , i got just one link :
    http://help.sap.com/saphelp_nw70/helpdata/EN/46/94b9b2b321581ce10000000a1553f7/frameset.htm
    Could you help me out with a better document for This task and  I want the complete document for this particular jar file com.sap.workflow_api.jar.
    It wolud be very helpful if I could get it at the earliest.
    Regards,
    Boopathi M

    HI Ayyapparaj,
    I have converted my project to javadoc,but i don't get any document for specific class. only I got what ever method is avilable in our controller that corssponding method come over in the java doc.
    How can i get the document for specified IWorkflow interface ? this com.sap.workflow_api jar file has IWorkflow interface. I need to know how to use this IWorkflow interface.
    How to use javadoc tool ?
    Regards,
    Boopathi M

  • Why Won't This AVI File Copy?

    Sometimes I try to copy an AVI file onto an external USB or to my Apple TV. Every once in a while I get one file that starts out copying, but then I get an error message saying it "could not be read or written. (Error code -36)". The file names have no unusual characters in them.
    Anybody have an idea why this is? Thanks.
    By the way I have an iBook and I'm running OS 10.4.11 on it.

    Hi Homer, is this File Transfer being done via SMB, or to an MS-DOs/Fat32 Drive?
    If so there would be a 2 to 4GB file size limit.
    For error -36, might try this...
    http://docs.info.apple.com/article.html?artnum=301580
    Well, in pure Apple File System talk... -36 ioErr I/O error (bummers)
    Not very helpful, but generally means a Drive quit being Readable or Writable since starting the operation...
    http://fuzzy.wordpress.com/2006/12/10/ioerror-36/

  • Photoshop Elements 12 - preset for new blank file

    I am using a trial of Photoshop Elements 12 and I would like to know how to make a preset for a new blank file so I don't have to keep loading that information into the program.
    Thank you.

    First make sure pse 12 is not running before doing the below steps.
    Also, in windows 8.1, you need to have the Hidden Files and folders shown
    http://www.ricksdailytips.com/view-hidden-files-and-folders-windows-8-1/
    Go to
    C:\Users\User Name\AppData\Roaming\Adobe\Photoshop Elements\12.0\Editor
    and open the New Documents Sizes.psp in Notepad
    Then after whatever number is actually in the file (two in my example)
    paste this line and then File>Save
    "785 px X 250 px" 785.00 250.00 px 72.00 dpi RGB 8 1.00 white "sRGB IEC61966-2.1"
    Then start the pse 12 editor and the preset should show on the preset list in the new document dialog

  • Rtp plugin for an  avi  file in jmf  ?

    hello i'm new with jmf and i have a problem with my proccesor. I have datasource which reads from a stored file that is avi file and i dont know what format should i call to transform it to an avi_rtp file while im configuring my processor.Can anyone give me a clue what plugin should i call ?
    thanks
    George

    Using a Third party tool 'Streamer' in Linux. it is given in the examples of 'Streamer' how to capture and save a file in avi format. all are valid avi files, i can play those with media player.. and Gspot can render those files successfully!.. but while trying with JMF player, the following error is displaying.,....
    Failed to configure: com.sun.media.PlaybackEngine@1b15692
    Bad header in the media: strh: header length should be atleast 56 but is 48
    Error: Unable to realize com.sun.media.PlaybackEngine@1b15692

  • Alternative to roadmovie for converting avi files to ipod format.

    Hey all,
    I am currently using roadmovie to convert my avi files to the ipod format. I like it, because it can do batch converts.
    Unfortunately, when I put some files to be converted, it always crashes after the first one.
    I was wondering if anyone knows a good alternative to roadmovie. I would like it to be able to do batch converts and add subtitles to my converted movies.
    Anyone a suggestion?
    Thanks

    I do not know if it supports subtitle, but it does batch converting:
    Mpeg streamclip http://www.squared5.com/

Maybe you are looking for