×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    112

    Getting the first frame of a video file possible?

    Hello, I'm trying to get a thumbnail for video files. Is there an easy way to get the first frame of a video file (3gpp/mp4) that is stored to the phones memory? I mean, is MMAPI capable of getting it or is the only way to start figuring out the different formats, read the raw data and get it that way? Thanks.

  2. #2
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    112

    Re: Getting the first frame of a video file possible?

    Okay, seems like no one has answers to this one. It is looking like a real hassle to implement. Any help would be appreciated! This is what I have tried:

    While video is playing, taking a snapshot of it,

    byte[] imageArray = vc.getSnapshot(null);
    System.out.println("Data length: " + imageArray.length);

    .. but it always returns only 69 bytes (which I'm guessing is the header).

    Has anyone been able to take a snapshot out of a playing clip instead of camera recording?

    The other option of doing it in the low level seems like it would take forever to implement, so I'm really hoping there would be at least some kind of workaround out there!

  3. #3
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    112

    Re: Getting the first frame of a video file possible?

    Okay, I found a similar example from WTK's examples and I tried it on the phones (E70 and E90). It doesn't work. Is this Nokia related "feature" or has someone been able to get this to work on a phone? I mean, taking a snapshot of a playing video with VideoControls getSnapshot.

    Here's the code:

    new Thread() {
    public void run() {
    try {
    byte [] snap = vc.getSnapshot("encoding=jpeg");
    if (snap != null) {
    Image im = Image.createImage(snap, 0, snap.length);
    Alert al = new Alert("Snapshot",
    "Here's the snap",
    im,
    AlertType.INFO);
    al.setTimeout(2000);
    vt.setAlert(al);
    }
    } catch (MediaException me) {
    System.err.println(me);
    }
    }
    }.start();

Similar Threads

  1. Help on Scale video frame
    By binli120 in forum Symbian Media (Closed)
    Replies: 6
    Last Post: 2006-11-10, 21:52
  2. S60 theme questions
    By Nokian_Spb in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2006-08-17, 06:11
  3. Unable To Play a Video File In symbian 9.1 device
    By mailkamlesh in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2006-08-14, 18:06
  4. Frame per second up to 15 for Video
    By martinyang in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2006-07-10, 19:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×