Beiträge von Vouk

    Currently "zscale" in libav supports these values:

    Code
      filter            <int>        ..FV....... set filter type (from 0 to 5) (default bilinear)
         point           0            ..FV.......
         bilinear        1            ..FV.......
         bicubic         2            ..FV.......
         spline16        3            ..FV.......
         spline36        4            ..FV.......
         lanczos         5            ..FV.......

    And that's what's selectable in Voukoder. I'm not sure what lanczos version is being used there.

    I'm back now. Let's take a look at the open topics:

    MainConcept's plugin also has NVENC support. But I have no idea how they fixed en error. Closing NVENC session in the destructor?

    That's handled by libav, but as far as I know everthing is properly closed. Also nvsmi.exe does not report an open nvenc session after voukoder is done.

    Actually 0-255 is very important . Formats like DCPs, prores 444, Image sequences, IMF master files are full range. Years ago, Resolve was more focused on only rendering master files.

    Yes, Both variants are support. I just want to avoid DVR is using full range as default but is using limited range instead. Of course the user can switch this to full range if needed.

    But the next code does not generate errors in s_RegisterCodecs (Pixel Format was not defined for plugin encoder fourCC) or when I try to render (Color mode is not supported).

    The pixel format selection in the plugin settings in DVR just defines how frame is being sent to voukoder. You'd have to set the target format of your video in voukoder itself. Voukoder can do any necessary conversion on the fly. But its performant to use the closest pixel format that matches the output format so voukoder does not have to do any conversion. (See my previous post comparing the speeds)

    It makes also no sense to set DVR to yuv420 and set voukoder to export prores 4444. It will work, but the effective color resolution is still 420. Same with bit depth.

    Still, whatever I set in codecInfo, when calling ...

    Code
    uint32_t bitDepth;
    p_pProps->GetUINT32(pIOPropBitDepth, bitDepth);

    ... I always get bitDepth = 0. And the framebuffer looks like being 8 bit. Hmm...

    Edit: Created a post in the BM forum: https://forum.blackmagicdesign.com/viewtopic.php?f=12&t=138829

    Status update:

    When getting yuv420 out of DVR and feeding it directly into NVENC (without conversion from uyvy422) I get a performance increase of 62%. Really nice.

    Code
    Exported 1919 frames in 4 seconds. (avg. 393.96 fps) [YUV420p->YUV420p]
    Exported 1919 frames in 7 seconds. (avg. 242.30 fps) [UYVY422->YUV420p]
    Exported 1919 frames in 12 seconds. (avg. 152.90 fps) [YUV444p->YUV420p]

    With these low latencies (2538 us/frame) small changes might have a huge effect.

    TO DO

    • Add high bit depth mode pixel formats
    • Get alpha channel working
    • Get timecodes working for MOV
    • Native DVR NVENC fails after Voukoder ran
      "NVENC m_EncodeAPI.nvEncOpenEncodeSessionEx(&encodeSessionExParams, &m_pEncodeSession) return: 15"

    The only thing, when I inspect video properties, it says the color space is unknown. I believe this is what smirontsev was referring to.

    This should be fixed in version 0.2.0 now. It is available in the regular voukoder download section.

    Code
    Color range                              : Full
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.709

    It's just strange DVR is using the 0-255 range as default (auto). AFAIK 16-235 is standard.

    Thank you for the "prototype," It definitely works!

    Well, I have to admit it's more than a prototype already. :) Development was surprisingly easy. I just wanted it to be careful as the whole plugin was not thoroughly tested and basically just a quick hack of 2 days work.

    I just tested it on Getty, and the great news - generated ProRes passed the Getty's automatic QualityControl on ESP. Before that day, only two converters out of many I tried have been passed: Acrovid FootageStudio 4K and ProDad Mercalli (which is not exactly a converter but can be used like this).

    That's really awesome! Good to know.

    Another question, will be color_range, colorspace, and color_primaries be supported?


    static PropertyID pIOPropColorPrimaries = "clrPrimaries"; // int16_t

    static PropertyID pIOTransferCharacteristics = "clrTransfer"; // int16_t

    static PropertyID pIOColorMatrix = "clrMtx"; // int16_t

    Very good point. Thats whats currently still left and what I was looking in today.

    • ColorRange will be set in the next version
    • Voukoder also needs this fields to be set. Unfortunately the values are not defined/documented in the DVR plugin SDK. So I don't know how to map these values.
      • frameData.colorSpace (pIOColorMatrix )
      • frameData.colorPrimaries (pIOPropColorPrimaries)
      • frameData.colorTransfer (pIOTransferCharacteristics)

    And it is used by default, right?

    Yes, I used "prores_ks" for voukoder as I was told it is the best implementation.