Results 1 to 4 of 4
  1. #1
    noname90 is offline Member
    Join Date
    Sep 2012
    Posts
    3
    Rep Power
    0

    Default Play video from images

    Hi all,

    I have frames extracted from a video.

    Now, I am writing an application that can play video from those frames. But, the problem is that the video in my application is not smooth, and blinks too much although I used multiple buffers.

    Could you tell me any solution for this problem?

    Thank you very much.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,234
    Rep Power
    19

    Default Re: Play video from images

    Without seeing any code we'd be merely guessing. Is it possible to reduce the troublesome part to a SSCCE (Short, Self Contained, Correct (Compilable), Example) that demonstrates the problem?

    Before you post any code please go through these links:
    Guide For New Members
    BB Code List - Java Programming Forum

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    noname90 is offline Member
    Join Date
    Sep 2012
    Posts
    3
    Rep Power
    0

    Default Re: Play video from images

    I'm so sorry for my unclear question.

    I use a canvas to render my frames

    class CanvasScreen extends Canvas
    {
    .......public CanvasScreen (Container _parent)
    .......{
    .............._parent.add(this);
    ..............this.createBufferStrategy(2);
    .......}

    .......public void paint(Graphics gr)
    .......{
    ..............super.paint(gr);
    ..............if (img != null)
    ..............{
    .....................Graphics2D gr2D = (Graphics2D)gr;
    .....................gr2D.drawImage(img, 0, 0, this);

    ..............}
    .......}

    .......public void changeFrame (BufferedImage _newImg)
    .......{
    ..............img = _newImg;
    ..............this.repaint();
    .......}
    }

    And I use a timer to change frame of the CanvasScreen 25 times per second

    If you need further information, please feel free to tell me.

    Thank you in advance.

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,234
    Rep Power
    19

    Default Re: Play video from images

    If you can't be bothered to go through the pages I linked, do you really think anyone here will take the trouble to try and help?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Play A Video in JFrame
    By Godslug in forum AWT / Swing
    Replies: 1
    Last Post: 03-26-2012, 12:25 PM
  2. how to play a video from a file using jmf in a java
    By 200808147 in forum New To Java
    Replies: 0
    Last Post: 07-10-2011, 12:20 PM
  3. Class to play variety of video formats
    By Swankee in forum New To Java
    Replies: 0
    Last Post: 10-12-2009, 08:38 PM
  4. How to play video files in Java
    By Hasan in forum Advanced Java
    Replies: 11
    Last Post: 04-26-2009, 11:57 PM
  5. code to play Video from server
    By arvind in forum CLDC and MIDP
    Replies: 0
    Last Post: 04-15-2009, 09:19 AM

Posting Permissions

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