Why is it so hard to add NVENC to Vegas?

Comments

mstvsky wrote on 6/13/2017, 8:27 AM

Hi! I'm a newbie here, as well as in video editing broadly. This topic seems appropriate for my question: What's the better set for GPU rendering?

Now in details.
I use VEGAS Pro 14.0 EDIT.
A video card is MSI GeForce GTX1070 Gaming X.
As we all know, Vegas doesn't utilize newest Nvidia GPU rendering. So, what do I do, I use DebugMode Frameserver plugin and MediaCoder for NVENC.
But there are some issues still:

If I use some plugin in my project, I. e. Vegas Deform, then GPU rendering doesn't work again.

At the end of file, there is some audio bug, as it were delay-fx applied to the last second.

There are some others, but I mentioned the most critical for me.

Hence the question: what's the better set for GPU rendering? Could we fix up the newest video cards CUDA for Vegas Pro to be compatible with? Could I use Avisynth instead of DebugMode Frameserver and ffmpeg instead of MediaCoder? How to manage it?

Musicvid wrote on 6/13/2017, 10:11 PM

You are taking up so much time with handoff to external encoders that it makes no difference, whatsoever.

This behavior indicates that you are interested in quality, to which ALL manner of hardware acceleration in Vegas is counterindicated. For the uninitiated, that means render CPU only.

Did you really want the cake, or just the frosting? (hint: you don't get both...)

NormanPCN wrote on 6/13/2017, 10:54 PM

Could I use Avisynth instead of DebugMode Frameserver and ffmpeg instead of MediaCoder? How to manage it?

Look at my previous posts in this thread. I show some example Windows batch files which I use to frame serve to ffmpeg. You can encode to x264 or NVENC or anything ffmpeg supports. My two examples show x264 and NVENC HEVC encoding.You need Avisynth, debugmode frameserver and ffmpeg (32-bit version).

I only use x264 since I want best quality. I only created NVENC to test with and see if I could get it working.

NVENC AVC is fast. A little faster than x264 superfast on my system at similar quality. x264 medium (default) is definetly better quality. At high bitrates NVENC is fine. 4Ghz i7 4770k, GTX 980.

Richvideo wrote on 6/13/2017, 11:10 PM

I think with a GTX 1070 card he has access to an updated version of NVENC-Fourth generation NVENC implements HEVC Main10 10-bit hardware encoding. It also doubles the encoding performance of 4K H.264 & HEVC when compared to previous generation NVENC. It supports HEVC 8K, 4:4:4 chroma subsampling, lossless encoding, and sample adaptive offset (SAO)--I find the GUI of Media Coder terrible, I feel it is worth purchasing this program to deal with frameserving and it allows you to output a high quality file pretty quickly http://tmpgenc.pegasys-inc.com/en/product/tvmw6.html

mstvsky wrote on 6/16/2017, 3:37 AM

Thank you for response! Just some clarification questions:

The usual frameserving requirements for having Avisynth installed. I use Avisynth+. You have to use a 32-bit version of ffmpeg because debugmode frameserver is 32-bit.

  1. Just after installing the debugmode frameserver I'm able to use it. I didn't install Avisynth additional for my described configuration. Do I have to install it though?
  2. There in a 64-bit version of AviSynth+ available. Does it matter? Or I should use the 32-bit version of ffmpeg anyway?
NormanPCN wrote on 6/16/2017, 12:51 PM

Thank you for response! Just some clarification questions:

The usual frameserving requirements for having Avisynth installed. I use Avisynth+. You have to use a 32-bit version of ffmpeg because debugmode frameserver is 32-bit.

  1. Just after installing the debugmode frameserver I'm able to use it. I didn't install Avisynth additional for my described configuration. Do I have to install it though?
  2. There in a 64-bit version of AviSynth+ available. Does it matter? Or I should use the 32-bit version of ffmpeg anyway?

1) Yes, ffmpeg does frameserving through Avisynth/Avisynth+ AFAIK.

2) Avisynth+ does have a 64-bit version but the Debugmode frameserver code is 32-bit so everything goes through 32-bit, Avisynth and ffmpeg. ffmpeg has a direct connection to the frameserver. No funky pseudo filesystem drivers are necessary. That direct connection means you have to use the same mode as the frameserver.

I have Avisynth+ 1825 installed. An installer is available. http://avisynth.nl/index.php/AviSynth%2B The last/original "stable" release of Avisynth+ does not work with newer ffmpegs.

NickHope wrote on 6/16/2017, 1:42 PM

"pinterf" has moved AviSynth+ on a lot since 1825. I have 2506 installed from here. Just overwrite the AviSynth.dll in C:\WINDOWS\System32 (x86 version) and/or C:\WINDOWS\SysWOW64 (x64 version), after using the regular installer. Or you can use Groucho's AviSynth Universal Installer, which also allows you to specify custom auto-load folders for plugins.

It's probably OK to have both x86 and x64 versions of AviSynth+ installed. At least VirtualDub will automatically use the correct one so I guess ffmpeg may too.

mstvsky wrote on 6/19/2017, 8:54 AM

😲It works, great thanks to you guys! The rendering speed is almost x5!!!
But still I have a couple of questions.

1.

REM setup PATH to include ffmpeg binaries folder
call "%~dp0set_path32.cmd"

What's that for? Where is the file? I just removed this string, can I feel OK about it?

2. Using "Vegas Deform" plugin to fix the "fisheye", it still renders via CPU. Any ideas? Maybe I can remove the "fisheye" in AviSynth+ somehow?

NormanPCN wrote on 6/19/2017, 12:08 PM

REM setup PATH to include ffmpeg binaries folder
call "%~dp0set_path32.cmd"

What's that for? Where is the file? I just removed this string, can I feel OK about it?

set_path.cmd is a script to set the path to the ffmpeg binaries. The script exists in the same folder as the other command scripts you may be using.

I don't setup ffmpeg into the global system search path and I do not put ffmpeg into the same folder as my ffmpeg command scripts. I have many ffmpeg scripts and having set_path gives me one location to edit/change the path where ffmpeg resides.

That is how I setup my system. You should do what you prefer.

On my disk if "EncodeScript" is the folder where my ffmpeg scripts reside then I have ffmpeg installed in EncodeScript\ffmpeg\bin and EncodeScript\ffmpeg32\bin. The ffmpeg folder is using the structure of the Zeranoe ffmpeg install. I have 64 and 32-bit ffmpeg installs. For normal transcoding I use the 64-bit one and for Vegas frameserving I use the 32-bit one since the frameserver is 32-bit and we are linking through 32-bit VfW.

Here is the contents of my set_path32.cmd file.

@echo off

path=%~dp0ffmpeg32\bin;%path%

 

fr0sty wrote on 6/19/2017, 2:15 PM

I wish there were a GUI available to simplify all that.

Systems:

Desktop

AMD Ryzen 7 1800x 8 core 16 thread at stock speed

64GB 3000mhz DDR4

Geforce RTX 3090

Windows 10

Laptop:

ASUS Zenbook Pro Duo 32GB (9980HK CPU, RTX 2060 GPU, dual 4K touch screens, main one OLED HDR)

Richvideo wrote on 6/19/2017, 4:53 PM

I wish there were a GUI available to simplify all that.

If you purchase this program you can avoid all of that, just import the footage using the Debugmode Frameserver and chose NVENC as your encoder http://tmpgenc.pegasys-inc.com/en/product/tvmw6.html

fr0sty wrote on 6/19/2017, 5:12 PM

Wouldn't it be nice if Magix teamed up with those folks to integrate their encoder into Vegas 15... one can dream...

Macula wrote on 7/21/2017, 7:38 AM

Isn't "cd d:\renders d:" part a bit redundant? Or maybe I am doing something wrong since it doesn't seem make any difference having it in script.

NormanPCN wrote on 7/21/2017, 11:55 AM

Isn't "cd d:\renders d:" part a bit redundant? Or maybe I am doing something wrong since it doesn't seem make any difference having it in script.

d:\renders is where I output all my stuff. You can change that to wherever you want. Any drive and/or folder. The ffmpeg command line does not use any paths so it assumes the current command line folder. So it should not need to be edited to adjust for however you want to setup.

cd d:\renders

That changes the current folder for the D drive. It does not also change the command line to the D drive as well.

D:

That changes the command line to the D drive.

If the script file is in the output folder, e.g. d:\renders, then those commands can be "redundant". Windows will default the drive/folder to the location of the script unless otherwise changed.

Macula wrote on 7/23/2017, 3:57 AM

Yea, I guess I kinda got used to entering entire address in between quotes in ffmpeg line.

tirgo-k wrote on 4/12/2018, 2:54 PM

Sorry for being off-topic, trying to understand best options to use frameserving and an external encoder, as looks like Vegas 15's internal ones have introduced issues.

Just curiuos if someone has done compression quality comparison for external x264 and TMPGEnc Video Mastering Works 5 or 6, also using CPU only, how do they compare speed wise?

I just read that TMPGEnc uses the same x264 encoder. Basically encoding quality wise they both should be the same?