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

Video is green color using avutil.AV_PIX_FMT_NV21 format #42

Open
ritesh94 opened this issue Jan 29, 2018 · 5 comments
Open

Video is green color using avutil.AV_PIX_FMT_NV21 format #42

ritesh94 opened this issue Jan 29, 2018 · 5 comments
Labels

Comments

@ritesh94
Copy link

setting the pixel format:

    FFmpegFrameFilter frameFilter = new FFmpegFrameFilter(TextUtils.join(",", filters),
                    previewWidth, previewHeight);
            frameFilter.setPixelFormat(AV_PIX_FMT_NV21);
mFrameRecorder.record(filteredFrame);

build.gradle

ext {
    versions = [
            'ffmpeg': '3.4.1-1.4'
    ]
}

    compile(group: 'org.bytedeco', name: 'javacv-platform', version: '1.4') {
        exclude group: 'org.bytedeco.javacpp-presets'
    }

    compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: versions.ffmpeg
    compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: versions.ffmpeg, classifier: 'android-arm'

Tried the following too, but no luck:
1.

 mFrameRecorder.setPixelFormat(avutil.AV_PIX_FMT_NV21);
FFmpegFrameFilter frameFilter = new FFmpegFrameFilter(TextUtils.join(",", filters),
                    previewWidth, previewHeight);
            frameFilter.setPixelFormat(AV_PIX_FMT_NV21);
mFrameRecorder.record(filteredFrame);

2.

mFrameRecorder.setPixelFormat(avutil.AV_PIX_FMT_NV21);
FFmpegFrameFilter frameFilter = new FFmpegFrameFilter(TextUtils.join(",", filters),
                    previewWidth, previewHeight);
            frameFilter.setPixelFormat(AV_PIX_FMT_NV21);
mFrameRecorder.record(filteredFrame,AV_PIX_FMT_NV21);

 mFrameRecorder.record(filteredFrame,avutil.AV_PIX_FMT_NV21);
@CrazyOrr CrazyOrr added the bug label Feb 13, 2018
@CrazyOrr
Copy link
Owner

Confirmed this bug.
You can use ffmpeg 3.2.1-1.3 with javacv 1.3 for the moment.

@ritesh94
Copy link
Author

@CrazyOrr Using the above version with other Gradle dependencies give me an Unsatisfied link error

Caused by: java.lang.UnsatisfiedLinkError: org.bytedeco.javacpp.avutil

@CrazyOrr
Copy link
Owner

CrazyOrr commented May 3, 2018

Try this.

@CrazyOrr
Copy link
Owner

Try the latest version of JavaCV and ffmpeg, with 64-bit support, has this issue fixed already:

dependencies {
    ...
    def javacvVersion = '1.4.2'
    def ffmpegVersion = '4.0.1'
    compile(group: 'org.bytedeco', name: 'javacv-platform', version: javacvVersion) {
        exclude group: 'org.bytedeco.javacpp-presets'
    }
    compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: "${ffmpegVersion}-${javacvVersion}"
    compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: "${ffmpegVersion}-${javacvVersion}", classifier: 'android-arm' // for 'armeabi-v7a'
    compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: "${ffmpegVersion}-${javacvVersion}", classifier: 'android-arm64' // for 'arm64-v8a'
}

@abhijithrkrishna
Copy link

Tried the latest version of JavaCV and ffmpeg, with 64-bit support, But problem remaining.

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

No branches or pull requests

3 participants