h4tr3d / avcpp

C++ wrapper for FFmpeg
Other
429 stars 78 forks source link

About GPU decoding and encoding #132

Closed mojie126 closed 2 months ago

mojie126 commented 3 months ago

https://github.com/h4tr3d/avcpp/issues/99 According to the description in this issue, the device supports cuda, and cuda is also used during encoding and decoding, but it fails. cuda code

#include <iostream>
#include <set>
#include <map>
#include <memory>
#include <functional>

#include "../include/avcpp/av.h"
#include "../include/avcpp/ffmpeg.h"
#include "../include/avcpp/codec.h"
#include "../include/avcpp/packet.h"
#include "../include/avcpp/videorescaler.h"
#include "../include/avcpp/audioresampler.h"
#include "../include/avcpp/avutils.h"

// API2
#include "../include/avcpp/format.h"
#include "../include/avcpp/formatcontext.h"
#include "../include/avcpp/codec.h"
#include "../include/avcpp/codeccontext.h"

using namespace std;
using namespace av;

// 检测CUDA是否可用
bool isCudaAvailable() {
    AVHWDeviceType type = av_hwdevice_find_type_by_name("cuda");
    return type != AV_HWDEVICE_TYPE_NONE;
}

// 检测QSV是否可用
bool isQsvAvailable() {
    AVHWDeviceType type = av_hwdevice_find_type_by_name("qsv");
    return type != AV_HWDEVICE_TYPE_NONE;
}

// 获取编码器
const AVCodec *getEncoder(bool use_cuda, bool use_qsv) {
    if (use_cuda) {
        const AVCodec *cuda_encoder = avcodec_find_encoder_by_name("h264_nvenc");
        if (cuda_encoder)
            return cuda_encoder;
    }
    if (use_qsv) {
        const AVCodec *qsv_encoder = avcodec_find_encoder_by_name("h264_qsv");
        if (qsv_encoder)
            return qsv_encoder;
    }
    return avcodec_find_encoder_by_name("libx264"); // 使用软编码器
}

// 获取硬件上下文类型
AVHWDeviceType getHwDeviceType(bool use_cuda, bool use_qsv) {
    if (use_cuda)
        return av_hwdevice_find_type_by_name("cuda");
    if (use_qsv)
        return av_hwdevice_find_type_by_name("qsv");
    return AV_HWDEVICE_TYPE_NONE;
}

int main(int argc, char **argv) {
    if (argc < 3)
        return 1;

    av::init();
    av::setFFmpegLoggingLevel(AV_LOG_DEBUG);

    string uri{argv[1]};
    string out{argv[2]};

    error_code ec;

    //
    // INPUT
    //
    FormatContext ictx;
    ssize_t videoStream = -1;
    // VideoDecoderContext vdec;
    Stream vst;

    int count = 0;

    ictx.openInput(uri, ec);
    if (ec) {
        cerr << "Can't open input\n";
        return 1;
    }

    ictx.findStreamInfo();

    for (size_t i = 0; i < ictx.streamsCount(); ++i) {
        auto st = ictx.stream(i);
        if (st.mediaType() == AVMEDIA_TYPE_VIDEO) {
            videoStream = i;
            vst = st;
            break;
        }
    }
    bool use_cuda = isCudaAvailable();
    bool use_qsv = isQsvAvailable();
    // 获取编码器和硬件上下文类型
    const AVCodec *_encoder = getEncoder(use_cuda, use_qsv);
    AVHWDeviceType hw_type = getHwDeviceType(use_cuda, use_qsv);
    clog << "test hw: " << av_hwdevice_get_type_name(hw_type) << endl;

    if (vst.isNull()) {
        cerr << "Video stream not found\n";
        return 1;
    }
    av::VideoDecoderContext vdec(vst, av::findDecodingCodec("h264_cuvid"));
    clog << "decoder: " << av::findDecodingCodec("h264_cuvid").longName() << endl;

    if (vst.isValid()) {
        vdec = VideoDecoderContext(vst);
        vdec.setRefCountedFrames(true);

        vdec.open(Codec(), ec);
        if (ec) {
            cerr << "Can't open codec\n";
            return 1;
        }
    }

    //
    // OUTPUT
    //
    OutputFormat ofrmt;
    FormatContext octx;

    ofrmt.setFormat(string(), out);
    octx.setFormat(ofrmt);

    Codec ocodec = findEncodingCodec(ofrmt);
    ocodec.reset(_encoder);
    clog << "can encode: " << ocodec.canEncode() << endl;

    VideoEncoderContext encoder{ocodec};

    // Settings
    encoder.setWidth(vdec.width());
    encoder.setHeight(vdec.height());
    if (vdec.pixelFormat() > -1)
        encoder.setPixelFormat(vdec.pixelFormat());
    encoder.setTimeBase(Rational{1, 1000});
    encoder.setBitRate(vdec.bitRate());

    encoder.open(Codec(), ec);
    if (ec) {
        cerr << "Can't opent encodec\n";
        return 1;
    }

    Stream ost = octx.addStream(encoder);
    ost.setFrameRate(vst.frameRate());

    octx.openOutput(out, ec);
    if (ec) {
        cerr << "Can't open output\n";
        return 1;
    }

    octx.dump();
    octx.writeHeader();
    octx.flush();

    //
    // PROCESS
    //
    while (true) {
        // READING
        Packet pkt = ictx.readPacket(ec);
        if (ec) {
            clog << "Packet reading error: " << ec << ", " << ec.message() << endl;
            break;
        }

        bool flushDecoder = false;
        // !EOF
        if (pkt) {
            if (pkt.streamIndex() != videoStream) {
                continue;
            }

            clog << "Read packet: pts=" << pkt.pts() << ", dts=" << pkt.dts() << " / " << pkt.pts().seconds() << " / " << pkt.timeBase() << " / st: " << pkt.streamIndex() << endl;
        } else {
            flushDecoder = true;
        }

        do {
            // DECODING
            auto frame = vdec.decode(pkt, ec);

            count++;
            //if (count > 200)
            //    break;

            bool flushEncoder = false;

            if (ec) {
                cerr << "Decoding error: " << ec << endl;
                return 1;
            } else if (!frame) {
                //cerr << "Empty frame\n";
                //flushDecoder = false;
                //continue;

                if (flushDecoder) {
                    flushEncoder = true;
                }
            }

            if (frame) {
                clog << "Frame: pts=" << frame.pts() << " / " << frame.pts().seconds() << " / " << frame.timeBase() << ", " << frame.width() << "x" << frame.height() << ", size=" << frame.size() << ", ref=" << frame.isReferenced() << ":" << frame.refCount() << " / type: " << frame.pictureType() << endl;

                // Change timebase
                frame.setTimeBase(encoder.timeBase());
                frame.setStreamIndex(0);
                frame.setPictureType();

                clog << "Frame: pts=" << frame.pts() << " / " << frame.pts().seconds() << " / " << frame.timeBase() << ", " << frame.width() << "x" << frame.height() << ", size=" << frame.size() << ", ref=" << frame.isReferenced() << ":" << frame.refCount() << " / type: " << frame.pictureType() << endl;
            }

            if (frame || flushEncoder) {
                do {
                    // Encode
                    Packet opkt = frame ? encoder.encode(frame, ec) : encoder.encode(ec);
                    if (ec) {
                        cerr << "Encoding error: " << ec << endl;
                        return 1;
                    } else if (!opkt) {
                        //cerr << "Empty packet\n";
                        //continue;
                        break;
                    }

                    // Only one output stream
                    opkt.setStreamIndex(0);

                    clog << "Write packet: pts=" << opkt.pts() << ", dts=" << opkt.dts() << " / " << opkt.pts().seconds() << " / " << opkt.timeBase() << " / st: " << opkt.streamIndex() << endl;

                    octx.writePacket(opkt, ec);
                    if (ec) {
                        cerr << "Error write packet: " << ec << ", " << ec.message() << endl;
                        return 1;
                    }
                } while (flushEncoder);
            }

            if (flushEncoder)
                break;
        } while (flushDecoder);

        if (flushDecoder)
            break;
    }

    octx.writeTrailer();
}

log

D:\CLionProjects\AssRocket\hwFFmpeg.exe mod/222.mp4 mod/333.mp4
[AVFormatContext @ 0000000000645340] Opening 'mod/222.mp4' for reading
[file @ 0000000000646780] Setting default whitelist 'file,crypto,data'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000645340] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000645340] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000645340] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000645340] Processing st: 0, edit list 0 - media time: 1024, duration: 2999296
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000645340] Offset DTS by 1024 to make first pts zero.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000645340] Setting codecpar->delay to 2 for stream st: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000645340] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000645340] Processing st: 1, edit list 0 - media time: 1024, duration: 10332145
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000645340] drop a frame at curr_cts: 0 @ 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000645340] Before avformat_find_stream_info() pos: 110126 bytes read:131072 seeks:0 nb_streams:2
[h264 @ 0000000000647a00] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0000000000647a00] Decoding VUI
[h264 @ 0000000000647a00] nal_unit_type: 8(PPS), nal_ref_idc: 3
For transform of length 64, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 32, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 2 matches:
    1: fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 512
    2: fft32_asm_float_avx - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 64, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 64, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 32, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 2 matches:
    1: fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 512
    2: fft32_asm_float_avx - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 64, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 120, inverse, mdct_float, flags: [aligned, out_of_place], found 6 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_pfa_15xM_inv_float_c - type: mdct_float, len: [30, ∞], factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only], prio: 304
    3: mdct_pfa_5xM_inv_float_c - type: mdct_float, len: [10, ∞], factors[2]: [5, any], flags: [unaligned, out_of_place, inv_only], prio: 144
    4: mdct_pfa_3xM_inv_float_c - type: mdct_float, len: [6, ∞], factors[2]: [3, any], flags: [unaligned, out_of_place, inv_only], prio: 112
    5: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    6: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 60, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 1 matches:
    1: fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: [60, ∞], factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 688
For transform of length 4, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 1 matches:
    1: fft4_fwd_asm_float_sse2 - type: fft_float, len: 4, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 352
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 120, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: 60, factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call]
            fft4_fwd_asm_float_sse2 - type: fft_float, len: 4, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 128, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 64, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 3 matches:
    1: fft_sr_asm_float_avx2 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
    2: fft_sr_asm_float_fma3 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 448
    3: fft_sr_asm_float_avx - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 416
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 128, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_sr_asm_float_avx2 - type: fft_float, len: 64, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 480, inverse, mdct_float, flags: [aligned, out_of_place], found 6 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_pfa_15xM_inv_float_c - type: mdct_float, len: [30, ∞], factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only], prio: 304
    3: mdct_pfa_5xM_inv_float_c - type: mdct_float, len: [10, ∞], factors[2]: [5, any], flags: [unaligned, out_of_place, inv_only], prio: 144
    4: mdct_pfa_3xM_inv_float_c - type: mdct_float, len: [6, ∞], factors[2]: [3, any], flags: [unaligned, out_of_place, inv_only], prio: 112
    5: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    6: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 240, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 1 matches:
    1: fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: [60, ∞], factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 688
For transform of length 16, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 2 matches:
    1: fft16_asm_float_fma3 - type: fft_float, len: 16, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 512
    2: fft16_asm_float_avx - type: fft_float, len: 16, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 480, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: 240, factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call]
            fft16_asm_float_fma3 - type: fft_float, len: 16, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 512, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 256, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 3 matches:
    1: fft_sr_asm_float_avx2 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
    2: fft_sr_asm_float_fma3 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 448
    3: fft_sr_asm_float_avx - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 416
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 512, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_sr_asm_float_avx2 - type: fft_float, len: 256, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 960, inverse, mdct_float, flags: [aligned, out_of_place], found 6 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_pfa_15xM_inv_float_c - type: mdct_float, len: [30, ∞], factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only], prio: 304
    3: mdct_pfa_5xM_inv_float_c - type: mdct_float, len: [10, ∞], factors[2]: [5, any], flags: [unaligned, out_of_place, inv_only], prio: 144
    4: mdct_pfa_3xM_inv_float_c - type: mdct_float, len: [6, ∞], factors[2]: [3, any], flags: [unaligned, out_of_place, inv_only], prio: 112
    5: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    6: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 480, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 1 matches:
    1: fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: [60, ∞], factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 688
For transform of length 32, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 2 matches:
    1: fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 512
    2: fft32_asm_float_avx - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 960, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: 480, factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call]
            fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 1024, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 512, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 3 matches:
    1: fft_sr_asm_float_avx2 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
    2: fft_sr_asm_float_fma3 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 448
    3: fft_sr_asm_float_avx - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 416
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 1024, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_sr_asm_float_avx2 - type: fft_float, len: 512, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 1024, forward, mdct_float, flags: [aligned, out_of_place], found 2 matches:
    1: mdct_fwd_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, fwd_only], prio: 96
    2: mdct_naive_fwd_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, fwd_only], prio: -130976
For transform of length 512, forward, fft_float, flags: [aligned, inplace, preshuf], found 5 matches:
    1: fft_sr_ns_float_avx2 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 480
    2: fft_sr_ns_float_fma3 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 448
    3: fft_sr_ns_float_avx - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 416
    4: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    5: fft512_ns_float_c - type: fft_float, len: 512, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_fwd_float_c - type: mdct_float, len: 1024, factors[2]: [2, any], flags: [unaligned, out_of_place, fwd_only]
        fft_sr_ns_float_avx2 - type: fft_float, len: 512, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
[h264 @ 0000000000647a00] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0000000000647a00] Decoding VUI
[h264 @ 0000000000647a00] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0000000000647a00] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0000000000647a00] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0000000000647a00] Format yuv420p chosen by get_format().
[h264 @ 0000000000647a00] Reinit context to 1280x720, pix_fmt: yuv420p
[h264 @ 0000000000647a00] no picture 
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000645340] demuxer injecting skip 1024 / discard 0
[aac @ 0000000000649540] skip 1024 / discard 0 samples due to side data
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000645340] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000645340] After avformat_find_stream_info() pos: 139930 bytes read:163840 seeks:0 frames:11
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'mod/222.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Multimedia Cloud Transcode (cloud.baidu.com)
  Duration: 00:03:54.32, start: 0.000000, bitrate: 1842 kb/s
  Stream #0:0[0x1](und), 10, 1/12800: Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(tv, bt709, progressive, left), 1280x720 [SAR 1:1 DAR 16:9], 0/1, 1774 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und), 1, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
test hw: cuda
decoder: Nvidia CUVID H264 decoder
[h264 @ 000000000064a980] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 000000000064a980] Decoding VUI
[h264 @ 000000000064a980] nal_unit_type: 8(PPS), nal_ref_idc: 3
can encode: 1
[h264_nvenc @ 00000000006df7c0] Loaded lib: nvcuda.dll
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuInit
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDriverGetVersion
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDeviceGetCount
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDeviceGet
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDeviceGetAttribute
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDeviceGetName
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDeviceComputeCapability
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuCtxCreate_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuCtxGetCurrent
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuCtxSetLimit
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuCtxPushCurrent_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuCtxPopCurrent_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuCtxDestroy_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuMemAlloc_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuMemAllocPitch_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuMemAllocManaged
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuMemsetD8Async
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuMemFree_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuMemcpy
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuMemcpyAsync
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuMemcpy2D_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuMemcpy2DAsync_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuMemcpyHtoD_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuMemcpyHtoDAsync_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuMemcpyDtoH_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuMemcpyDtoHAsync_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuMemcpyDtoD_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuMemcpyDtoDAsync_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuGetErrorName
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuGetErrorString
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuCtxGetDevice
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDevicePrimaryCtxRetain
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDevicePrimaryCtxRelease
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDevicePrimaryCtxSetFlags
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDevicePrimaryCtxGetState
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDevicePrimaryCtxReset
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuStreamCreate
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuStreamQuery
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuStreamSynchronize
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuStreamDestroy_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuStreamAddCallback
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuStreamWaitEvent
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuEventCreate
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuEventDestroy_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuEventSynchronize
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuEventQuery
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuEventRecord
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuLaunchKernel
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuLinkCreate
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuLinkAddData
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuLinkComplete
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuLinkDestroy
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuModuleLoadData
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuModuleUnload
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuModuleGetFunction
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuModuleGetGlobal
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuTexObjectCreate
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuTexObjectDestroy
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuGLGetDevices_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuGraphicsGLRegisterImage
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuGraphicsUnregisterResource
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuGraphicsMapResources
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuGraphicsUnmapResources
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuGraphicsSubResourceGetMappedArray
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuGraphicsResourceGetMappedPointer_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDeviceGetUuid
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDeviceGetUuid_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDeviceGetLuid
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDeviceGetByPCIBusId
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDeviceGetPCIBusId
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuImportExternalMemory
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDestroyExternalMemory
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuExternalMemoryGetMappedBuffer
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuExternalMemoryGetMappedMipmappedArray
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuMipmappedArrayGetLevel
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuMipmappedArrayDestroy
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuImportExternalSemaphore
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuDestroyExternalSemaphore
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuSignalExternalSemaphoresAsync
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuWaitExternalSemaphoresAsync
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuArrayCreate_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuArray3DCreate_v2
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuArrayDestroy
[h264_nvenc @ 00000000006df7c0] Cannot load optional cuEGLStreamProducerConnect
[h264_nvenc @ 00000000006df7c0] Cannot load optional cuEGLStreamProducerDisconnect
[h264_nvenc @ 00000000006df7c0] Cannot load optional cuEGLStreamConsumerDisconnect
[h264_nvenc @ 00000000006df7c0] Cannot load optional cuEGLStreamProducerPresentFrame
[h264_nvenc @ 00000000006df7c0] Cannot load optional cuEGLStreamProducerReturnFrame
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuD3D11GetDevice
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuD3D11GetDevices
[h264_nvenc @ 00000000006df7c0] Loaded sym: cuGraphicsD3D11RegisterResource
[h264_nvenc @ 00000000006df7c0] Loaded lib: nvEncodeAPI64.dll
[h264_nvenc @ 00000000006df7c0] Loaded sym: NvEncodeAPICreateInstance
[h264_nvenc @ 00000000006df7c0] Loaded sym: NvEncodeAPIGetMaxSupportedVersion
[h264_nvenc @ 00000000006df7c0] Loaded Nvenc version 12.2
[h264_nvenc @ 00000000006df7c0] Nvenc initialized successfully
[h264_nvenc @ 00000000006df7c0] 1 CUDA capable devices found
[h264_nvenc @ 00000000006df7c0] [ GPU #0 - < NVIDIA GeForce RTX 4060 Laptop GPU > has Compute SM 8.9 ]
[h264_nvenc @ 00000000006df7c0] supports NVENC
[file @ 00000000006e27c0] Setting default whitelist 'file,crypto,data'
Output #0, mp4, to 'mod/333.mp4':
  Stream #0:0, 0, 0/0: Video: h264 (Main), 1 reference frame, yuv420p, 1280x720 (0x0), 0/1, q=2-31, 1774 kb/s, 25 tbr
    Side data:
      cpb: bitrate max/min/avg: 0/0/1774942 buffer size: 3549884 vbv_delay: N/A
Read packet: pts=0*1/12800, dts=-1024*1/12800 / 0 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 000000000064a980] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 000000000064a980] Format yuv420p chosen by get_format().
[h264 @ 000000000064a980] Reinit context to 1280x720, pix_fmt: yuv420p
[h264 @ 000000000064a980] no picture 
Read packet: pts=512*1/12800, dts=-512*1/12800 / 0.04 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
[h264 @ 000000000064a980] no picture 
Read packet: pts=1024*1/12800, dts=0*1/12800 / 0.08 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
Frame: pts=0*1/12800 / 0 / 1/12800, 1280x720, size=1417197, ref=1:2 / type: 1
Frame: pts=0*1/1000 / 0 / 1/1000, 1280x720, size=1417197, ref=1:2 / type: 0
Read packet: pts=3584*1/12800, dts=512*1/12800 / 0.28 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
Frame: pts=512*1/12800 / 0.04 / 1/12800, 1280x720, size=1417197, ref=1:2 / type: 1
Frame: pts=40*1/1000 / 0.04 / 1/1000, 1280x720, size=1417197, ref=1:2 / type: 0
Read packet: pts=2048*1/12800, dts=1024*1/12800 / 0.16 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
Frame: pts=1024*1/12800 / 0.08 / 1/12800, 1280x720, size=1417197, ref=1:2 / type: 1
Frame: pts=80*1/1000 / 0.08 / 1/1000, 1280x720, size=1417197, ref=1:2 / type: 0
Read packet: pts=1536*1/12800, dts=1536*1/12800 / 0.12 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
Frame: pts=1536*1/12800 / 0.12 / 1/12800, 1280x720, size=1417197, ref=1:3 / type: 1
Frame: pts=120*1/1000 / 0.12 / 1/1000, 1280x720, size=1417197, ref=1:3 / type: 0
Read packet: pts=2560*1/12800, dts=2048*1/12800 / 0.2 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
Frame: pts=2048*1/12800 / 0.16 / 1/12800, 1280x720, size=1417197, ref=1:2 / type: 1
Frame: pts=160*1/1000 / 0.16 / 1/1000, 1280x720, size=1417197, ref=1:2 / type: 0
Read packet: pts=3072*1/12800, dts=2560*1/12800 / 0.24 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
Frame: pts=2560*1/12800 / 0.2 / 1/12800, 1280x720, size=1417197, ref=1:2 / type: 1
Frame: pts=200*1/1000 / 0.2 / 1/1000, 1280x720, size=1417197, ref=1:2 / type: 0
Read packet: pts=6656*1/12800, dts=3072*1/12800 / 0.52 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
Frame: pts=3072*1/12800 / 0.24 / 1/12800, 1280x720, size=1417197, ref=1:2 / type: 1
Frame: pts=240*1/1000 / 0.24 / 1/1000, 1280x720, size=1417197, ref=1:2 / type: 0
Read packet: pts=5120*1/12800, dts=3584*1/12800 / 0.4 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
Frame: pts=3584*1/12800 / 0.28 / 1/12800, 1280x720, size=1417197, ref=1:2 / type: 1
Frame: pts=280*1/1000 / 0.28 / 1/1000, 1280x720, size=1417197, ref=1:2 / type: 0
Read packet: pts=4096*1/12800, dts=4096*1/12800 / 0.32 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
Frame: pts=4096*1/12800 / 0.32 / 1/12800, 1280x720, size=1417197, ref=1:3 / type: 1
Frame: pts=320*1/1000 / 0.32 / 1/1000, 1280x720, size=1417197, ref=1:3 / type: 0
Read packet: pts=4608*1/12800, dts=4608*1/12800 / 0.36 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
Frame: pts=4608*1/12800 / 0.36 / 1/12800, 1280x720, size=1417197, ref=1:3 / type: 1
Frame: pts=360*1/1000 / 0.36 / 1/1000, 1280x720, size=1417197, ref=1:3 / type: 0
Read packet: pts=5632*1/12800, dts=5120*1/12800 / 0.44 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
Frame: pts=5120*1/12800 / 0.4 / 1/12800, 1280x720, size=1417197, ref=1:2 / type: 1
Frame: pts=400*1/1000 / 0.4 / 1/1000, 1280x720, size=1417197, ref=1:2 / type: 0
Read packet: pts=6144*1/12800, dts=5632*1/12800 / 0.48 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
Frame: pts=5632*1/12800 / 0.44 / 1/12800, 1280x720, size=1417197, ref=1:2 / type: 1
Frame: pts=440*1/1000 / 0.44 / 1/1000, 1280x720, size=1417197, ref=1:2 / type: 0
Read packet: pts=9728*1/12800, dts=6144*1/12800 / 0.76 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
Frame: pts=6144*1/12800 / 0.48 / 1/12800, 1280x720, size=1417197, ref=1:2 / type: 1
Frame: pts=480*1/1000 / 0.48 / 1/1000, 1280x720, size=1417197, ref=1:2 / type: 0
Read packet: pts=8192*1/12800, dts=6656*1/12800 / 0.64 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
Frame: pts=6656*1/12800 / 0.52 / 1/12800, 1280x720, size=1417197, ref=1:2 / type: 1
Frame: pts=520*1/1000 / 0.52 / 1/1000, 1280x720, size=1417197, ref=1:2 / type: 0
Read packet: pts=7168*1/12800, dts=7168*1/12800 / 0.56 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
Frame: pts=7168*1/12800 / 0.56 / 1/12800, 1280x720, size=1417197, ref=1:3 / type: 1
Frame: pts=560*1/1000 / 0.56 / 1/1000, 1280x720, size=1417197, ref=1:3 / type: 0
Write packet: pts=0*1/1000, dts=-3*1/1000 / 0 / 1/1000 / st: 0
Read packet: pts=7680*1/12800, dts=7680*1/12800 / 0.6 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
Frame: pts=7680*1/12800 / 0.6 / 1/12800, 1280x720, size=1417197, ref=1:3 / type: 1
Frame: pts=600*1/1000 / 0.6 / 1/1000, 1280x720, size=1417197, ref=1:3 / type: 0
Write packet: pts=160*1/1000, dts=37*1/1000 / 0.16 / 1/1000 / st: 0
Read packet: pts=8704*1/12800, dts=8192*1/12800 / 0.68 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
Frame: pts=8192*1/12800 / 0.64 / 1/12800, 1280x720, size=1417197, ref=1:2 / type: 1
Frame: pts=640*1/1000 / 0.64 / 1/1000, 1280x720, size=1417197, ref=1:2 / type: 0
Write packet: pts=80*1/1000, dts=77*1/1000 / 0.08 / 1/1000 / st: 0
Read packet: pts=9216*1/12800, dts=8704*1/12800 / 0.72 / 1/12800 / st: 0
[h264 @ 000000000064a980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
Frame: pts=8704*1/12800 / 0.68 / 1/12800, 1280x720, size=1417197, ref=1:2 / type: 1
Frame: pts=680*1/1000 / 0.68 / 1/1000, 1280x720, size=1417197, ref=1:2 / type: 0
Write packet: pts=40*1/1000, dts=117*1/1000 / 0.04 / 1/1000 / st: 0
[mp4 @ 00000000006df4c0] pts (3600) < dts (10530) in stream 0
Error write packet: FFmpegError:-22, Invalid argument
[h264_nvenc @ 00000000006df7c0] Nvenc unloaded
[AVIOContext @ 0000000000681540] Statistics: 1278 bytes written, 0 seeks, 2 writeouts
[AVIOContext @ 0000000000646980] Statistics: 163840 bytes read, 0 seeks

进程已结束,退出代码为 1
h4tr3d commented 2 months ago

@mojie126 , look into https://github.com/h4tr3d/avcpp/blob/master/example/api2-samples/api2-hw-encode.cpp that is based on your code.

Main issue: wrong PTS/DTS in the compressed frames. I can reproduce issue on the my Quadro card. With committed sample MP4→MP4 transcoding with CUDA work properly.

mojie126 commented 2 months ago

It is indeed possible to use hardware acceleration for encoding, but the video quality is very poor... I tested that the video changed from 51m to about 4m

mojie126 commented 2 months ago

encoder.setTimeBase(Rational{1, 1000}); Is this a parameter to control the video quality? The smaller the better the quality?

mojie126 commented 2 months ago

In addition, can filters be supported, such as -vf "lut3d=xxx.cube" in command line mode?

mojie126 commented 2 months ago

@h4tr3d Local test results When using libx264 soft encoding, the video will be distorted or white at the beginning But when using cuda or qsv hard encoding, the effect is consistent with the original video

mojie126 commented 2 months ago

use cuda decode nad encode

D:\CLionProjects\AssRocket\hwFFmpeg.exe mod/dv.mkv mod/test.mp4
[AVFormatContext @ 0000000002645340] Opening 'mod/n.mkv' for reading
[file @ 0000000002646780] Setting default whitelist 'file,crypto,data'
[matroska,webm @ 0000000002645340] Format matroska,webm probed with size=2048 and score=100
[matroska,webm @ 0000000002645340] Unknown entry 0x22B59D at pos. 4448
[matroska,webm @ 0000000002645340] Unknown entry 0x22B59D at pos. 4547
[matroska,webm @ 0000000002645340] Unknown entry 0x22B59D at pos. 4633
st:0 removing common factor 1000000 from timebase
st:1 removing common factor 1000000 from timebase
st:2 removing common factor 1000000 from timebase
[matroska,webm @ 0000000002645340] Before avformat_find_stream_info() pos: 5866 bytes read:33669 seeks:2 nb_streams:3
[hevc @ 000000000264c7c0] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 000000000264c7c0] Decoding VPS
[hevc @ 000000000264c7c0] Main 10 profile bitstream
[hevc @ 000000000264c7c0] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 000000000264c7c0] Decoding SPS
[hevc @ 000000000264c7c0] Main 10 profile bitstream
[hevc @ 000000000264c7c0] Decoding VUI
[hevc @ 000000000264c7c0] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 000000000264c7c0] Decoding PPS
For transform of length 128, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 64, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 3 matches:
    1: fft_sr_asm_float_avx2 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
    2: fft_sr_asm_float_fma3 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 448
    3: fft_sr_asm_float_avx - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 416
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 128, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_sr_asm_float_avx2 - type: fft_float, len: 64, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 256, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 128, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 3 matches:
    1: fft_sr_asm_float_avx2 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
    2: fft_sr_asm_float_fma3 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 448
    3: fft_sr_asm_float_avx - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 416
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 256, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_sr_asm_float_avx2 - type: fft_float, len: 128, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 64, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 32, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 2 matches:
    1: fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 512
    2: fft32_asm_float_avx - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 64, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 64, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 32, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 2 matches:
    1: fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 512
    2: fft32_asm_float_avx - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 64, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 120, inverse, mdct_float, flags: [aligned, out_of_place], found 6 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_pfa_15xM_inv_float_c - type: mdct_float, len: [30, ∞], factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only], prio: 304
    3: mdct_pfa_5xM_inv_float_c - type: mdct_float, len: [10, ∞], factors[2]: [5, any], flags: [unaligned, out_of_place, inv_only], prio: 144
    4: mdct_pfa_3xM_inv_float_c - type: mdct_float, len: [6, ∞], factors[2]: [3, any], flags: [unaligned, out_of_place, inv_only], prio: 112
    5: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    6: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 60, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 1 matches:
    1: fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: [60, ∞], factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 688
For transform of length 4, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 1 matches:
    1: fft4_fwd_asm_float_sse2 - type: fft_float, len: 4, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 352
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 120, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: 60, factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call]
            fft4_fwd_asm_float_sse2 - type: fft_float, len: 4, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 128, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 64, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 3 matches:
    1: fft_sr_asm_float_avx2 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
    2: fft_sr_asm_float_fma3 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 448
    3: fft_sr_asm_float_avx - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 416
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 128, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_sr_asm_float_avx2 - type: fft_float, len: 64, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 480, inverse, mdct_float, flags: [aligned, out_of_place], found 6 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_pfa_15xM_inv_float_c - type: mdct_float, len: [30, ∞], factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only], prio: 304
    3: mdct_pfa_5xM_inv_float_c - type: mdct_float, len: [10, ∞], factors[2]: [5, any], flags: [unaligned, out_of_place, inv_only], prio: 144
    4: mdct_pfa_3xM_inv_float_c - type: mdct_float, len: [6, ∞], factors[2]: [3, any], flags: [unaligned, out_of_place, inv_only], prio: 112
    5: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    6: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 240, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 1 matches:
    1: fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: [60, ∞], factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 688
For transform of length 16, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 2 matches:
    1: fft16_asm_float_fma3 - type: fft_float, len: 16, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 512
    2: fft16_asm_float_avx - type: fft_float, len: 16, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 480, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: 240, factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call]
            fft16_asm_float_fma3 - type: fft_float, len: 16, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 512, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 256, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 3 matches:
    1: fft_sr_asm_float_avx2 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
    2: fft_sr_asm_float_fma3 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 448
    3: fft_sr_asm_float_avx - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 416
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 512, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_sr_asm_float_avx2 - type: fft_float, len: 256, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 960, inverse, mdct_float, flags: [aligned, out_of_place], found 6 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_pfa_15xM_inv_float_c - type: mdct_float, len: [30, ∞], factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only], prio: 304
    3: mdct_pfa_5xM_inv_float_c - type: mdct_float, len: [10, ∞], factors[2]: [5, any], flags: [unaligned, out_of_place, inv_only], prio: 144
    4: mdct_pfa_3xM_inv_float_c - type: mdct_float, len: [6, ∞], factors[2]: [3, any], flags: [unaligned, out_of_place, inv_only], prio: 112
    5: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    6: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 480, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 1 matches:
    1: fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: [60, ∞], factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 688
For transform of length 32, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 2 matches:
    1: fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 512
    2: fft32_asm_float_avx - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 960, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: 480, factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call]
            fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 1024, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 512, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 3 matches:
    1: fft_sr_asm_float_avx2 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
    2: fft_sr_asm_float_fma3 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 448
    3: fft_sr_asm_float_avx - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 416
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 1024, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_sr_asm_float_avx2 - type: fft_float, len: 512, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 1024, forward, mdct_float, flags: [aligned, out_of_place], found 2 matches:
    1: mdct_fwd_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, fwd_only], prio: 96
    2: mdct_naive_fwd_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, fwd_only], prio: -130976
For transform of length 512, forward, fft_float, flags: [aligned, inplace, preshuf], found 5 matches:
    1: fft_sr_ns_float_avx2 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 480
    2: fft_sr_ns_float_fma3 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 448
    3: fft_sr_ns_float_avx - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 416
    4: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    5: fft512_ns_float_c - type: fft_float, len: 512, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_fwd_float_c - type: mdct_float, len: 1024, factors[2]: [2, any], flags: [unaligned, out_of_place, fwd_only]
        fft_sr_ns_float_avx2 - type: fft_float, len: 512, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
[matroska,webm @ 0000000002645340] All info found
[matroska,webm @ 0000000002645340] After avformat_find_stream_info() pos: 303622 bytes read:348255 seeks:2 frames:78
Input #0, matroska,webm, from 'mod/n.mkv':
  Metadata:
    ENCODER         : Lavf60.17.100
    MOVIE/ENCODER   : Lavf57.83.100
  Duration: 00:35:23.24, start: 0.000000, bitrate: 11046 kb/s
  Stream #0:0(chi), 6, 1/1000: Video: hevc (Main 10), 1 reference frame, yuv420p10le(tv, bt2020nc/bt2020/smpte2084, left), 3840x1608 [SAR 1:1 DAR 160:67], 0/1, 25 fps, 25 tbr, 1k tbn (default)
    Metadata:
      BPS             : 10596774
      DURATION        : 00:35:23.080000000
      NUMBER_OF_FRAMES: 53077
      NUMBER_OF_BYTES : 2812225016
      _STATISTICS_WRITING_APP: mkvmerge v80.0 ('Roundabout') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:1(chi), 32, 1/1000: Audio: eac3, 48000 Hz, 5.1(side), fltp, 256 kb/s (default)
    Metadata:
      title           : Mandarin [DDP5.1]
      BPS             : 256000
      DURATION        : 00:35:23.136000000
      NUMBER_OF_FRAMES: 66348
      NUMBER_OF_BYTES : 67940352
      _STATISTICS_WRITING_APP: mkvmerge v80.0 ('Roundabout') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2(chi), 40, 1/1000: Audio: aac (LC), 44100 Hz, stereo, fltp
    Metadata:
      title           : Mandarin [AAC2.0]
      BPS             : 192001
      DURATION        : 00:35:23.237000000
      NUMBER_OF_FRAMES: 91440
      NUMBER_OF_BYTES : 50958134
      _STATISTICS_WRITING_APP: mkvmerge v80.0 ('Roundabout') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
hw_type: cuda
[hevc_cuvid @ 00000000026bec40] Format nv12 chosen by get_format().
[hevc_cuvid @ 00000000026bec40] Loaded lib: nvcuvid.dll
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidGetDecoderCaps
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidCreateDecoder
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidDestroyDecoder
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidDecodePicture
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidGetDecodeStatus
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidReconfigureDecoder
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidMapVideoFrame64
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidUnmapVideoFrame64
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidCtxLockCreate
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidCtxLockDestroy
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidCtxLock
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidCtxUnlock
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidCreateVideoSource
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidCreateVideoSourceW
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidDestroyVideoSource
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidSetVideoSourceState
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidGetVideoSourceState
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidGetSourceVideoFormat
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidGetSourceAudioFormat
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidCreateVideoParser
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidParseVideoData
[hevc_cuvid @ 00000000026bec40] Loaded sym: cuvidDestroyVideoParser
[AVHWDeviceContext @ 00000000026439c0] Loaded lib: nvcuda.dll
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuInit
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDriverGetVersion
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDeviceGetCount
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDeviceGet
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDeviceGetAttribute
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDeviceGetName
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDeviceComputeCapability
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuCtxCreate_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuCtxGetCurrent
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuCtxSetLimit
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuCtxPushCurrent_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuCtxPopCurrent_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuCtxDestroy_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuMemAlloc_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuMemAllocPitch_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuMemAllocManaged
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuMemsetD8Async
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuMemFree_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuMemcpy
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuMemcpyAsync
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuMemcpy2D_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuMemcpy2DAsync_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuMemcpyHtoD_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuMemcpyHtoDAsync_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuMemcpyDtoH_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuMemcpyDtoHAsync_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuMemcpyDtoD_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuMemcpyDtoDAsync_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuGetErrorName
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuGetErrorString
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuCtxGetDevice
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDevicePrimaryCtxRetain
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDevicePrimaryCtxRelease
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDevicePrimaryCtxSetFlags
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDevicePrimaryCtxGetState
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDevicePrimaryCtxReset
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuStreamCreate
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuStreamQuery
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuStreamSynchronize
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuStreamDestroy_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuStreamAddCallback
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuStreamWaitEvent
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuEventCreate
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuEventDestroy_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuEventSynchronize
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuEventQuery
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuEventRecord
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuLaunchKernel
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuLinkCreate
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuLinkAddData
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuLinkComplete
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuLinkDestroy
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuModuleLoadData
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuModuleUnload
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuModuleGetFunction
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuModuleGetGlobal
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuTexObjectCreate
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuTexObjectDestroy
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuGLGetDevices_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuGraphicsGLRegisterImage
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuGraphicsUnregisterResource
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuGraphicsMapResources
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuGraphicsUnmapResources
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuGraphicsSubResourceGetMappedArray
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuGraphicsResourceGetMappedPointer_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDeviceGetUuid
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDeviceGetUuid_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDeviceGetLuid
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDeviceGetByPCIBusId
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDeviceGetPCIBusId
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuImportExternalMemory
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDestroyExternalMemory
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuExternalMemoryGetMappedBuffer
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuExternalMemoryGetMappedMipmappedArray
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuMipmappedArrayGetLevel
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuMipmappedArrayDestroy
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuImportExternalSemaphore
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuDestroyExternalSemaphore
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuSignalExternalSemaphoresAsync
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuWaitExternalSemaphoresAsync
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuArrayCreate_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuArray3DCreate_v2
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuArrayDestroy
[AVHWDeviceContext @ 00000000026439c0] Cannot load optional cuEGLStreamProducerConnect
[AVHWDeviceContext @ 00000000026439c0] Cannot load optional cuEGLStreamProducerDisconnect
[AVHWDeviceContext @ 00000000026439c0] Cannot load optional cuEGLStreamConsumerDisconnect
[AVHWDeviceContext @ 00000000026439c0] Cannot load optional cuEGLStreamProducerPresentFrame
[AVHWDeviceContext @ 00000000026439c0] Cannot load optional cuEGLStreamProducerReturnFrame
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuD3D11GetDevice
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuD3D11GetDevices
[AVHWDeviceContext @ 00000000026439c0] Loaded sym: cuGraphicsD3D11RegisterResource
[hevc_cuvid @ 00000000026bec40] CUVID capabilities for hevc_cuvid:
[hevc_cuvid @ 00000000026bec40] 8 bit: supported: 1, min_width: 144, max_width: 8192, min_height: 144, max_height: 8192
[hevc_cuvid @ 00000000026bec40] 10 bit: supported: 1, min_width: 144, max_width: 8192, min_height: 144, max_height: 8192
[hevc_cuvid @ 00000000026bec40] 12 bit: supported: 1, min_width: 144, max_width: 8192, min_height: 144, max_height: 8192
[hevc_nvenc @ 0000000002b87200] Loaded lib: nvcuda.dll
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuInit
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDriverGetVersion
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDeviceGetCount
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDeviceGet
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDeviceGetAttribute
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDeviceGetName
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDeviceComputeCapability
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuCtxCreate_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuCtxGetCurrent
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuCtxSetLimit
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuCtxPushCurrent_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuCtxPopCurrent_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuCtxDestroy_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuMemAlloc_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuMemAllocPitch_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuMemAllocManaged
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuMemsetD8Async
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuMemFree_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuMemcpy
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuMemcpyAsync
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuMemcpy2D_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuMemcpy2DAsync_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuMemcpyHtoD_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuMemcpyHtoDAsync_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuMemcpyDtoH_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuMemcpyDtoHAsync_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuMemcpyDtoD_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuMemcpyDtoDAsync_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuGetErrorName
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuGetErrorString
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuCtxGetDevice
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDevicePrimaryCtxRetain
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDevicePrimaryCtxRelease
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDevicePrimaryCtxSetFlags
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDevicePrimaryCtxGetState
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDevicePrimaryCtxReset
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuStreamCreate
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuStreamQuery
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuStreamSynchronize
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuStreamDestroy_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuStreamAddCallback
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuStreamWaitEvent
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuEventCreate
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuEventDestroy_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuEventSynchronize
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuEventQuery
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuEventRecord
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuLaunchKernel
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuLinkCreate
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuLinkAddData
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuLinkComplete
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuLinkDestroy
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuModuleLoadData
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuModuleUnload
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuModuleGetFunction
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuModuleGetGlobal
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuTexObjectCreate
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuTexObjectDestroy
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuGLGetDevices_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuGraphicsGLRegisterImage
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuGraphicsUnregisterResource
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuGraphicsMapResources
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuGraphicsUnmapResources
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuGraphicsSubResourceGetMappedArray
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuGraphicsResourceGetMappedPointer_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDeviceGetUuid
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDeviceGetUuid_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDeviceGetLuid
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDeviceGetByPCIBusId
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDeviceGetPCIBusId
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuImportExternalMemory
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDestroyExternalMemory
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuExternalMemoryGetMappedBuffer
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuExternalMemoryGetMappedMipmappedArray
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuMipmappedArrayGetLevel
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuMipmappedArrayDestroy
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuImportExternalSemaphore
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuDestroyExternalSemaphore
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuSignalExternalSemaphoresAsync
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuWaitExternalSemaphoresAsync
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuArrayCreate_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuArray3DCreate_v2
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuArrayDestroy
[hevc_nvenc @ 0000000002b87200] Cannot load optional cuEGLStreamProducerConnect
[hevc_nvenc @ 0000000002b87200] Cannot load optional cuEGLStreamProducerDisconnect
[hevc_nvenc @ 0000000002b87200] Cannot load optional cuEGLStreamConsumerDisconnect
[hevc_nvenc @ 0000000002b87200] Cannot load optional cuEGLStreamProducerPresentFrame
[hevc_nvenc @ 0000000002b87200] Cannot load optional cuEGLStreamProducerReturnFrame
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuD3D11GetDevice
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuD3D11GetDevices
[hevc_nvenc @ 0000000002b87200] Loaded sym: cuGraphicsD3D11RegisterResource
[hevc_nvenc @ 0000000002b87200] Loaded lib: nvEncodeAPI64.dll
[hevc_nvenc @ 0000000002b87200] Loaded sym: NvEncodeAPICreateInstance
[hevc_nvenc @ 0000000002b87200] Loaded sym: NvEncodeAPIGetMaxSupportedVersion
[hevc_nvenc @ 0000000002b87200] Loaded Nvenc version 12.2
[hevc_nvenc @ 0000000002b87200] Nvenc initialized successfully
[hevc_nvenc @ 0000000002b87200] 1 CUDA capable devices found
[hevc_nvenc @ 0000000002b87200] [ GPU #0 - < NVIDIA GeForce RTX 4060 Laptop GPU > has Compute SM 8.9 ]
[hevc_nvenc @ 0000000002b87200] supports NVENC
[file @ 00000000026dde00] Setting default whitelist 'file,crypto,data'
Output #0, mp4, to 'mod/test.mp4':
  Stream #0:0, 0, 1/1000: Video: hevc (Main), 1 reference frame, nv12, 3840x1608 (0x0), 0/1, q=2-31, 25 fps, 23.98 tbr, 1k tbn
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
Read packet: pts=160*1/1000, dts=NO_PTS / 0.16 / 1/1000 / st: 0
Read packet: pts=800*1/1000, dts=NO_PTS / 0.8 / 1/1000 / st: 0
[hevc_cuvid @ 00000000026bec40] Format p010le chosen by get_format().
[hevc_cuvid @ 00000000026bec40] Formats: Original: nv12 | HW: p010le | SW: p010le
[AVHWFramesContext @ 0000000002a503c0] CUDA texture alignment: 512
Read packet: pts=480*1/1000, dts=NO_PTS / 0.48 / 1/1000 / st: 0
Read packet: pts=320*1/1000, dts=NO_PTS / 0.32 / 1/1000 / st: 0
Read packet: pts=240*1/1000, dts=NO_PTS / 0.24 / 1/1000 / st: 0
Read packet: pts=200*1/1000, dts=160*1/1000 / 0.2 / 1/1000 / st: 0
Read packet: pts=280*1/1000, dts=200*1/1000 / 0.28 / 1/1000 / st: 0
Read packet: pts=400*1/1000, dts=240*1/1000 / 0.4 / 1/1000 / st: 0
Frame: pts=160*1/1000 / 0.16 / 1/1000, 3840x1608, size=18616478, ref=1:1 / type: 1
Frame: pts=160*1/1000 / 0.16 / 1/1000, 3840x1608, size=18616478, ref=1:1 / type: 0
Assertion ((dst_linesize) >= 0 ? (dst_linesize) : (-(dst_linesize))) >= bytewidth failed at D:/CLionProjects/ma/build/ffmpeg-git/libavutil/imgutils.c:351

进程已结束,退出代码为 3

use qsv decode and encode

D:\CLionProjects\AssRocket\hwFFmpeg.exe mod/dv.mkv mod/test.mp4
[AVFormatContext @ 0000000002625340] Opening 'mod/n.mkv' for reading
[file @ 0000000002626780] Setting default whitelist 'file,crypto,data'
[matroska,webm @ 0000000002625340] Format matroska,webm probed with size=2048 and score=100
[matroska,webm @ 0000000002625340] Unknown entry 0x22B59D at pos. 4448
[matroska,webm @ 0000000002625340] Unknown entry 0x22B59D at pos. 4547
[matroska,webm @ 0000000002625340] Unknown entry 0x22B59D at pos. 4633
st:0 removing common factor 1000000 from timebase
st:1 removing common factor 1000000 from timebase
st:2 removing common factor 1000000 from timebase
[matroska,webm @ 0000000002625340] Before avformat_find_stream_info() pos: 5866 bytes read:33669 seeks:2 nb_streams:3
[hevc @ 000000000262c7c0] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 000000000262c7c0] Decoding VPS
[hevc @ 000000000262c7c0] Main 10 profile bitstream
[hevc @ 000000000262c7c0] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 000000000262c7c0] Decoding SPS
[hevc @ 000000000262c7c0] Main 10 profile bitstream
[hevc @ 000000000262c7c0] Decoding VUI
[hevc @ 000000000262c7c0] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 000000000262c7c0] Decoding PPS
For transform of length 128, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 64, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 3 matches:
    1: fft_sr_asm_float_avx2 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
    2: fft_sr_asm_float_fma3 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 448
    3: fft_sr_asm_float_avx - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 416
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 128, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_sr_asm_float_avx2 - type: fft_float, len: 64, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 256, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 128, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 3 matches:
    1: fft_sr_asm_float_avx2 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
    2: fft_sr_asm_float_fma3 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 448
    3: fft_sr_asm_float_avx - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 416
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 256, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_sr_asm_float_avx2 - type: fft_float, len: 128, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 64, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 32, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 2 matches:
    1: fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 512
    2: fft32_asm_float_avx - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 64, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 64, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 32, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 2 matches:
    1: fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 512
    2: fft32_asm_float_avx - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 64, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 120, inverse, mdct_float, flags: [aligned, out_of_place], found 6 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_pfa_15xM_inv_float_c - type: mdct_float, len: [30, ∞], factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only], prio: 304
    3: mdct_pfa_5xM_inv_float_c - type: mdct_float, len: [10, ∞], factors[2]: [5, any], flags: [unaligned, out_of_place, inv_only], prio: 144
    4: mdct_pfa_3xM_inv_float_c - type: mdct_float, len: [6, ∞], factors[2]: [3, any], flags: [unaligned, out_of_place, inv_only], prio: 112
    5: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    6: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 60, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 1 matches:
    1: fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: [60, ∞], factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 688
For transform of length 4, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 1 matches:
    1: fft4_fwd_asm_float_sse2 - type: fft_float, len: 4, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 352
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 120, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: 60, factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call]
            fft4_fwd_asm_float_sse2 - type: fft_float, len: 4, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 128, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 64, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 3 matches:
    1: fft_sr_asm_float_avx2 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
    2: fft_sr_asm_float_fma3 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 448
    3: fft_sr_asm_float_avx - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 416
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 128, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_sr_asm_float_avx2 - type: fft_float, len: 64, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 480, inverse, mdct_float, flags: [aligned, out_of_place], found 6 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_pfa_15xM_inv_float_c - type: mdct_float, len: [30, ∞], factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only], prio: 304
    3: mdct_pfa_5xM_inv_float_c - type: mdct_float, len: [10, ∞], factors[2]: [5, any], flags: [unaligned, out_of_place, inv_only], prio: 144
    4: mdct_pfa_3xM_inv_float_c - type: mdct_float, len: [6, ∞], factors[2]: [3, any], flags: [unaligned, out_of_place, inv_only], prio: 112
    5: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    6: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 240, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 1 matches:
    1: fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: [60, ∞], factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 688
For transform of length 16, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 2 matches:
    1: fft16_asm_float_fma3 - type: fft_float, len: 16, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 512
    2: fft16_asm_float_avx - type: fft_float, len: 16, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 480, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: 240, factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call]
            fft16_asm_float_fma3 - type: fft_float, len: 16, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 512, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 256, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 3 matches:
    1: fft_sr_asm_float_avx2 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
    2: fft_sr_asm_float_fma3 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 448
    3: fft_sr_asm_float_avx - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 416
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 512, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_sr_asm_float_avx2 - type: fft_float, len: 256, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 960, inverse, mdct_float, flags: [aligned, out_of_place], found 6 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_pfa_15xM_inv_float_c - type: mdct_float, len: [30, ∞], factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only], prio: 304
    3: mdct_pfa_5xM_inv_float_c - type: mdct_float, len: [10, ∞], factors[2]: [5, any], flags: [unaligned, out_of_place, inv_only], prio: 144
    4: mdct_pfa_3xM_inv_float_c - type: mdct_float, len: [6, ∞], factors[2]: [3, any], flags: [unaligned, out_of_place, inv_only], prio: 112
    5: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    6: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 480, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 1 matches:
    1: fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: [60, ∞], factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 688
For transform of length 32, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 2 matches:
    1: fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 512
    2: fft32_asm_float_avx - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 960, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: 480, factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call]
            fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 1024, inverse, mdct_float, flags: [aligned, out_of_place], found 3 matches:
    1: mdct_inv_float_avx2 - type: mdct_float, len: [16, ∞], factors[2]: [2, any], flags: [aligned, out_of_place, inv_only], prio: 544
    2: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    3: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 512, inverse, fft_float, flags: [aligned, inplace, preshuf, asm_call], found 3 matches:
    1: fft_sr_asm_float_avx2 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 480
    2: fft_sr_asm_float_fma3 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 448
    3: fft_sr_asm_float_avx - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call], prio: 416
Transform tree:
    mdct_inv_float_avx2 - type: mdct_float, len: 1024, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
        fft_sr_asm_float_avx2 - type: fft_float, len: 512, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
For transform of length 1024, forward, mdct_float, flags: [aligned, out_of_place], found 2 matches:
    1: mdct_fwd_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, fwd_only], prio: 96
    2: mdct_naive_fwd_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, fwd_only], prio: -130976
For transform of length 512, forward, fft_float, flags: [aligned, inplace, preshuf], found 5 matches:
    1: fft_sr_ns_float_avx2 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 480
    2: fft_sr_ns_float_fma3 - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 448
    3: fft_sr_ns_float_avx - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 416
    4: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    5: fft512_ns_float_c - type: fft_float, len: 512, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_fwd_float_c - type: mdct_float, len: 1024, factors[2]: [2, any], flags: [unaligned, out_of_place, fwd_only]
        fft_sr_ns_float_avx2 - type: fft_float, len: 512, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
[matroska,webm @ 0000000002625340] All info found
[matroska,webm @ 0000000002625340] After avformat_find_stream_info() pos: 303622 bytes read:348255 seeks:2 frames:78
Input #0, matroska,webm, from 'mod/n.mkv':
  Metadata:
    ENCODER         : Lavf60.17.100
    MOVIE/ENCODER   : Lavf57.83.100
  Duration: 00:35:23.24, start: 0.000000, bitrate: 11046 kb/s
  Stream #0:0(chi), 6, 1/1000: Video: hevc (Main 10), 1 reference frame, yuv420p10le(tv, bt2020nc/bt2020/smpte2084, left), 3840x1608 [SAR 1:1 DAR 160:67], 0/1, 25 fps, 25 tbr, 1k tbn (default)
    Metadata:
      BPS             : 10596774
      DURATION        : 00:35:23.080000000
      NUMBER_OF_FRAMES: 53077
      NUMBER_OF_BYTES : 2812225016
      _STATISTICS_WRITING_APP: mkvmerge v80.0 ('Roundabout') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:1(chi), 32, 1/1000: Audio: eac3, 48000 Hz, 5.1(side), fltp, 256 kb/s (default)
    Metadata:
      title           : Mandarin [DDP5.1]
      BPS             : 256000
      DURATION        : 00:35:23.136000000
      NUMBER_OF_FRAMES: 66348
      NUMBER_OF_BYTES : 67940352
      _STATISTICS_WRITING_APP: mkvmerge v80.0 ('Roundabout') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2(chi), 40, 1/1000: Audio: aac (LC), 44100 Hz, stereo, fltp
    Metadata:
      title           : Mandarin [AAC2.0]
      BPS             : 192001
      DURATION        : 00:35:23.237000000
      NUMBER_OF_FRAMES: 91440
      NUMBER_OF_BYTES : 50958134
      _STATISTICS_WRITING_APP: mkvmerge v80.0 ('Roundabout') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
hw_type: cuda
[hevc_qsv @ 00000000026eb740] Encoder: input is system memory surface
[hevc_qsv @ 00000000026eb740] Use Intel(R) oneVPL to create MFX session, the required implementation version is 1.1
[hevc_qsv @ 00000000026eb740] Initialized an internal MFX session using hardware accelerated implementation
[hevc_qsv @ 00000000026eb740] Using the constant bitrate (CBR) ratecontrol method
[hevc_qsv @ 00000000026eb740] profile: hevc main; level: 50
[hevc_qsv @ 00000000026eb740] GopPicSize: 248; GopRefDist: 4; GopOptFlag:; IdrInterval: 1
[hevc_qsv @ 00000000026eb740] TargetUsage: 4; RateControlMethod: CBR
[hevc_qsv @ 00000000026eb740] BufferSizeInKB: 160; InitialDelayInKB: 80; TargetKbps: 0; MaxKbps: 0; BRCParamMultiplier: 1
[hevc_qsv @ 00000000026eb740] NumSlice: 1; NumRefFrame: 3
[hevc_qsv @ 00000000026eb740] RateDistortionOpt: unknown
[hevc_qsv @ 00000000026eb740] RecoveryPointSEI: unknown
[hevc_qsv @ 00000000026eb740] VDENC: OFF
[hevc_qsv @ 00000000026eb740] NalHrdConformance: ON; VuiNalHrdParameters: ON
[hevc_qsv @ 00000000026eb740] FrameRateExtD: 524288; FrameRateExtN: 12570329 
[hevc_qsv @ 00000000026eb740] IntRefType: 0; IntRefCycleSize: 0; IntRefQPDelta: 0
[hevc_qsv @ 00000000026eb740] MaxFrameSize: 0; MaxSliceSize: 0
[hevc_qsv @ 00000000026eb740] BitrateLimit: unknown; MBBRC: unknown; ExtBRC: OFF
[hevc_qsv @ 00000000026eb740] Trellis: auto
[hevc_qsv @ 00000000026eb740] RepeatPPS: OFF; NumMbPerSlice: 0; LookAheadDS: unknown
[hevc_qsv @ 00000000026eb740] AdaptiveI: unknown; AdaptiveB: unknown; BRefType:pyramid
[hevc_qsv @ 00000000026eb740] MinQPI: 1; MaxQPI: 51; MinQPP: 1; MaxQPP: 51; MinQPB: 1; MaxQPB: 51
[hevc_qsv @ 00000000026eb740] DisableDeblockingIdc: 0 
[hevc_qsv @ 00000000026eb740] SkipFrame: no_skip
[hevc_qsv @ 00000000026eb740] PRefType: default
[hevc_qsv @ 00000000026eb740] GPB: ON
[hevc_qsv @ 00000000026eb740] TransformSkip: ON 
[hevc_qsv @ 00000000026eb740] IntRefCycleDist: 0
[hevc_qsv @ 00000000026eb740] LowDelayBRC: OFF
[hevc_qsv @ 00000000026eb740] MaxFrameSizeI: 0; MaxFrameSizeP: 0
[hevc_qsv @ 00000000026eb740] ScenarioInfo: 0
[hevc_qsv @ 00000000026eb740] NumTileColumns: 1; NumTileRows: 1
[file @ 00000000026c4900] Setting default whitelist 'file,crypto,data'
Output #0, mp4, to 'mod/test.mp4':
  Stream #0:0, 0, 1/1000: Video: hevc, 1 reference frame, nv12, 3840x1608 (0x0), 0/1, q=2-31, 25 fps, 23.98 tbr, 1k tbn
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
Read packet: pts=160*1/1000, dts=NO_PTS / 0.16 / 1/1000 / st: 0
[hevc_qsv @ 000000000269ec40] Format nv12 chosen by get_format().
[hevc_qsv @ 000000000269ec40] Decoder: output is system memory surface
[hevc_qsv @ 000000000269ec40] Use Intel(R) oneVPL to create MFX session, the required implementation version is 1.1
[hevc_qsv @ 000000000269ec40] Initialized an internal MFX session using hardware accelerated implementation
[hevc_qsv @ 000000000269ec40] Format p010le chosen by get_format().
[hevc_qsv @ 000000000269ec40] Decoder: output is system memory surface
Read packet: pts=800*1/1000, dts=NO_PTS / 0.8 / 1/1000 / st: 0
Read packet: pts=480*1/1000, dts=NO_PTS / 0.48 / 1/1000 / st: 0
Read packet: pts=320*1/1000, dts=NO_PTS / 0.32 / 1/1000 / st: 0
Read packet: pts=240*1/1000, dts=NO_PTS / 0.24 / 1/1000 / st: 0
Read packet: pts=200*1/1000, dts=160*1/1000 / 0.2 / 1/1000 / st: 0
Read packet: pts=280*1/1000, dts=200*1/1000 / 0.28 / 1/1000 / st: 0
Read packet: pts=400*1/1000, dts=240*1/1000 / 0.4 / 1/1000 / st: 0
Read packet: pts=360*1/1000, dts=280*1/1000 / 0.36 / 1/1000 / st: 0
Frame: pts=160*1/1000 / 0.16 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=160*1/1000 / 0.16 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Read packet: pts=440*1/1000, dts=320*1/1000 / 0.44 / 1/1000 / st: 0
Frame: pts=200*1/1000 / 0.2 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=200*1/1000 / 0.2 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Read packet: pts=640*1/1000, dts=360*1/1000 / 0.64 / 1/1000 / st: 0
Frame: pts=240*1/1000 / 0.24 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=240*1/1000 / 0.24 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Read packet: pts=560*1/1000, dts=400*1/1000 / 0.56 / 1/1000 / st: 0
Frame: pts=280*1/1000 / 0.28 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=280*1/1000 / 0.28 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Read packet: pts=520*1/1000, dts=440*1/1000 / 0.52 / 1/1000 / st: 0
Frame: pts=320*1/1000 / 0.32 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=320*1/1000 / 0.32 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Read packet: pts=600*1/1000, dts=480*1/1000 / 0.6 / 1/1000 / st: 0
Frame: pts=360*1/1000 / 0.36 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=360*1/1000 / 0.36 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Read packet: pts=720*1/1000, dts=520*1/1000 / 0.72 / 1/1000 / st: 0
Frame: pts=400*1/1000 / 0.4 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=400*1/1000 / 0.4 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Read packet: pts=680*1/1000, dts=560*1/1000 / 0.68 / 1/1000 / st: 0
Frame: pts=440*1/1000 / 0.44 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=440*1/1000 / 0.44 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=0*524288/12570329, dts=0*524288/12570329 / 0 / 524288/12570329 / st: 0
Read packet: pts=760*1/1000, dts=600*1/1000 / 0.76 / 1/1000 / st: 0
Frame: pts=480*1/1000 / 0.48 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=480*1/1000 / 0.48 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=1*524288/12570329, dts=1*524288/12570329 / 0.0417084 / 524288/12570329 / st: 0
Read packet: pts=1440*1/1000, dts=640*1/1000 / 1.44 / 1/1000 / st: 0
Frame: pts=520*1/1000 / 0.52 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=520*1/1000 / 0.52 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=2*524288/12570329, dts=2*524288/12570329 / 0.0834168 / 524288/12570329 / st: 0
Read packet: pts=1120*1/1000, dts=680*1/1000 / 1.12 / 1/1000 / st: 0
Frame: pts=560*1/1000 / 0.56 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=560*1/1000 / 0.56 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=3*524288/12570329, dts=3*524288/12570329 / 0.125125 / 524288/12570329 / st: 0
Read packet: pts=960*1/1000, dts=720*1/1000 / 0.96 / 1/1000 / st: 0
Frame: pts=600*1/1000 / 0.6 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=600*1/1000 / 0.6 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=4*524288/12570329, dts=4*524288/12570329 / 0.166834 / 524288/12570329 / st: 0
Read packet: pts=880*1/1000, dts=760*1/1000 / 0.88 / 1/1000 / st: 0
Frame: pts=640*1/1000 / 0.64 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=640*1/1000 / 0.64 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=5*524288/12570329, dts=5*524288/12570329 / 0.208542 / 524288/12570329 / st: 0
Read packet: pts=840*1/1000, dts=800*1/1000 / 0.84 / 1/1000 / st: 0
Frame: pts=680*1/1000 / 0.68 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=680*1/1000 / 0.68 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=6*524288/12570329, dts=6*524288/12570329 / 0.25025 / 524288/12570329 / st: 0
Read packet: pts=920*1/1000, dts=840*1/1000 / 0.92 / 1/1000 / st: 0
Frame: pts=720*1/1000 / 0.72 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=720*1/1000 / 0.72 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=7*524288/12570329, dts=7*524288/12570329 / 0.291959 / 524288/12570329 / st: 0
Read packet: pts=1040*1/1000, dts=880*1/1000 / 1.04 / 1/1000 / st: 0
Frame: pts=760*1/1000 / 0.76 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=760*1/1000 / 0.76 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=8*524288/12570329, dts=8*524288/12570329 / 0.333667 / 524288/12570329 / st: 0
Read packet: pts=1000*1/1000, dts=920*1/1000 / 1 / 1/1000 / st: 0
Frame: pts=800*1/1000 / 0.8 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=800*1/1000 / 0.8 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=9*524288/12570329, dts=9*524288/12570329 / 0.375375 / 524288/12570329 / st: 0
Read packet: pts=1080*1/1000, dts=960*1/1000 / 1.08 / 1/1000 / st: 0
Frame: pts=840*1/1000 / 0.84 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=840*1/1000 / 0.84 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=10*524288/12570329, dts=10*524288/12570329 / 0.417084 / 524288/12570329 / st: 0
Read packet: pts=1280*1/1000, dts=1000*1/1000 / 1.28 / 1/1000 / st: 0
Frame: pts=880*1/1000 / 0.88 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=880*1/1000 / 0.88 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=11*524288/12570329, dts=11*524288/12570329 / 0.458792 / 524288/12570329 / st: 0
Read packet: pts=1200*1/1000, dts=1040*1/1000 / 1.2 / 1/1000 / st: 0
Frame: pts=920*1/1000 / 0.92 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=920*1/1000 / 0.92 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=12*524288/12570329, dts=12*524288/12570329 / 0.500501 / 524288/12570329 / st: 0
Read packet: pts=1160*1/1000, dts=1080*1/1000 / 1.16 / 1/1000 / st: 0
Frame: pts=960*1/1000 / 0.96 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=960*1/1000 / 0.96 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=13*524288/12570329, dts=13*524288/12570329 / 0.542209 / 524288/12570329 / st: 0
Read packet: pts=1240*1/1000, dts=1120*1/1000 / 1.24 / 1/1000 / st: 0
Frame: pts=1000*1/1000 / 1 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1000*1/1000 / 1 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=14*524288/12570329, dts=14*524288/12570329 / 0.583917 / 524288/12570329 / st: 0
Read packet: pts=1360*1/1000, dts=1160*1/1000 / 1.36 / 1/1000 / st: 0
Frame: pts=1040*1/1000 / 1.04 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1040*1/1000 / 1.04 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=15*524288/12570329, dts=15*524288/12570329 / 0.625626 / 524288/12570329 / st: 0
Read packet: pts=1320*1/1000, dts=1200*1/1000 / 1.32 / 1/1000 / st: 0
Frame: pts=1080*1/1000 / 1.08 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1080*1/1000 / 1.08 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=16*524288/12570329, dts=16*524288/12570329 / 0.667334 / 524288/12570329 / st: 0
Read packet: pts=1400*1/1000, dts=1240*1/1000 / 1.4 / 1/1000 / st: 0
Frame: pts=1120*1/1000 / 1.12 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1120*1/1000 / 1.12 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=17*524288/12570329, dts=17*524288/12570329 / 0.709042 / 524288/12570329 / st: 0
Read packet: pts=2080*1/1000, dts=1280*1/1000 / 2.08 / 1/1000 / st: 0
Frame: pts=1160*1/1000 / 1.16 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1160*1/1000 / 1.16 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=18*524288/12570329, dts=18*524288/12570329 / 0.750751 / 524288/12570329 / st: 0
Read packet: pts=1760*1/1000, dts=1320*1/1000 / 1.76 / 1/1000 / st: 0
Frame: pts=1200*1/1000 / 1.2 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1200*1/1000 / 1.2 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=19*524288/12570329, dts=19*524288/12570329 / 0.792459 / 524288/12570329 / st: 0
Read packet: pts=1600*1/1000, dts=1360*1/1000 / 1.6 / 1/1000 / st: 0
Frame: pts=1240*1/1000 / 1.24 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1240*1/1000 / 1.24 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=20*524288/12570329, dts=20*524288/12570329 / 0.834168 / 524288/12570329 / st: 0
Read packet: pts=1520*1/1000, dts=1400*1/1000 / 1.52 / 1/1000 / st: 0
Frame: pts=1280*1/1000 / 1.28 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1280*1/1000 / 1.28 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=21*524288/12570329, dts=21*524288/12570329 / 0.875876 / 524288/12570329 / st: 0
Read packet: pts=1480*1/1000, dts=1440*1/1000 / 1.48 / 1/1000 / st: 0
Frame: pts=1320*1/1000 / 1.32 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1320*1/1000 / 1.32 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=22*524288/12570329, dts=22*524288/12570329 / 0.917584 / 524288/12570329 / st: 0
Read packet: pts=1560*1/1000, dts=1480*1/1000 / 1.56 / 1/1000 / st: 0
Frame: pts=1360*1/1000 / 1.36 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1360*1/1000 / 1.36 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=23*524288/12570329, dts=23*524288/12570329 / 0.959293 / 524288/12570329 / st: 0
Read packet: pts=1680*1/1000, dts=1520*1/1000 / 1.68 / 1/1000 / st: 0
Frame: pts=1400*1/1000 / 1.4 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1400*1/1000 / 1.4 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=24*524288/12570329, dts=24*524288/12570329 / 1.001 / 524288/12570329 / st: 0
Read packet: pts=1640*1/1000, dts=1560*1/1000 / 1.64 / 1/1000 / st: 0
Frame: pts=1440*1/1000 / 1.44 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1440*1/1000 / 1.44 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=25*524288/12570329, dts=25*524288/12570329 / 1.04271 / 524288/12570329 / st: 0
Read packet: pts=1720*1/1000, dts=1600*1/1000 / 1.72 / 1/1000 / st: 0
Frame: pts=1480*1/1000 / 1.48 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1480*1/1000 / 1.48 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=26*524288/12570329, dts=26*524288/12570329 / 1.08442 / 524288/12570329 / st: 0
Read packet: pts=1920*1/1000, dts=1640*1/1000 / 1.92 / 1/1000 / st: 0
Frame: pts=1520*1/1000 / 1.52 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1520*1/1000 / 1.52 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=27*524288/12570329, dts=27*524288/12570329 / 1.12613 / 524288/12570329 / st: 0
Read packet: pts=1840*1/1000, dts=1680*1/1000 / 1.84 / 1/1000 / st: 0
Frame: pts=1560*1/1000 / 1.56 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1560*1/1000 / 1.56 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=28*524288/12570329, dts=28*524288/12570329 / 1.16783 / 524288/12570329 / st: 0
Read packet: pts=1800*1/1000, dts=1720*1/1000 / 1.8 / 1/1000 / st: 0
Frame: pts=1600*1/1000 / 1.6 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1600*1/1000 / 1.6 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=29*524288/12570329, dts=29*524288/12570329 / 1.20954 / 524288/12570329 / st: 0
Read packet: pts=1880*1/1000, dts=1760*1/1000 / 1.88 / 1/1000 / st: 0
Frame: pts=1640*1/1000 / 1.64 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1640*1/1000 / 1.64 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=30*524288/12570329, dts=30*524288/12570329 / 1.25125 / 524288/12570329 / st: 0
Read packet: pts=2000*1/1000, dts=1800*1/1000 / 2 / 1/1000 / st: 0
Frame: pts=1680*1/1000 / 1.68 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1680*1/1000 / 1.68 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=31*524288/12570329, dts=31*524288/12570329 / 1.29296 / 524288/12570329 / st: 0
Read packet: pts=1960*1/1000, dts=1840*1/1000 / 1.96 / 1/1000 / st: 0
Frame: pts=1720*1/1000 / 1.72 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1720*1/1000 / 1.72 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=32*524288/12570329, dts=32*524288/12570329 / 1.33467 / 524288/12570329 / st: 0
Read packet: pts=2040*1/1000, dts=1880*1/1000 / 2.04 / 1/1000 / st: 0
Frame: pts=1760*1/1000 / 1.76 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1760*1/1000 / 1.76 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=33*524288/12570329, dts=33*524288/12570329 / 1.37638 / 524288/12570329 / st: 0
Read packet: pts=2720*1/1000, dts=1920*1/1000 / 2.72 / 1/1000 / st: 0
Frame: pts=1800*1/1000 / 1.8 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1800*1/1000 / 1.8 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=34*524288/12570329, dts=34*524288/12570329 / 1.41808 / 524288/12570329 / st: 0
Read packet: pts=2400*1/1000, dts=1960*1/1000 / 2.4 / 1/1000 / st: 0
Frame: pts=1840*1/1000 / 1.84 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1840*1/1000 / 1.84 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=35*524288/12570329, dts=35*524288/12570329 / 1.45979 / 524288/12570329 / st: 0
Read packet: pts=2240*1/1000, dts=2000*1/1000 / 2.24 / 1/1000 / st: 0
Frame: pts=1880*1/1000 / 1.88 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1880*1/1000 / 1.88 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=36*524288/12570329, dts=36*524288/12570329 / 1.5015 / 524288/12570329 / st: 0
Read packet: pts=2160*1/1000, dts=2040*1/1000 / 2.16 / 1/1000 / st: 0
Frame: pts=1920*1/1000 / 1.92 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1920*1/1000 / 1.92 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=37*524288/12570329, dts=37*524288/12570329 / 1.54321 / 524288/12570329 / st: 0
Read packet: pts=2120*1/1000, dts=2080*1/1000 / 2.12 / 1/1000 / st: 0
Frame: pts=1960*1/1000 / 1.96 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=1960*1/1000 / 1.96 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=38*524288/12570329, dts=38*524288/12570329 / 1.58492 / 524288/12570329 / st: 0
Read packet: pts=2200*1/1000, dts=2120*1/1000 / 2.2 / 1/1000 / st: 0
Frame: pts=2000*1/1000 / 2 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=2000*1/1000 / 2 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=39*524288/12570329, dts=39*524288/12570329 / 1.62663 / 524288/12570329 / st: 0
Read packet: pts=2320*1/1000, dts=2160*1/1000 / 2.32 / 1/1000 / st: 0
Frame: pts=2040*1/1000 / 2.04 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=2040*1/1000 / 2.04 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
Write packet: pts=40*524288/12570329, dts=40*524288/12570329 / 1.66834 / 524288/12570329 / st: 0
Read packet: pts=2280*1/1000, dts=2200*1/1000 / 2.28 / 1/1000 / st: 0
Frame: pts=2080*1/1000 / 2.08 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 1
Frame: pts=2080*1/1000 / 2.08 / 1/1000, 3840x1608, size=19169280, ref=1:2 / type: 0
[hevc_qsv @ 00000000026eb740] Invalid FrameType:0.
[hevc_qsv @ 00000000026eb740] encodeCommon: Encode error: -1094995529, Invalid data found when processing input
Encoding error: FFmpegError:-1094995529
[AVIOContext @ 0000000002bcf080] Statistics: 1122931 bytes written, 0 seeks, 6 writeouts
[AVIOContext @ 0000000002626980] Statistics: 2303664 bytes read, 2 seeks

进程已结束,退出代码为 1
h4tr3d commented 2 months ago

encoder.setTimeBase(Rational{1, 1000}); Is this a parameter to control the video quality? The smaller the better the quality?

No, time base is a time units declaration used for PTS and DTS. Poor quality control by the bitrate, profile and similar sings that related to the codec. You can obtain possible encoder parameters via:

ffmpeg -help encoder=h264_nvenc

and use them as a encoder dictionary parameters that passed to the open function. See into https://github.com/h4tr3d/avcpp/blob/master/example/api2-samples/api2-dict-basic.cpp how to fill dictionary. And pass filled dict with properties to https://github.com/h4tr3d/avcpp/blob/b631ac0126233c3a695e8b086226597d8bcef61f/src/codeccontext.h#L67 or similar.

In addition, can filters be supported, such as -vf "lut3d=xxx.cube" in command line mode?

Currently no. But see into PR: https://github.com/h4tr3d/avcpp/pull/129 that introduce such ability. I want integrate it with tests. But has no time for it.

Assertion ((dst_linesize) >= 0 ? (dst_linesize) : (-(dst_linesize))) >= bytewidth failed at D:/CLionProjects/ma/build/ffmpeg-git/libavutil/imgutils.c:351

Strange assertion. Could you please share a problematic source with me?

[hevc_qsv @ 00000000026eb740] Invalid FrameType:0.

Try to comment frame.setPictureType(); in the sample code.

mojie126 commented 2 months ago

filter_graph.parse() does not support WIndows absolute paths, such as D:/avcpp_test/xxx.cube