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

FFmpegFrameRecorder - Could not initialize class org.bytedeco.javacpp.avutil #429

Closed
guylevin opened this issue Jun 5, 2016 · 4 comments

Comments

@guylevin
Copy link

guylevin commented Jun 5, 2016

Hello,
I get Could not initialize class org.bytedeco.javacpp.avutil when when trying to use FFmpegFrameRecorder

I've looked everywhere and tried the solutions found on this form, couldn't make it work

Will be grateful if somebody has an answer

Using Windows + Eclipse + Maven
JavaCV - Version 1.2

This line throws the exception:
FFmpegFrameRecorder ffr = new FFmpegFrameRecorder("stream_url...",0);

And this is the stack:

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.javacpp.avutil
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.bytedeco.javacpp.Loader.load(Loader.java:464)
    at org.bytedeco.javacpp.Loader.load(Loader.java:409)
    at org.bytedeco.javacpp.avcodec$AVPacket.<clinit>(avcodec.java:1559)
    at org.bytedeco.javacv.FFmpegFrameRecorder.<init>(FFmpegFrameRecorder.java:149)
    at org.bytedeco.javacv.FFmpegFrameRecorder.<init>(FFmpegFrameRecorder.java:120)
    at com.airobotics.aaaaaa.App.main(App.java:20)
Error putting member offsets for class org/bytedeco/javacpp/avutil$Pool_free_Pointer.

The pom looks like this:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.airobotics.common</groupId>
    <artifactId>aaaaaa</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>aaaaaa</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>


        <dependency>
            <groupId>org.bytedeco</groupId>
            <artifactId>javacv</artifactId>
            <version>1.2</version>
        </dependency>

        <dependency>
            <groupId>org.bytedeco.javacpp-presets</groupId>
            <artifactId>ffmpeg</artifactId>
            <version>3.0.2-1.2</version>
        </dependency>

        <dependency>
            <groupId>org.bytedeco.javacpp-presets</groupId>
            <artifactId>opencv</artifactId>
            <version>3.1.0-1.2</version>
        </dependency>

        <dependency>
            <groupId>org.bytedeco</groupId>
            <artifactId>javacpp</artifactId>
            <version>1.2</version>
        </dependency>


    </dependencies>
</project>
@guylevin
Copy link
Author

guylevin commented Jun 5, 2016

After a day spent around this, I moved to version 1.1 and everything seems to work fine.

@saudet
Copy link
Member

saudet commented Jun 6, 2016

Duplicate of bytedeco/javacpp-presets#225

@springCoders
Copy link

@skykuns
Copy link

skykuns commented May 14, 2021

After a day spent around this, I moved to version 1.1 and everything seems to work fine.

It is works , thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants