Movie Stud15 - NVEC encoding awful encoding performance, not using GPU

whatdoido wrote on 4/3/2018, 2:00 PM

One of the reasons I upgrade from MSP13 to 15 was because of claims of hardware accelerated NVENC and the positive links like this:

https://www.vegascreativesoftware.info/us/forum/any-improvement-in-rendering-speed-with-vegas-pro-15--108314/#ca667331

However from my current experience, version 15 barely improves on GPU encoding. So I want to know if we've been sold snake oil or it's user or error "work in progress"!!!

 

My system is old, an 8x core i7 870 12GB RAM Win7x64 machine, but the GPU is a GTX1060 3GB card.

For a simple comparison to demonstrate a point, I took a 6min 23sec GoPro file that is 2.7k @ 24fps and I want to downsize to 1080, no edits added to timeline. I run this through MSP15 MagixAVC/AAC MP4 Internet HD1080 NVEC (CBR and high performance) and MSP15 took 6 MINUTES. The CPU is at about 70-90% but the GPU (through GPUz) is only 13-16% utilised

As a programmer in my former life it is very clear to me the GPU is not being used correctly.

 

To prove that my system is not the bottleneck, I dual boot to linux and run a NVEC enabled ffmpeg. I downsize the same GoPro file from the same harddisk and write the output to the same output disk as used by MSP.

.... and ffmpeg it took 31 SECONDS !!! Yes MSP15 vs ffmpeg/linux is not direct comparison and the encoding options are not exactly the same but, COME ON, the new NVEC Movie Studio is clearly not working as expected.

ffmpeg was using full h/w transcode, using the GPU memory and not system memory. When I force ffmpeg to h/w decode/encode but with system memory, it takes a little over 2mins 30seconds (still better than MSP) and CPU only takes closer to 10mins.

 

MAGIX - Comments/thoughts please.

 

--- ffmpeg command for reference

# full h/w decode/encode using gfx card memory - remove "-hwaccel cuvid" to disable

ffmpeg -y -hwaccel cuvid -c:v h264_cuvid -i gopro.mp4 -vf scale_npp=-1:1080 -c:a copy -c:v h264_nvenc /export/public/foo.mp4

 

 

Comments

fr0sty wrote on 4/3/2018, 7:30 PM

Using GPUz, I get about 50-60% GPU usage on average when using NVENC with Vegas, with about 3-4gb VRAM usage. Windows would say 12-13%, but not GPUz. I'm using a 970GTX. I get about 75% real time when doing 4K multicamera encodes.

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)

Former user wrote on 4/3/2018, 11:10 PM

My system is old, an 8x core i7 870 12GB RAM Win7x64 machine, but the GPU is a GTX1060 3GB card.

For a simple comparison to demonstrate a point, I took a 6min 23sec GoPro file that is 2.7k @ 24fps and I want to downsize to 1080, no edits added to timeline. I run this through MSP15 MagixAVC/AAC MP4 Internet HD1080 NVEC (CBR and high performance) and MSP15 took 6 MINUTES. The CPU is at about 70-90% but the GPU (through GPUz) is only 13-16% utilised

As a programmer in my former life it is very clear to me the GPU is not being used correctly.

 

Brother, I confirm your findings. CPU 80-90%, GPU (gtx1070)averaging 26% (cpuz) NVENC encoding, high performance mode. Double checked no plugins or filters.

This is just crazy.

Former user wrote on 4/4/2018, 5:18 AM

@whatdoido

The examples I supplied are from fhd renders, the results are genuine, I have no connection with Magix other than that I buy their products.  In the same thread that you referenced, some other users also had good results.

It’s always best to compare Apples to Apples if at all possible.  A lot of users previously have said x264 to be superior to MC, may well be true. Apples to Oranges.

I don’t have any footage similar to your test footage to compare, perhaps you can make a short sample available for download from say dropbox?

If you do then i’ll gladly give you feedback for my laptop and PC, perhaps others can also.

That way you’ll have an idea whether its your system or some other issue.  I’ve used Nvenc on fhd and 4K and there’s always a big improvement compared to without using Nvenc, using the same input sample and for similar data output rates.

I used VP15.

 

whatdoido wrote on 4/4/2018, 6:12 AM

@Former user - I'm not calling your tests / results invalid but just highlighting my own experiences; the snakeoil comment is more at Magix marketing re: improved

Another test I ran earlier was to use a previous MSP13 project with cuts/color correction/color curves (that also used a GoPro 2.7k file to 1080) in MSP15.

#GTX1060, MSP15
MagixAVC/AAC MP4 Internet HD1080:  7mins 32sec
MagixAVC/AAC MP4 Internet HD1080 NVENC:  3mins 29sec

#swapping old GTX560TI into system, MSP15
SonyAVC/MVC Render with GPU if available: 4mins 41sec

so we can see CPU only is the worst but the NVENC isn't great which is why I asked: snake oil / user error / work in progress

I'll dropbox a sample file (along with my MSP conversion and ffmpeg numbers later) - I appreciate that some of the user report performance numbers were with VP15 and not MSP15 but something surely doesn't look right, unless MSP15 NVENC encoding is different from VP15

Former user wrote on 4/4/2018, 6:30 AM

Hi Whatdoido, the Nvenc gives a still decent improvement using your 1060. Maybe the GTX 560Ti is using Cuda? Oldsmoke found similar good results with, I think, Gtx 580 using Cuda. Best is to compare your sample GoPro fottage and see whats what, RE: Nvenc.

whatdoido wrote on 4/4/2018, 7:06 AM

@Former user - I agree that SonyAVC Gtx560ti compared to MagixAVC GTX1060 is a slight improvement but its not quite the same gains as ffmpeg/NVENC which is appears to be truely using the card/what is possible on the system.

I'll record some dummy GoPro 2.7k footage and dropbox it along with my numbers - the one I used for the ffmpeg comparisons is from a family/friends gathering.

GroovyWill wrote on 4/4/2018, 9:18 AM

I have similarly been haivng issues in rendering in Studio 15, but I'm not a programmer so I don't know everything about encoding and render settings and whatnot. What I've been trying to accomplish here is 1080p 60FPS - standard YouTube video. I get it, but I keep getting these instances where frame overlap eachother. They shouldn't. At all. I've been rendering on Studio Platinum 14 for a long time, using the MainConcept AAC thing and when I cranked everything up, it worked totally fine. Now I'm having those double-framing issues again in Studio Platinum 14 with those same issues.

Now, I upgraded to 15 last month, and when I couldn't render properly there, I said, "ah, I'll mess with it later" and came back to 14, and now 14's messing it all up. I don't like this. Any ideas on how to possibly fix this?

Former user wrote on 4/4/2018, 10:23 AM

@Former user - I agree that SonyAVC Gtx560ti compared to MagixAVC GTX1060 is a slight improvement but its not quite the same gains as ffmpeg/NVENC which is appears to be truely using the card/what is possible on the system.

Bro, your nvenc isn't working. nor is mine. but it used to, just doesn't now for some reason. When nvenc does work, cpu is low, as is GPU because nvenc is a custom asic, like a special chip on GPU that only does 2 things, encode/decode. In example you gave possibly the only thing GPU was doing was decoding video & scaling from the high resolution to 1080p render.

I have no idea why GPU is broken with vegas now. Some say it's windows updates.

 

whatdoido wrote on 4/4/2018, 4:52 PM

FWIW, downsizing 2.7k mp4 to 1080 mp4

GoPro 2.7K 23.976fps, 328MB, 1min

https://www.dropbox.com/s/4gn75vci1nyu98p/GOPR1535.MP4?dl=0

TLDR; no surprises

  • ffmpeg with NVENC full h/w dec/enc, ~7 (SEVEN) seconds (best case)
  • ffmpeg with NVENC h/w enc using system ram, ~32 seconds
  • MSP15 NVENC, 59 (FIFTY NINE) seconds

----

The NVENC options are matched as best I understand them between the presets available with ffmpeg/nvenc.

 

MSP15 build 116 encoding times:

MSP15 MagixAVC/AAC MP4 Internet HD1080 NVEC (CBR and high performance) - 59 seconds

MSP15 MagixAVC/AAC MP4 Internet HD1080 (CBR) - 1min 31 seconds

 

ffmpeg with NVENC, fully h/w enabled transcode with GPU memory:

time ffmpeg-nv -y -hwaccel cuvid  -c:v h264_cuvid -i GOPR1535.MP4 -preset hp -rc cbr -vf scale_npp=-1:1080 -c:a copy -c:v h264_nvenc foo.mp4

