Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to record a video from webcam. Unexpected exception from a given example #147

Open
Virgula0 opened this issue Jan 12, 2021 · 0 comments

Comments

@Virgula0
Copy link

Virgula0 commented Jan 12, 2021

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:

        <dependency>
            <groupId>com.github.sarxos</groupId>
            <artifactId>webcam-capture</artifactId>
            <version>0.3.12</version>
        </dependency>
        <dependency>
            <groupId>io.humble</groupId>
            <artifactId>humble-video-all</artifactId>
            <version>0.3.0</version>
        </dependency>

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)

Platform: Windows
Java SDK: 12

@Virgula0 Virgula0 changed the title Trying to record a video from webcam. Unexpected exception from given example Trying to record a video from webcam. Unexpected exception from a given example Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant