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.

Similar Messages

  • I would like to know how to extract my old contacts from the iTunes backup? Please explain in basic english i am a beginner

    I have had my old Iphone 5s replaced with a new one but I would like to know how to extract my old contacts from the iTunes backup? Please explain in basic english i am a beginner

    Hey,
    I think you will find that you have to have a debit/credit card stored on yur account regardless of whether your have iTunes Credit or want to purchase a free App. I don't know why, I assume its for ID verification or is part of the terms and conditions. I occasionally have to re-verify my credit card info even when just trying to run Update on one of my Apps or like I said downloading a free App.
    If you need further clarification all you can do is contact iTunes Support:
                   https://expresslane.apple.com/ServiceOptionAction.action
    Hope this helps. Andrew

  • How can I find a photo from the backup file in my pc?

    How can I find a photo from the backup file in my pc?
    I have accidentally erased a photo. It happened after the backup.

    I am not aware you can extract a single photo or a single app's content from the backup, you can either restore the whole backup to your phone or not restore. If you restore your last backup to your phone then any content that is currently on your phone will be replaced with what was on it at the time that the backup was made - so if you do decide to restore, first copy off any purchases to your computer's iTunes via File > Transfer Purchases, and copy any documents/files that you've udpated on the phone since the backup.

  • 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.

  • How to Extract data and reports from the SAP BW warehouse

    Hi to All Guru's
    I am new to SAP BW. Can any one help me to know, How to Extract data and reports from SAP BW. Do we use any tools.  After Extracting the data from SAP BW how can we move all the data to Cognos.  It would be kind enough to provide me with any documentation or links.  Step by step procedure would be very much helpfull to me.
    Thanks
    Venu

    Hi Voodi
    Thanks for the quick response. I think Open hub is to extract the data from SAP BW, but what about sending this data into Cognos.  Can you please let me know in detail regarding answer. If possible send me any documentation or links regarding this.  Thanks for your concern.
    Venu

  • After rotobrush, how to make background picture appear in the video when exporting it to PremierePro

    I seem to have problems saving/using it with premiere pro. it's a 10 second video of myself with 3 pics: 2 that I put in front of the video and one as a background. In after effects, in the bottom left corner box, the 2 pics are above the video file and the background picture is below it. Still in after effects, the background pic is there behind me and the 2 other pictures are in front of my video which is where everything should be, great. When i save it, then export it to premiere pro, the 2 pics in front are there but not the background pic, the background is just my full video as if I didn't rotobrush it.  Help??
    Also, how can i export the project as a file in Avi, mpeg, mp4...?
    Thanks in advance

    Hello Mylenium, i do apologize about my ambiguous question. I'm starting to learn how to use it and in some way, i didn't even know what i was talking about myself. But thanks to your help, i now got it.
    "When you export an After Effects project as an Adobe Premiere Pro project, Adobe Premiere Pro uses the settings from the first composition in the After Effects project for all subsequent sequences. Keyframes, effects, and other properties are converted in the same way as when you paste an After Effects layer into an Adobe Premiere Pro sequence."
    so as it says above, it only uses the initial video. What i did was only render using the rotobrush and i didn't "render queue" the whole project afterwards simply because i didn't know i had to do that. I thought rendering it from rotobrushing it and adding the background effects would be enough.
    Again, thank you. and i also learned how to save it in different format, since AVI outputs a huge file size.

  • Hi please tell me how can I remove picture frame from lock screen

    ?

    You can only turn it off if you have a passcode on the lock screen - in which case you do it via Settings > General > Passcode Lock > Picture Frame off. If you don't have a passcode lock then you can't disable it

  • 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

  • How do I remove an entry from the "Store Files" drop down list in the "Import Settings" section of Aperture 3.3.2

    The dropdown list "Store Files" in the "Import Settings" section of Aperture 3.3.2 displays the history of the entries previously added to the list. Some of the entries are no longer valid and I'm trying to delete them but I can't find a way to do this. This is a screenshot. Does anyone know how to do this?

    Once again - the Jive system ate my bullet points and messed up the formatting
    Is the MacOS X version in your signature correct? Then you cannot be using Aperture 3.3.2?
    You should not be seeing duplicate entries in the "Store Files" pop-up menu. This looks like your Aperture Preferences file is corrupted and needs fixing.
    Quit Aperture (and log off and on again, if you are running MacOS X 10.7 or later)
    Then reveal your User Library (from the Finder's main menu bar, the "Go" menu. Hold down the options-key until the library apears in the drop-down menu)
    In the Library folder select the "Preferences folder and locate the file "~/Library/Preferences/com.apple.Aperture.plist"
    Now you can either
    remove the com.apple.Aperture.plist file to the Desktop, to force Aperture to create a new one, but you will have to set again your Preferences from the "Preferences" panel,
    or make a backup copy of the file and edit it, if you are an experienced programmer and have Xcode installed. To fix the drop-down list you need to edit the item "RecentReferenceFolders" and delete the redundant folder names. Enter "recent" into the search field to find it quickly. If you click an item in the list, plus/minus buttons should appear. But only try this, if you know how to edit property lists, otherwise it will be much safer to delete the faulty list and to set your preferences again from the "Preferences" panel.
    Regards
    Léonie

  • How do I print a frame from a video I have in iPhoto or iMovie?

    I have a video in iphoto and imovie, and I would like to send/print out one frame, as a still picture. Is this possible?

    Maybe this thread will help:
    https://discussions.apple.com/message/17451305#17451305

  • Extra a Picture frame from an iPhone Video

    I have several videos where I would like to extract a picture frame from each video and to place into a Digital Photo Frame.  I am not sure if I am making my request to the correct discussion Group, but I needed to begin somewhere.  I am using a G5 iMac desktop with OSX 10.4.11.  I am wondering if this can be done and can anyone explain how this can be accomplished?

    use iMovie or Quick Time Pro - or other video editor is you have one - that is not a feature of iPhoto
    LN

  • 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 to cut random frames in a video file

    Hi,
    I want to know how we can cut random frames in a video file using JMF? Please help!
    thanks in advance.

    Thanks for the answer, Is there any other way to do this using som plugins ot tools?

  • Can I  rip the audio from a video file?

    I have a video file with a band singing on it. I have an ipod nano, so I can't import the video with the singing onto my ipod. Is there anyway to rip the audio from the video file and put that onto my ipod?
    -Thanks

    Open the video in Quicktime Player.
    Select the Export menu item.
    Change the Export type to "Sound to Wave".
    Save the WAV file somewhere with the default settings.
    Load the WAV file into iTunes and use iTunes to convert it to AAC for the Nano.

  • I created an album in iPhoto and every time I click on slideshow it plays the pictures backwards from the order in the album. How do I change that?

    I created an album in iPhoto and every time I click on slideshow it plays the pictures backwards from the order in the album. How do I change that?

    When running a slideshow from an album it will not run properly if the photos are sorted manually.  Sort them by any of the other options, title, date, rating, etc. and it will play correctly.
    Send a report of the problem to Apple via http://www.apple.com/feedback/iphoto.html.
    If you must sort them manually create the slideshow in the slideshow mode in iPhoto, not from an album.
    OT

Maybe you are looking for

  • After Upgrade to os 10.6.8 Prints from CS4 Photoshop show blue tint outside the printing area

    After Upgrade to os 10.6.8 from 10.5.8 Prints from CS4 and 5.5 Photoshop show blue tint outside the printing area, not so when printing from CS2. I could not beleive this was still an issue. Is there any known solution to this long ongoing and well k

  • Hp g6-2034tx Drivers for windows 7 32-bit

    Hi everybody! Today i have formatted my Notebook and changed the OPERATING SYSTEM to Windows 7 (32-Bit) (Ultimate) Need basic drivers for the my HP Pavilion g6-2034tx Notebook for the following devices, currently being Yellow Highlighted by the Devic

  • Acrobat Pro 8 crashing when trying to combine multiple PDFs

    I'm using Adobe Acrobat Pro 8.1.6. I have a folder with 17 PDF files in it. I highlight them all, right-click and click "combine supported files in Acrobat..." The wizard comes up. I click "next" and then "create" and it starts combining but during t

  • You have not maintained a rule for the fiscal year variant

    1) I have Fiscal Year Variant in the Cube ( it got added along with fiscal year ) but there is no Fiscal year variant in the datasource & when I dont map it Transformation activation prompts error " You have not maintained a rule for the fiscal year

  • Population in MS Word

    I have two forms. From form1 i am passing the parameters on form2 i want to display those parameters in word file based on some conditions. How can i do that?