Posts by avwtp

    Created a different setup that don't hit the memory issue and it all work. Found my problem ... hidden in the output.

    >> BTW, I had a saved preset that I'd transferred from my usual machine to the one I was using for this test. That preset had audio configured to use Fraunhofer but the new machine didn't have the DLL. In the audio settings panel it said I was using regular FFmpeg AAC (no Fran listed) but then I noticed libfdk-aac in the summary panel. End result it that it errored out.


    I combined to issues (sorry), first one is where I've included log files. Under conditions plugin can not see/connect to GPU. Pretty sure there is a bug here somewhere.

    2nd is the issue with FFMPEG sucking up GPU memory and not leaving enough for noise reduction plugin that is configured to use NVENC. For this memory sucking, I seem to remember FFMPEG automatically increasing the "Surfaces" (??). Reason I see this as an FFMPEG issue is that I can frameserve the encoding to a 3rd party (TMPGEnc Video Mastering Works) encoder that is configured to use NVENC and it all works fine. I looked at the GPU memory load and it was WAY lower than Voukoder/FFMPEG.

    On a related note, is there any way to restrict the amount of GPU memory NVENC sucks up? I foolishly got a card with 2GB (old System had 3GB) and to do further testing on the problem I tried to set it up so I'd have 1st part of the encode without competing usage of the GPU (NVENC get's GPU 0) but that didn't work as the effect needs somewhere > 1GB of GPU ram and NVENC is taking it all.

    OK, finally had the time and the killer Effect to make this happen consistently (at least on one machine).

    Attached are the logs. Big takeaway is that the Noise Reduction effect that I'm using is GPU intensive and can utilize it up to 100%. I have it limited to using no more than 50% of video card memory.

    No Effect.log = is the work area without an effect

    Compile Error.log = example of entry into Media Encoder dialog (from PPro) with minimal GPU activity prior entry/encode

    No Exit Message.log = mucking with the Effect (GPU used by Effect), then entry/encode

    Total Hang.log = entry into Media Encoder dialog, moving the Current Location bar and getting "Rendering" messages a few times. THEN starting encode.

    Interesting on my older machine (GeForce 950 and Intel i7-3770) sometimes it did work just really slowly but on my fancy new GeForce 1080 (2GB) and Amd Ryzen 3900x, consistent failure.



      (175.63 kB, downloaded 4 times, last: )

    Even if NVENC/AMD support is going to be "better" (speed doesn't always translate to better) natively, the Adobe Main Concept encoder is nowhere near as good or controllable as x264.

    The biggest reason for me to use the native NVENC is to get around the ffmpeg "feature" of limiting video stream to 1 slice (and hence breaking BluRay compatibility for 4.1/4.2 steams).

    Zones option DOES actually get recognized and works. Value just doesn't stick between entries into the dialog.

    Good to know on qpmax. Maybe a note in the tooltip pop is to state the maximum.

    OK, so I can ignore "helping" FFmpeg on surfaces :)


    A few of the options are reset by the plugin to lower values or not retained between successive entries into the dialog.

    * Max Quantizer limited to 69

    * Zones is cleared each time options is entered (but the Zones values will work on a single run)

    * Frame lookahead is clamped at 250

    for NVENC

    * Surfaces is clamped at 64 but if you look at a log message, internally it is increased

    Was the R2 version in the same directory as the newly installed 4.1? When I by accident had both the system (note I'm using 2016), "Vouloder" showed as an option but "Voukoder R2" did not.

    I'm seeing a startup lag with Fraunhofer, which then causes everything to be off. Here is the PPro display with a 29.97 fps project with orig, AC3 and Fraunhofer. Timeline V1/A1 work area used to generate the AC3 and fran clips:

    pasted-from-clipboard.png    pasted-from-clipboard.png

    Notice that AC3 is also little lagging. No lag using FFMPEG AAC. libfdk-aac-2.dll with 2/6/2020 date was I assume added during plugin install.

    This will probably take a while to narrow this down and it may be similar to another bug posted regarding "GPU fail". Just want to put this in as a placeholder for future updates.

    But what I'm seeing is that if I have Effects plugins that use the GPU on the first clip of the work area (that is being encoded), Voukoder sometimes blows.

    [16:52:15] ---------------------------------------------

    [16:52:15] Opening codec: h264_nvenc with options: 2pass=0|aq-strength=8|b=65000000|bf=2|bluray-compat=1|bufsize=60000000|g=30|gpu=0|init_qpB=51|init_qpI=51|init_qpP=51|level=5.1|maxrate=75000000|nonref_p=1|preset=hq|profile=high|rc=vbr|rc-lookahead=300|spatial-aq=1|strict-gop=0|surfaces=64|temporal-aq=1

    [16:52:15] Failed opening codec: h264_nvenc

    [16:52:15] Unable to open video encoder: h264_nvenc

    [16:52:15] Closing encoders ...

    [16:52:15] Opening encoder failed! Aborting ...

    [16:52:15] 00000000169A6BA0

    Yep, that's one take away, thanks :)

    also document that "B frames as References" = Middle is the only option with older cards.

    * Finally, a more graceful exit (actually non-exit) with a dialog message when the nvenc encode fails at startup would help.

    -- I'm adding a feature request for this.

    I used another NVenc tool that allowed me to dump capabilities of my card:

    #0: GeForce GTX 950 (768 cores, 1329 MHz)[PCIe3x16][442.74]

    List of available features.

    Codec: H.264/AVC

    Max Bframes 4

    B Ref Mode yes

    RC Modes 63

    Field Encoding yes

    MonoChrome no

    FMO no

    Quater-Pel MV yes

    B Direct Mode yes

    CABAC yes

    Adaptive Transform yes

    Max Temporal Layers 0

    Hierarchial P Frames no

    Hierarchial B Frames no

    Max Level 51

    Min Level 1

    4:4:4 yes

    Min Width 33

    Max Width 4096

    Min Height 17

    Max Height 4096

    Multiple Refs no

    So, it looks like my 950 has Ref Mode but NOT Multiple Refs. And this works in only one way:

    * leave Number of Reference frames undefined (should be able set it to 1 but even ffmpeg errors on that).

    * Set Use B frames as references = Middle

    Output now shows:

    FFmpeg: : Video: h264 (h264_nvenc) (High), 1 reference frame,

    So the plot thickens. Running ffmpeg from the commandline on an OLD 2018 version of ffmpeg, it works fine (-refs=4). Using a new 4.2.2 build it now gets the error:

    [h264_nvenc @ 0000000002d49800] Multiple reference frames are not supported by the device

    [h264_nvenc @ 0000000002d49800] Provided device doesn't support required NVENC features

    Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters

    such as bit_rate, rate, width or height

    Conversion failed!

    So I found (thank you google) a bug report with ffmpeg that explains what's going on:


    The -refs option used to be used to control the dpb size of nvenc.

    With the latest generation of cards and SDKs, nvidia added support for actually using multiple reference frames.

    That series of patches brings nvenc in line with libx264 in what the -refs option does.

    As of e929b2f248a9c49761475e07d1a089e05912d1c6, the old function of -refs has its own option, -dpb_size.

    Since -refs actually controlling the dpb size very likely was not what users of the option expected or intended, it was decided to go for this slightly breaking change.

    And it seems like it worked in making you aware of the -refs option not doing what you expected it do to.


    When I ran my command line with -dpb_size 4, it works (accepts dpb_size).

    >>> So now the next question is: What chipsets DO support the -refs option?

    BTW, I have been buried in other projects and haven't been able to track Voukoder development since probably May 2019. For the most part I've been using 1.2x and an even older nvenc_export version. This new set up is a work of art! Everything in my work flow is now on 4.x and it's working cleanly. The Ref frame issue is the only outstanding issue I have. (other than FFMpeg not supporting slices=4 for NVENC but that's a separate battle outside of what you have control over).

    Sigh. Here is a 2.2 log where it works. It's just that 2.2 logging is a bit more difficult to extract. This happens to be a 4K encode but good result for 1080p. My guess is that 2.3+ is doing something wrong on what parameter it is pushing out (not refs=4) so it's erroring.

    2pass=0 aq-strength=8 b=62000000 bf=2 bluray-compat=1 bufsize=60000000 g=30 gpu=0 init_qpB=51 init_qpI=51 init_qpP=51 level=5.1 maxrate=70000000 no-scenecut=0 nonref_p=1 preset=hq profile=high rc=vbr rc-lookahead=128 refs=4 spatial-aq=1 strict-gop=0 surfaces=16 temporal-aq=1

    Also the fact that 2.3+ crashes out vs. displaying some more user friendly error message would be great to fix. Note the user friendly error message when I set refs=8. Did that code get taken out?



      (91.3 kB, downloaded 1 times, last: )

    I just hit this problem and what's odd about it for me is that setting Ref frames "worked" fine prior to 2.3. I confirmed that setting ref frames in 2.2 between 1- 4 DID work and change the encoded stream accordingly. Now in 2.3+, it aborts the encoder process and drops back to the PPro window (not pretty). Note also that in 2.2, if I set Ref Frames = 8, I get a nice dialog message after encode starts that this value is not supported.

    BTW, analyzing the 2.3+ generated streams has a ref steams = 2.



      (16.65 kB, downloaded 1 times, last: )

    It is an overclock issue. Caught me off guard.

    BIGGIE is that the if PPro or the plugin crashes, you can't get to the log file. Really want that old txt file backin $TEMP.

    Hold up it may just be my computer overclocking. Done hours of x264 at this setting, not seen it at this Ghz before.