Skip to content

PixelFormat invalid #8

@elieserdejesus

Description

@elieserdejesus

Hi Daniel, your work with Juce and FFmpeg are amazing.

I'm testing your video engine and the VideoPlayer example play the audio (from a mp4 video) but the video frames are black (no video).

I changed the scaler output pixel format from AV_PIX_FMT_BGR0 to AV_PIX_FMT_RGB32 and the video is playing perfectly:

https://github.com/ffAudio/foleys_video_engine/blob/master/ReadWrite/FFmpeg/foleys_FFmpegReader.cpp#L87

I changed

scaler.setupScaler (videoContext->width,
                                videoContext->height,
                                videoContext->pix_fmt,
                                videoContext->width,
                                videoContext->height,
                                AV_PIX_FMT_BGR0);

to

scaler.setupScaler (videoContext->width,
                                videoContext->height,
                                videoContext->pix_fmt,
                                videoContext->width,
                                videoContext->height,
                                AV_PIX_FMT_RGB32);

I see AV_PIX_FMT_BGR0 is CUDA accelerated, right?

I'm testing in Windows 10, compiling in MSVC 2017 and running in a laptop with a builtin nvidia graphic card. I suppose CUDA is not working in my side.

I'm compiling with FFmpeg 4.2.2.

You think is possible adjust the scaler output pixel format to match user machine?

Thanks for your time, I really enjoy your work as a developer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions