Package com.xuggle.mediatool

Examples of com.xuggle.mediatool.IMediaWriter.encodeVideo()


                timer = new Timer();
                timer.schedule(new TestTimeoutTask(), TimeUnit.SECONDS.toMillis(configuration.getTestTimeout()));

                while (running) {
                    BufferedImage bgrScreen = convertToType(getDesktopScreenshot(), BufferedImage.TYPE_3BYTE_BGR);
                    writer.encodeVideo(0, bgrScreen, System.nanoTime() - startTime, TimeUnit.NANOSECONDS);

                    try {
                        Thread.sleep(500 / frameRate);
                    } catch (InterruptedException ex) {
                        logger.error("Exception occured during video recording", ex);
View Full Code Here


                    BufferedImage screen = getDesktopScreenshot();

                    BufferedImage bgrScreen = convertToType(screen,
                            BufferedImage.TYPE_3BYTE_BGR);

                    writer.encodeVideo(0, bgrScreen, System.nanoTime() - startTime,
                            TimeUnit.NANOSECONDS);
                    try {
                        Thread.sleep((long) (1000 / FRAME_RATE));
                    } catch (InterruptedException ex) {
                        logger.error("Exception occured during video recording", ex);
View Full Code Here

      // get and encode the next video frame

      while (clock >= nextFrameTime)
      {
        BufferedImage frame = balls.getVideoFrame(frameRate);
        writer.encodeVideo(videoStreamIndex, frame, nextFrameTime,
          DEFAULT_TIME_UNIT);
        nextFrameTime += frameRate;
      }

      // compute and encode the audio for the balls
View Full Code Here

        // convert to the right image type
        BufferedImage bgrScreen = convertToType(screen,
            BufferedImage.TYPE_3BYTE_BGR);
       
        // encode the image
        writer.encodeVideo(0,bgrScreen,
            System.nanoTime()-startTime, TimeUnit.NANOSECONDS);

        System.out.println("encoded image: " +index);
       
        // sleep for framerate milliseconds
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.