Class XuggleVideoRecorder

java.lang.Object
org.opensourcephysics.media.core.ScratchVideoRecorder
org.opensourcephysics.media.xuggle.XuggleVideoRecorder
All Implemented Interfaces:
VideoRecorder

public class XuggleVideoRecorder extends ScratchVideoRecorder
A class to record videos using the Xuggle video engine.
  • Constructor Details

    • XuggleVideoRecorder

      public XuggleVideoRecorder(MovieVideoType type)
      Constructs a XuggleVideoRecorder object.
      Parameters:
      type - the video type
  • Method Details

    • reset

      public void reset()
      Discards the current video and resets the recorder to a ready state.
      Specified by:
      reset in interface VideoRecorder
      Overrides:
      reset in class ScratchVideoRecorder
    • finalize

      protected void finalize()
      Called by the garbage collector when this recorder is no longer in use.
      Overrides:
      finalize in class ScratchVideoRecorder
    • append

      protected boolean append(Image image)
      Appends a frame to the current video by saving the image in a tempFile.
      Specified by:
      append in class ScratchVideoRecorder
      Parameters:
      image - the image to append
      Returns:
      true if image successfully saved
    • saveScratch

      protected void saveScratch() throws IOException
      Saves the video to the current scratchFile.
      Specified by:
      saveScratch in class ScratchVideoRecorder
      Throws:
      IOException
    • startRecording

      protected boolean startRecording()
      Starts the video recording process.
      Specified by:
      startRecording in class ScratchVideoRecorder
      Returns:
      true if video recording successfully started
    • getSupportedCodecs

      public static void getSupportedCodecs(String name)
      Given the short name of a container, prints out information about it, including which codecs Xuggler can write (mux) into that container.
      Parameters:
      name - the short name of the format (e.g. "flv")
    • getCodec

      public String getCodec()