real    0m6.943s
user    0m1.735s
sys     0m0.915s

 

ffmpeg with NVENC, fully h/w enabled transcode with system memory:

time ffmpeg-nv -y -c:v h264_cuvid -i GOPR1535.MP4 -preset hp -rc cbr -vf scale=-1:1080 -c:a copy -c:v h264_nvenc foo.mp4
real    0m32.322s
user    0m31.352s
sys     0m0.792s

 

ffmpeg 3.3.2 CPU encoding only:

time ffmpeg -y -i GOPR1535.MP4 -cbr -vf scale=1920:1080 -c:a copy -c:v libx264 foo.mp4
real    1m38.173s
user    12m17.288s
sys     0m1.911s

 

Former user wrote on 4/4/2018, 5:42 PM

Saw your upload just a a while ago, laptop results follow. See my profile for basic machine specs.

I’ll do the PC tomorrow, been slaving over a hot keyboard all day😂

Timeline playback at best full was always 23.976.

Output template ..

Profile Main

I used a Default/VBR data rate of 24/20.

Finished FHD file size of 147 mb, 149 mb for Nvenc render.

FPS 23.976

 

Times to render ..

Non Nvenc ... 2:59s ... Cpu mostly 100% .. Gpu mostly at 1%

With Nvenc .. 0:31s ... Cpu constantly varying between 100% and about 50% .. Gpu max about 21%

Using Nvenc Preset of High Quality and RC mode of VBR - High Quality took an extra 2 seconds, 0:33s.

Although it appears in the non Nvenc mode that i'm not getting much from “Gpu acceleration of video processing “ when I disabled it the render time went up to 3:19s.

 

PC ...

non nvenc 2:20s

With nvenc 0:25s

With QSV 0:25s

whatdoido wrote on 4/5/2018, 4:07 AM

@Former user - your NVENC result at 31seconds is remarkably similar to my ffmpeg/NVENC numbers (h/w enc using system ram). So for you it looks like your setup is h/w accelerated.


BUT are you using Pro15? I'm using StudioPlatinum15. Any chance that you can install the trial version of MSP15 and rerun the same test on your laptop to rule out that NVENC handling is the same between the two Magix products?

 

Former user wrote on 4/5/2018, 7:08 AM

I think we're trying to resolve 2 issues here at once, 1) Nvenc and non nvenc render times, 2) How Magix Nvenc render encoding compares to ffmpeg.

I think its easier to deal with say no. 1) first, then move onto 2).

Can you use similar render settings (see my output template settings above) that I have used, in your SP15 with nvenc and without nvenc?

Then post the two results, with and without nvenc.

I've added the PC results to the laptop results above.

whatdoido wrote on 4/5/2018, 1:00 PM

To match your encoding environment:

Profile=main
MSP15 MagixAVC/AAC MP4 Internet HD1080 NVEC (preset=default, RC=VBR) - 1min 6seconds
MSP15 MagixAVC/AAC MP4 Internet HD1080 (VBR) - 3min 40 seconds
Driver version: 391.24 (latest on their website 391.35)

As expected .. terrible results from MSP15. Are you able to run MSP15 on your machines to see if it's a MSP15 vs VP15 issue?

Former user wrote on 4/5/2018, 4:18 PM

Tried also your sample on a friends laptop using VP15 ..

Acer Aspire i3 4005U 1.7 ghz, Gpu Intel Haswell GT2 ..

Non QSV 11.45s

With QSV 1:38s

 

MSP15 ... on my Acer Predator laptop...

Non  Nvenc 3:02s

With Nvenc 0:32s

Former user wrote on 4/5/2018, 6:31 PM

@Whatdoido

I noticed that gpu acceleration is off by default on installation of MSP15, I assume you’ve confirmed it’s enabled for your tests? .. Options/Preferences/Video/ “GPU acceleration of video processing:” list box.

whatdoido wrote on 4/6/2018, 6:59 AM

@JN_ - Appreciate your time on this. Yes, always been enabled:

"Options/Preferences/Video/ “GPU acceleration of video processing:” -> NVIDIA corporation (GeForce GTX1060 3GB)

I bumped the "Max number of rendering threads" = 48 and still no difference in times.  I notice that on the video preview, the frame counter runs and then stops and then runs again.  

