Grab frames from mpeg video without framegrabber card?

i would like to grab images from an mpeg playing on my computer. ideally the video would play in an ActiveX container and my VI would grab an image when it was ready. the application is for testing of computer vision algorithms. you can email me at [email protected] with suggestions. thank you.

vtruel wrote in message news:<[email protected]>...
> thanks Evan. but im trying to grab the images for immediate
> processing by my algorithm. and the image should be only the video,
> not the entire front panel. is there a way to do this?
Hi,
IVision has functions for grabbing frames out of mpeg file (under the
media file group)and you can process them frame by frame. Get a demo
version to try out at:
http://www.hytekautomation.com/Products/IVision.html
Feel free to ask me any questions regarding the software.
Irene
[email protected]

Similar Messages

  • Print Out Still Frames From HD Video

    I am importing HD video into iMovie 08. I have made a few still frames from the video for printing. I could not export them to iPhoto or Photoshop Elements 2.
    How can I make HD video prints? Do I need new software?

    I have made a few still frames from the video for printing. I could not export them to iPhoto or Photoshop Elements 2.
    Select the "still frame" sequence and use the "Reveal in Finder" option to take you to the saved "still image" in the named_Project package. If you then double-click the image, it will open in Preview. Using Preview, you can print the image or save it to any of the available image formats in any "visible" location for later access by whatever graphic application you wish to use.

  • How do i export a single jpeg frame from a video file in final cut x

    how do i export a single jpeg frame from a video file in final cut x

    You can also use the 3 finger method of COMMAND+SHIFT+4, then drag across what you want to copy from the image. That will show up on your desktop, which then you can edit using Photoshop, if you want too.
    You can then change the file format from a PNG to either a .JPG or TIFF or even a Photoshop image.
    Make sure, you have stopped the playback, to what you want to save as a still.
    Either method works, to make a still image from video.

  • I cannot save a frame from a video following the recent Apple recall to replace my hard drive. There is no menu option with share  and save frame. Do I need to reinstall Final Cut Pro?

    Since the recent replacement of my hard drive, I cannot save a frame from a video. There is no menu option with share and "save frame"  I used to be able to do this.
    Please help

    In the Share popup select Add Destionation to go to the Destination preference. Drag still image to the sidebar to make it available in the popup.

  • FrameGrabbingControl - grab frame problem with video type

    Hi all
    I have a problem with extracting frames from a video.
    Currently I am able to extracting video from some avi formats. But this method does not works for many formats. like mpg etc...
    The FrameGrabbingControl object return null for many formats.
    This is my code
    public Player getVideoPlayer() throws Exception
            if (videoPlayer == null)
                File file = new File("E:\\Songs\\English\\Video\\Alizee\\20090209114235.avi");
                MediaLocator videoMediaLocator = new MediaLocator(file.toURL());
                videoPlayer = Manager.createRealizedPlayer(videoMediaLocator);
            return videoPlayer;
    public FrameGrabbingControl getFrameGrabCntrl() throws Exception
            if (frameGrabCntrl == null)
                frameGrabCntrl = (FrameGrabbingControl) getVideoPlayer().getControl("javax.media.control.FrameGrabbingControl");
            return frameGrabCntrl;
    // frame extract method
    public Image captureCurrent() throws Exception
            Buffer frame = getFrameGrabCntrl().grabFrame();
            BufferToImage stopBuffer = new BufferToImage((VideoFormat) frame.getFormat());
            return stopBuffer.createImage(frame);
        }Here are some 3 sample media information I have tested with the program. First two works fine but 3rd one does not works.
    // taken from http://www.exactfutures.com/index02.htm and downloaded http://www.exactfutures.com/vid2jpg.zip
    // WORKS FINE
       General
          Complete name : E:\Songs\English\Video\Alizee\testcam04.avi
          Format : AVI
          Format/Info : Audio Video Interleave
          Format/Family : RIFF
          File size : 1.88 MiB
          PlayTime : 29s 596ms
          Bit rate : 533 Kbps
       Video #0
          Codec : Indeo 4
          Codec/Info : Intel Indeo Video 5.0 Wavelet
          PlayTime : 29s 596ms
          Bit rate : 528 Kbps
          Width : 320 pixels
          Height : 240 pixels
          Aspect ratio : 4/3
          Frame rate : 3.818 fps
          Bits/(Pixel*Frame) : 1.801
    // recorded video from a webcam
    // WORKS FINE
       General
          Complete name : C:\Program Files\MSI\MyGuard Live\VideoClip\20090209114235.avi
          Format : AVI
          Format/Info : Audio Video Interleave
          Format/Family : RIFF
          File size : 311 KiB
          PlayTime : 3s 200ms
          Bit rate : 710 Kbps
       Video #0
          Codec : Indeo 4
          Codec/Info : Intel Indeo Video 5.0 Wavelet
          PlayTime : 3s 200ms
          Bit rate : 705 Kbps
          Width : 640 pixels
          Height : 480 pixels
          Aspect ratio : 4/3
          Frame rate : 15.000 fps
          Bits/(Pixel*Frame) : 0.153
    // downloaded avi sample video
    // NOT WORKS
       General
          Complete name : E:\Songs\English\Video\Alizee\fvss_demo.avi
          Format : AVI
          Format/Info : Audio Video Interleave
          Format/Family : RIFF
          File size : 10.3 MiB
          PlayTime : 2mn 300ms
          Bit rate : 715 Kbps
       Video #0
          Codec : MS Video
          Codec/Info : Microsoft Video 1
          PlayTime : 2mn 300ms
          Bit rate : 638 Kbps
          Width : 160 pixels
          Height : 120 pixels
          Aspect ratio : 4/3
          Frame rate : 10.000 fps
          Bits/(Pixel*Frame) : 3.325
       Audio #1
          Codec : PCM
          Codec/Family : PCM
          Codec/Info : Microsoft PCM
          PlayTime : 2mn 300ms
          Bit rate : 64 Kbps
          Channel(s) : 1 channel
          Sampling rate : 8000 Hz
          Resolution : 8 bitsI think problem is the codec. Am I correct?
    Could anyone please tell me why can't I use this FrameGrabbingControl object to extract frames?

    deshan wrote:
    Currently I am able to extracting video from some avi formats. But this method does not works for many formats. like mpg etc...
    The FrameGrabbingControl object return null for many formats.That's expected behavior when the codec doesn't support capture...
    Could anyone please tell me why can't I use this FrameGrabbingControl object to extract frames?Because it's not supported for that format.
    But T.B.M. and I have recently worked on / posted a workaround that should capture any video format that JMF can play.
    [http://forums.sun.com/thread.jspa?messageID=10596692#10596692]

  • Using PHP to Create a Poster Frame from a Video

    I have a PHP script which I am using to grab a poster frame from an arbitrary video ($video). Currently it breaks the video into all its frames, counts the files, and grabs the middle one...
    system("mplayer -vo png $video");
    system("mv " . sprintf("%08d.png", floor(system("ls -1 | wc -l") / 2)) . " /home/.");
    The issue with the code above is that, until completion, it fills up a large portion of the hard drive on the server. I know I can figure out the number of the middle frame with the code below, but I do not know of a way to pull out the middle frame without pulling out all the other frames too...
    $fps = system("x=$(mplayer -msglevel all=0 -identify -vo null -frames 0 $video 2>&1 | grep ID_VIDEO_FPS) ; echo ${x#*=}");
    $length = system("x=$(mplayer -msglevel all=0 -identify -vo null -frames 0 $video 2>&1 | grep ID_LENGTH) ; echo ${x#*=}");
    $midframe = floor($fps * $length / 2);
    Does anyone have any ideas? At the very least, is there a way I can read each frame but only save the middle one?

    tony5429 wrote:Yeah; I may end up going with a solution like that. I had hoped to be able to seek to a specific frame. Really I'd like the script to be very robust - for example, if I pass it a 30-fps video that is one second long, I'd like to get the #15 frame...
    Google told me mplayer can't seek to a specific frame, but does 1/100th of a second seeks. I'm not sure how precise the duration estimates are.

  • Extraction Key Frames from a video

    Hi all,
    I would like to know what is the best way to extract keyframe from a video.
    My Status (butr I can cahnge it)
    I'm Marco and I'm using JMF; I need for an help because I don't know how to extract keyframes from AVI and MPG files.
    I'm using the code posted in this forum for extracting all frame in a video with the adding of an if expression that in the accessFrame method that I report below:
    void accessFrame(Buffer frame) {
    BufferToImage stopBuffer = new BufferToImage((VideoFormat) frame.getFormat());
    Image stopImage = stopBuffer.createImage(frame);
    try {
    BufferedImage outImage = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_RGB);
    Graphics og = outImage.getGraphics();
    og.drawImage(stopImage, 0, 0, size.width, size.height, null);
    Iterator writers = ImageIO.getImageWritersByFormatName("jpg");
    ImageWriter writer = (ImageWriter) writers.next();
    File f = new File(frame.getSequenceNumber() + ".jpg");
    if ((frame.getFlags() & Buffer.FLAG_KEY_FRAME) != 0){{color}
    {color:#ff9900}
    ImageOutputStream ios = ImageIO.createImageOutputStream(f);
    writer.setOutput(ios);
    {color:#ff9900}
    writer.write(outImage);
    ios.close();}
    } catch (IOException e) {{color}
    System.out.println("Error :" + e);
    So, I'm able to extract some keyframe, but i'm not sure it is the correct way and my dubt grows out of the fact that without the if expression highlighted in red, it seems that I have more keyframes (those ones with flag ==1040). Another problem is that it works only with AVI because MPG instead of 1040, they have alternate sequence of 32 and 1056.
    Cheers and thank u
    Marco

    >
    With the code yoodleyee posted, frames can be extracted and converted from the raw decoded format into images, but no guarantee that the frame extracted is a key frame, isnt it?Actually, there is such a guarantee...because the FrameGrabbingControl isn't implemented in any video format that uses keyframes. So, if it works, then every frame of the video is a keyframe, and it won't work otherwise.
    How can key frames be detected with JMF and then extracted with the code provided? Any tutorial or sample code about that?They can't be. You can write a custom codec that will give you access to every frame, regardless of the format, if you're wanting to get all of the frames.
    Example: [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/FrameAccess.html]
    But JMF doesn't have any way of dealing with key frames directly, at least that I am aware of.

  • Can I Extract a Frame from a Video (in Lightroom 3 or Photoshop CS5)?

    I'm running Windows 7 and have Lightroom 3 and Photoshop CS5.  Extracting a frame from a .MOV file is way over my head, but I want to try.  Right now the file is in Lightroom, but the "Open in" options are grayed out.  I have exported the file to my desktop, and  I can play the video with Windows Media Player.  I bet somewhere, somehow there is a way to do what I want.  Any help, ideas or references would be much appreciated!

    When you say "Extract a frame", do you mean saving one of the frames as an image from Photoshop?
    Here's what you can do:
    1. Open the video in Photoshop, File > Open, and choose the .mov file.
    2. Once the video opens in Photoshop, open the Animation panel, Window > Animation
    3. In the Animation panel move the playhead to the desired frame, and save it as an image, File > Save As.
    and Voila!
    Any questions, just ask. I'll be more than happy to help.
    Marek Mularczyk
    http://SaiTraining.co.uk
    http://PhotoshopLightroomBridge.co.uk
    http://PhotoshopLightroomTV.com

  • How to extract any picture (frame) from the video file

    I am writing an application that is going to show the grid of tiles. Each tile should have picture that is frame from some particular video.
    Basically something similar to Photos or Videos - standard Windows Phone app.
    The question is how can i extract any picture from the video to put it as picture of the tile or button?

    I pinged you offline.
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

  • How to get the free Apps from app store without credit card?

    Hi, i would like to know if it is possible to access free apps from app store without having a credit card on my apple account?
    I don't have a card, i would have to creat a virtual one for example.
    Can anyone tell me if it is possible please?
    Thanks

    Read through the link here >>> http://support.apple.com/kb/HT2534
    It should solve your problem.

  • Is it possible to get a single frame from a video taken on iPhone?

    Help!!! I really need to get a single picture out of a video I took on my iPhone. Someone please tell me it's possible :)

    very easy:
    1. pause the video on the frame you want
    2. hold the home button and press the off switch at the top (like a shutter release on a camera)
    3. the screen shot will appear in your photos
    here is a frame from 'Apollo 18'

  • Convert mpeg videos without changing original date

    Hi
    I'm trying to convert my mpeg videos to mp4 or other, so as i can import them to iphoto and display them in a slideshow. i want to play the videos and photos (jpegs) in the sequence they have been taken, so i would need to keep the original date and time in the file or keep somewhere the shooting date and time and have iphoto play them in this order (not the file date and time order, which possibility, by the way, i haven't found).
    I noticed that when i convert, not only the file date and time are changed to the present, but the original date and time too.
    Help is welcome.

    Unlike photos movies do not have EXIF data to tell their dates, etc so the file date is used - I do not think that batch change date and time will fix this but it is worth a try - and try changing the date/time in the info window - but again I do not have great hope for that
    Old Toad does a lot more with movies than I do - so he probably will have some ideas
    You may have to do the slide show in something other than iPhoto - iMovie - Photo Presenter http://www.boinx.com/photopresenter/overview/ - etc
    LN

  • Capture a frame from a video clip and save as a photo

    I create a freeze frame in a video clip, select it, and cut it, but it doesn't go into the general copy/paste buffer. How can I export the frame as a photo?

    See my post here for full instructions.
    https://discussions.apple.com/docs/DOC-3231

  • Re: how to capture a frame from a video file and save it as a jpeg

    package com.snn.multimedia;
    * @(#)FrameAccess.java     1.5 01/03/13
    * Copyright (c) 1999-2001 Sun Microsystems, Inc. All Rights Reserved.
    * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
    * modify and redistribute this software in source and binary code form,
    * provided that i) this copyright notice and license appear on all copies of
    * the software; and ii) Licensee does not utilize the software in a manner
    * which is disparaging to Sun.
    * This software is provided "AS IS," without a warranty of any kind. ALL
    * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
    * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
    * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
    * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
    * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
    * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
    * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
    * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
    * POSSIBILITY OF SUCH DAMAGES.
    * This software is not designed or intended for use in on-line control of
    * aircraft, air traffic, aircraft navigation or aircraft communications; or in
    * the design, construction, operation or maintenance of any nuclear
    * facility. Licensee represents and warrants that it will not use or
    * redistribute the Software for such purposes.
    import java.util.Date;
    import java.util.Arrays;
    import java.util.Iterator;
    import javax.imageio.ImageIO;
    import javax.imageio.stream.ImageOutputStream;
    import javax.imageio.ImageWriter;
    import java.awt.*;
    import java.awt.image.BufferedImage;
    import java.awt.image.DataBufferByte;
    import javax.media.*;
    import javax.media.control.FramePositioningControl;
    import javax.media.control.TrackControl;
    import javax.media.Format;
    import javax.media.format.*;
    import javax.media.util.BufferToImage;
    import javax.media.util.ImageToBuffer;
    import java.io.FileOutputStream;
    import java.io.OutputStream;
    import com.sun.image.codec.jpeg.*;
    * Sample program to access individual video frames by using a
    * "pass-thru" codec. The codec is inserted into the data flow
    * path. As data pass through this codec, a callback is invoked
    * for each frame of video data.
    public class FrameAccess extends java.awt.Frame implements ControllerListener
    Processor p;
    Object waitSync = new Object();
    boolean stateTransitionOK = true;
    * Given a media locator, create a processor and use that processor
    * as a player to playback the media.
    * During the processor's Configured state, two "pass-thru" codecs,
    * PreAccessCodec and PostAccessCodec, are set on the video track.
    * These codecs are used to get access to individual video frames
    * of the media.
    * Much of the code is just standard code to present media in JMF.
    public boolean open(MediaLocator ml)
    try
    p = Manager.createProcessor(ml);
    catch (Exception e)
    System.err.println("Failed to create a processor from the given url: "
    + e);
    return false;
    p.addControllerListener(this);
    // Put the Processor into configured state.
    p.configure();
    if (!waitForState(p.Configured))
    System.err.println("Failed to configure the processor.");
    return false;
    // So I can use it as a player.
    p.setContentDescriptor(null);
    // Obtain the track controls.
    TrackControl tc[] = p.getTrackControls();
    if (tc == null)
    System.err.println("Failed to obtain track controls from the processor.");
    return false;
    // Search for the track control for the video track.
    TrackControl videoTrack = null;
    for (int i = 0; i < tc.length; i++)
    if (tc.getFormat() instanceof VideoFormat)
    videoTrack = tc[i];
    break;
    if (videoTrack == null)
    System.err.println("The input media does not contain a video track.");
    return false;
    VideoFormat currentFormat = (VideoFormat)videoTrack.getFormat();
    System.err.println("Video format: " + videoTrack.getFormat() );
    videoTrack.setFormat(new VideoFormat("RGB", currentFormat.getSize(), currentFormat.getMaxDataLength(), currentFormat.getDataType(), currentFormat.getFrameRate()));
    // Instantiate and set the frame access codec to the data flow path.
    try
    // Try to retrieve a FramePositioningControl from the player.
    FramePositioningControl fpc = (FramePositioningControl) p.getControl("javax.media.control.FramePositioningControl");
    if (fpc == null)
    System.err.println("The player does not support FramePositioningControl.");
    System.err.println("There's no reason to go on for the purpose of this demo.");
    return false;
    Time duration = p.getStopTime();
    long totalFrames = 0;
    if (duration != Duration.DURATION_UNKNOWN)
    System.err.println("Movie duration: " + duration.getSeconds());
    totalFrames = fpc.mapTimeToFrame(duration);
    if (totalFrames != FramePositioningControl.FRAME_UNKNOWN)
    System.err.println("Total # of video frames in the movies: "
    + totalFrames);
    } else
    System.err.println("The FramePositiongControl does not support mapTimeToFrame.");
    } else
    System.err.println("Movie duration: unknown");
    long[] frames;
    if (totalFrames > 0L)
    double intervalDouble = Math.floor(totalFrames / 5.0);
    long interval = new Double(intervalDouble).longValue();
    frames = new long[5];
    frames[0] = 1;
    frames[1] = frames[0] + interval;
    frames[2] = frames[1] + interval;
    frames[3] = frames[2] + interval;
    frames[4] = frames[3] + interval;
    } else
    frames = new long[1];
    frames[0] = 1;
    // Codec codec[] = { new PreAccessCodec(), new PostAccessCodec()};
    Codec codec[] = { new OverlayCodec(frames)};
    videoTrack.setCodecChain(codec);
    catch (UnsupportedPlugInException e)
    System.err.println("The process does not support effects.");
    // Realize the processor.
    p.prefetch();
    if (!waitForState(p.Prefetched))
    System.err.println("Failed to realize the processor.");
    return false;
    // Display the visual & control component if there's one.
    setLayout(new BorderLayout());
    Component cc;
    Component vc;
    if ((vc = p.getVisualComponent()) != null)
    add("Center", vc);
    if ((cc = p.getControlPanelComponent()) != null)
    add("South", cc);
    // Start the processor.
    p.start();
    setVisible(true);
    return true;
    public void addNotify()
    super.addNotify();
    pack();
    * Block until the processor has transitioned to the given state.
    * Return false if the transition failed.
    boolean waitForState(int state)
    synchronized (waitSync)
    try
    while (p.getState() != state && stateTransitionOK)
    waitSync.wait();
    catch (Exception e)
    return stateTransitionOK;
    * Controller Listener.
    public void controllerUpdate(ControllerEvent evt)
    if (evt instanceof ConfigureCompleteEvent
    || evt instanceof RealizeCompleteEvent
    || evt instanceof PrefetchCompleteEvent)
    synchronized (waitSync)
    stateTransitionOK = true;
    waitSync.notifyAll();
    } else
    if (evt instanceof ResourceUnavailableEvent)
    synchronized (waitSync)
    stateTransitionOK = false;
    waitSync.notifyAll();
    } else
    if (evt instanceof EndOfMediaEvent)
    p.close();
    System.exit(0);
    * Main program
    public static void main(String[] args)
    if (args.length == 0)
    prUsage();
    System.exit(0);
    String url = args[0];
    if (url.indexOf(":") < 0)
    prUsage();
    System.exit(0);
    MediaLocator ml;
    if ((ml = new MediaLocator(url)) == null)
    System.err.println("Cannot build media locator from: " + url);
    System.exit(0);
    FrameAccess fa = new FrameAccess();
    if (!fa.open(ml))
    System.exit(0);
    static void prUsage()
    System.err.println("Usage: java FrameAccess <url>");
    * Inner class.
    * A pass-through codec to access to individual frames.
    public class PreAccessCodec implements Codec
    * Callback to access individual video frames.
    void accessFrame(Buffer frame)
    // For demo, we'll just print out the frame #, time &
    // data length.
    long t = (long) (frame.getTimeStamp() / 10000000f);
    System.err.println("Pre: frame #: " + frame.getSequenceNumber()
    + ", time: " + ((float) t) / 100f + ", len: "
    + frame.getLength());
    * The code for a pass through codec.
    // We'll advertize as supporting all video formats.
    protected Format supportedIns[] = new Format[] {
    new VideoFormat(null)
    // We'll advertize as supporting all video formats.
    protected Format supportedOuts[] = new Format[] {
    new VideoFormat(null)
    Format input = null, output = null;
    public String getName()
    return "Pre-Access Codec";
    // No op.
    public void open()
    // No op.
    public void close()
    // No op.
    public void reset()
    public Format[] getSupportedInputFormats()
    return supportedIns;
    public Format[] getSupportedOutputFormats(Format in)
    if (in == null)
    return supportedOuts;
    } else
    // If an input format is given, we use that input format
    // as the output since we are not modifying the bit stream
    // at all.
    Format outs[] = new Format[1];
    outs[0] = in;
    return outs;
    public Format setInputFormat(Format format)
    input = format;
    return input;
    public Format setOutputFormat(Format format)
    output = format;
    return output;
    public int process(Buffer in, Buffer out)
    // This is the "Callback" to access individual frames.
    accessFrame(in);
    // Swap the data between the input & output.
    Object data = in.getData();
    in.setData(out.getData());
    out.setData(data);
    // Copy the input attributes to the output
    out.setFormat(in.getFormat());
    out.setLength(in.getLength());
    out.setOffset(in.getOffset());
    return BUFFER_PROCESSED_OK;
    public Object[] getControls()
    return new Object[0];
    public Object getControl(String type)
    return null;
    public class OverlayCodec extends PreAccessCodec
    long[] myFrames;
    BufferedImage work;
    byte[] workData;
    int width;
    int height;
    int dataLen;
    RGBFormat supportedRGB = new RGBFormat(null, // size
    Format.NOT_SPECIFIED, // maxDataLength
    Format.byteArray, // dataType
    Format.NOT_SPECIFIED, // frameRate
    24, // bitsPerPixel
    3, 2, 1, // red/green/blue masks
    3, // pixelStride
    Format.NOT_SPECIFIED, // lineStride
    Format.FALSE, // flipped
    Format.NOT_SPECIFIED); // endian
    public OverlayCodec(long[] frames)
    // force specific input format
    supportedIns = new Format[] {
    supportedRGB};
    myFrames = new long[frames.length];
    System.arraycopy(frames, 0, myFrames, 0, frames.length);
    public String getName()
    return "Capture Codec";
    public Format setInputFormat(Format format)
    if ((format != null) && (format instanceof RGBFormat)
    && format.matches(supportedRGB))
    // set up working image if valid type
    // (it should be since we insisted!)
    Dimension size = ((RGBFormat) format).getSize();
    width = size.width;
    height = size.height;
    dataLen = width * height * 3;
    if ((dataLen > 0)
    && ((work == null) || (work.getWidth() != width)
    || (work.getHeight() != height)))
    // working image - same 3-byte format as buffer
    work = new BufferedImage(width, height,
    BufferedImage.TYPE_3BYTE_BGR);
    // reference to pixel data
    workData = ((DataBufferByte) work.getRaster().getDataBuffer()).getData();
    return format;
    * Callback to access individual video frames.
    void accessFrame(Buffer in)
    try
    if (Arrays.binarySearch(myFrames, in.getSequenceNumber()) >= 0)
    BufferToImage stopBuffer = new BufferToImage((VideoFormat) in.getFormat());
    Image stopImage = stopBuffer.createImage(in);
    BufferedImage outImage = new BufferedImage(140, 96,
    BufferedImage.TYPE_INT_RGB);
    Graphics og = outImage.getGraphics();
    og.drawImage(stopImage, 0, 0, 140, 96, null);
    FileOutputStream fout = new FileOutputStream("image"
    + in.getSequenceNumber() + ".jpg");
    writeImage(outImage, fout);
    catch (Exception e)
    e.printStackTrace();
    public int process(Buffer in, Buffer out)
    try
    accessFrame(in);
    BufferToImage stopBuffer = new BufferToImage((VideoFormat) in.getFormat());
    Image stopImage = stopBuffer.createImage(in);
    ImageToBuffer outImagebuffer = new ImageToBuffer();
    out = outImagebuffer.createBuffer(stopImage, p.getRate());
    // Swap the data between the input & output.
    in.copy(out, true);
    catch (Exception e)
    e.printStackTrace();
    return BUFFER_PROCESSED_OK;
    void writeImage(BufferedImage outImage, OutputStream os) throws Exception
    Iterator writers = ImageIO.getImageWritersByFormatName("jpg");
    ImageWriter writer = (ImageWriter) writers.next();
    ImageOutputStream ios = ImageIO.createImageOutputStream(os);
    writer.setOutput(ios);
    writer.write(outImage);
    ios.close();

    Hi,
    I have a jpeg movie file 60 mins long and a text file tell me five time-lines for breaking the movie. For example, break the movie at 10:21, 16:05�
    The final output should be five small jpeg movie files. Each file contains a 90 sec (30 sec before the break time and 60 sec after the break time).
    Do you know any java library (jar) contain the library that can help me on programming this? Any existing source code? Any SDK for a movie editor can do that?
    Please help.
    Thanks
    Kenny

  • Premiere Pro 7.0 dropping random frames from original video

    Here is one of many problems I am running into. When I import original video into Adobe Premiere Pro 7.0 it always leaves out a few frames in random spots scattered throughout a clip (I'm guessing this is what is referred to as dropped frames).
    I first noticed this when I went to sync the audio mp3 files, which are imported seperatly, to the video clips and found that the audio clips are a few frames longer; and the audio/video don't match up.
    I was hoping someone could shine some light onto why this is happening and what can be done to remedy it. I've fiddled around with differnt settings when loading a new project with no success.
    I am importing the origina video from a folder on my desktop. It is MPEG-2 format and came from my Sony Handycam DCR SR45 camcorder. Below are the properties for the video according to a video player on my computer.
    Video:
    MPEG-2 Video
    720x480 (16:9)
    29.97fps 9100Kbps
    Audio:
    Dolby AC3 48000Hz stereo 256Kbps (this audio doesn't show up with imported video files which is why I import seperate mp3 audio)
    P.S.
    I've recently been told that MPEG-2 files are not ideal for video editing. I've also been told that Premiere Pro doesn't recognize AC3 audio, which is why I am importing the audio seperatly as mp3 files that I have created in another program. Also I've been told that the camcorder I use is not ideal for editing purposes.
    So, if anyone sees any reasons to disagree or concur with these statements, please let me know. But, as for right now, I currently have existing video from this camcorder that I MUST make work in Adobe Premiere Pro, so please help me work with what I got. Thanks.

    I have began uploading 2 vidoes to the DropBox.
    One is the original that came from my camcorder, the other is the attempted converted DV AVI.
    The footage is a clip of a turkey hunt i filmed for a friend where a turkey is shot at and missed. The video is not that great but I still need it and other similar clips.
    I'm not sure if your familar with Dropbox or not.  We mainly use it for PDF's from architects and Contractors, but I am trying it for video for the first time.  Here is what it states for sharing files publicly:
    function(){return A.apply(null,[this].concat($A(arguments)))}
    The Public Folder lets you easily share single files in your Dropbox.  Any file you put in this folder gets its own Internet link so that you can share it with others-- even non-Dropbox users!  These links work even if your computer’s turned off. 
    Step 1:  Drop a file into the Public folder.
    Step 2: Right-click/control-click this file, then choose Dropbox > Copy Public Link. This copies the Internet link to your file so that you can paste it somewhere else.
    That's it!  You can now share this file with others: just paste the link into e-mails, instant message conversations, blogs, etc.!
    If you'd like more help with sharing files, head here: http://www.getdropbox.com/help/16
    Happy Dropboxing!
    - The Dropbox Team
    Note: You can only link to actual files within your Public Folder, not to folders.
    I guess I will try to paste these links now even though they are still uploading.  I will re-paste them later when the upload is complete.
    Original Video - http://dl.dropbox.com/u/5773253/Tom%20Turkey%20-%20Original%20MPEG2.MPG
    DV AVI - http://dl.dropbox.com/u/5773253/Tom%20Turkey%20-%20Converted%20DV%20AVI.avi
    Anyone else who want's to play around with these videos have at it.
    I'm glad I found this forum. Thanks for helpin'

Maybe you are looking for

  • COGS value should not be updated in COPA

    Hi Experts, Greeting from day!!!! One of my client is having 2 Plants (Ex 1000,1100) from there they are making billing to customers. and the requirement is while making billing to customers from 1100 they want update COGS values in COPA where as fro

  • Free-characteristic in crystal report

    Hi all,      Am trying to use BW query in crystal reports but after making the connection the free-characteristic of the BW query does not show up in crystal report's field explorer. kindly help me on the issue. Thanks in advance.

  • Airport Utility 6.0 doesn't detect my network after any change

    10.7.3, Airport Utility 6.0, MacBook Pro and MacBook Air, Airport Extreme and Airport Express base stations How does one get Airport Utility 6.0 to see their network again after making any changes to one of the base stations? When you make any change

  • Restore from SQL backup

    One of our sap server has gone due to hardware failures where SQL server is used as the backend. I have the full database backup and I want to restore the server from that backup. Can someone pls point me to good references/guides for doing the same?

  • Should I load product info into memory or keep in db?

    Hi, I am going to develop a b2c shopping website with jboss-tomcat bundle. Now I must make a decision on whether I should load product info into memory or just keep it in table. If load into memory, the performance of customer browsing and searching