But the example throws an exception and I don't know how to solve it:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Record frame BufferedImage@59ec2012: type = 5 ColorModel: #pixelBits = 24 numComponents = 3 color space = java.awt.color.ICC_ColorSpace@3c0f93f1 transparency = 1 has alpha = false isAlphaPre = false ByteInterleavedRaster: width = 640 height = 360 #numDataElements 3 dataOff[0] = 2
Exception in thread "main" java.lang.IllegalArgumentException: output frame height does not match expected value
at io.humble.video.VideoJNI.MediaPictureResampler_resample(Native Method)
at io.humble.video.MediaPictureResampler.resample(MediaPictureResampler.java:202)
at io.humble.video.awt.AMediaPictureConverter.resample(AMediaPictureConverter.java:204)
at io.humble.video.awt.BgrConverter.toPicture(BgrConverter.java:152)
at main.java.RecordVideoFromWebcam.recordScreen(RecordVideoFromWebcam.java:138)
at main.java.RecordVideoFromWebcam.main(RecordVideoFromWebcam.java:180)
I'm trying to compile this example:
https://github.com/sarxos/webcam-capture/blob/master/webcam-capture-examples/webcam-capture-video-recording-humble/src/main/java/RecordAndEncodeVideo.java
I added both maven dependencies:
But the example throws an exception and I don't know how to solve it:
Platform: Windows Java SDK: 12