What version of the graphics driver do you have?  I upgraded to 391.35 and no difference - I know you're on Win10 (i'm Win7) but this is the last set of straws to clutch... given Magix appear to be totally uninterested in this problem

Former user wrote on 4/6/2018, 7:45 AM

Laptop is 384.94, PC is 391.05

The improvement may simply vary from machine to machine. I know you have better results with ffmpeg, but are the output file sizes and data rates similar to the Magix output? If you can put together a command line for ffmpeg, to match the Magix template we’re using, ill run it and compare. I have the latest static download, but the samples you posted gave me error messages. I ran them in a dos cmd box.

In the example thread below, see very last post, BrianK, he is using GoPro footage and delighted with just less than real time, yours is just barely over real time, of course he may have fx added, but he was only using fhd, not 2.7k footage.

Ideally if some other users downloaded your sample footage and had a PC close to your specs, with a gtx 1060 it would be useful.

https://www.vegascreativesoftware.info/us/forum/vegas-movie-studio-15-update-1-general-discussion--110832/

ggrussell wrote on 4/6/2018, 10:17 AM

Using GPUz, I get about 50-60% GPU usage on average when using NVENC with Vegas, with about 3-4gb VRAM usage. Windows would say 12-13%, but not GPUz. I'm using a 970GTX. I get about 75% real time when doing 4K multicamera encodes.


Which GPU sensors were you looking at? In my tests for VMS Platnium 15 using the Magix codec, GPU CORE clock was maxed out, but the GPU LOAD was only 8-10% and the Video engine was 0%. So appears my GTX1060 was being used, but not FULLY utilized.

If the install for VMS15 recognizes a compatible GPU, the GPU acceleration should be on by default.

Former user wrote on 4/6/2018, 10:31 AM

Hi ggrussell, I appreciate that your post is directed to whatdoido. It appears that MSP15 installs with GPU Acceleration off, in my case anyway, I then enabled it, and the GPU acceleration was then used by MSP15.

ggrussell wrote on 4/6/2018, 10:44 AM
I used VP15.

Since we are in the Vegas Movie Studio Forum, you can not compare Vegas Pro 15 rendering. As you say, Apples to oranges.

ggrussell wrote on 4/6/2018, 10:46 AM

JN_
Hi ggrussell, I appreciate that your post is directed to whatdoido. It appears that MSP15 installs with GPU Acceleration off, in my case anyway, I then enabled it, and the GPU acceleration was then used by MSP15.

See my last response to your fist post. Can't compare Vegas Pro rendering to Vegas Movie Studio. I doubt they use the exact same Codecs or programing code. I have tried every conceivable combination to get VMS15 to use nvenc and it just isn't as fast as you posted. I'll just go back to the competitor NLE when I need fast render.

whatdoido wrote on 4/6/2018, 11:18 AM

@ggrussell

JN_ was kind enough to run numbers on his setup (VP15) with my test footage which showed his GTX1080 (my GTX1060) on VP15 was significantly faster; I asked him subsequently to try with MSP15 and his timings were comparable to his VP15 numbers.

At least for JN_, MSP vs VP encoding is h/w accelerated for his GTX1080.

My observations re: GPU clock/core utilisations matches yours. At this is pointing, it is looking like MSP accelerates/utilises the GTX1080 and GTX1060 cards differently. I say this because I have the ffmpeg numbers that are smashing through the encoding.

BrianK wrote on 4/6/2018, 12:16 PM

I’m happy to participate in this test but maybe started with low expectations and even less knowledge.

In any event my renders are much faster in MSP15. I have a recently installed a late model Nvidia Quadro P4000 which may deserve the credit. But as measured by Windows 10, the overall gpu utilization on my sample project maxed out at only about 18%

I have a 4K project to process next week from a Sony cam and I am interested to see how well that renders.

Former user wrote on 4/6/2018, 1:05 PM

Hi BrianK, these are the basic templates I've used, with and without Nvenc on WHATDOIDO'S test sample.

“GoPro 2.7K 23.976fps, 328MB, 1min

https://www.dropbox.com/s/4gn75vci1nyu98p/GOPR1535.MP4?dl=0”

Profile Main

I used a Default/VBR data rate of 24/20.

Finished FHD file size of 147 mb, 149 mb for Nvenc render.

FPS 23.976