1

I am using MonteScreenRecorder jar for record screen. I was successfully record my test execution for cucumber selenium. As well i can see the avi files have been generated after execution. but while i am playing them, i can see only the black screen nothing else.

FYI, i have generated screenshots for each step which is very useful regardless my tests are passing or failing. However, still i want to generate video records purposely.

I think my video format is corrupted or encoded for some reason. Need help to fix or decode this. here is the avi code below:

public void startRecording() throws Exception
{
GraphicsConfiguration gc = GraphicsEnvironment
    .getLocalGraphicsEnvironment()
    .getDefaultScreenDevice()
    .getDefaultConfiguration();

this.screenRecorder = new ScreenRecorder(gc,
    new Format(MediaTypeKey, MediaType.FILE, MimeTypeKey, MIME_AVI),
    new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,
        CompressorNameKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,
        DepthKey, 24, FrameRateKey, Rational.valueOf(15),
        QualityKey, 1.0f,
        KeyFrameIntervalKey, 15 * 60),
    new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey, "black",
        FrameRateKey, Rational.valueOf(30)),
    null);

this.screenRecorder.start();
}
ASM
  • 709
  • 2
  • 8
  • 27

1 Answers1

0

Code Snippet:

 EncodingKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE
 CompressorNameKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE

You need to install TSCC Codec on the machine where you are running the Test Cases from https://www.techsmith.com/codecs.html

Atul KS
  • 908
  • 11
  • 21