LearningVideo icon indicating copy to clipboard operation
LearningVideo copied to clipboard

最后一节的FFmpeg 视频编码问题

Open FrankyLee-dev opened this issue 1 year ago • 1 comments

这里打印无法打开encoder的log

void BaseEncoder::OpenEncoder() {
    InitContext(m_codec_ctx);

    int ret = avcodec_open2(m_codec_ctx, m_codec, NULL);
    if (ret < 0) {
        LOG_ERROR(TAG, LogSpec(), "Fail to open encoder : %d", m_codec);
        return;
    }

    m_encode_stream_index = ConfigureMuxerStream(m_muxer, m_codec_ctx);
}

log如下:

BaseEncoder: [视频] Fail to open encoder : -2137540360
BaseEncoder: [音频] Send frame error[EINVAL]: Invalid argument
BaseEncoder: [视频] Send frame error[EINVAL]: Invalid argument
BaseEncoder: [视频] Encode error[EINVAL]: Invalid argument

请问这个错误怎么解决呢?

FrankyLee-dev avatar Jul 22 '22 06:07 FrankyLee-dev

这是来自连泽全QQ邮箱的自动回复邮件。您好,您的邮件我已经收到。连泽全

LianJ333 avatar Jul 22 '22 06:07 LianJ333

这是来自连泽全QQ邮箱的自动回复邮件。您好,您的邮件我已经收到。连泽全

LianJ333 avatar Feb 19 '24 06:02 LianJ333

您的来信我已收到,谢谢!

ChenLittlePing avatar Feb 19 '24 06:02 ChenLittlePing