Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: Jan Gruuthuse on March 29, 2015, 12:29:14 PM

Title: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: Jan Gruuthuse on March 29, 2015, 12:29:14 PM
QuoteBecause of its improved performance and quality, NVIDIA is focusing all future video encoding development on NVENC, which is the dedicated encoding hardware engine first added in Kepler family of GPUs. NVIDIA no longer supports NVCUVENC, which was the CUDA-based video encoder library. NVENC is replacing the earlier CUDA software-based NVCUVENC driver module. On Quadro and Tesla, 341.05 is the last driver to support NVCUVENC. NVCUVENC will not be available with GeForce after R337.
source: NVIDIA VIDEO CODEC SDK (https://developer.nvidia.com/nvidia-video-codec-sdk)

QuoteSUPPORTED NVIDIA GPUS FOR NVENC SDK*

    NVIDIA Quadro K4000 and above ââ,¬â€œ Desktop Workstation starting from € 750
    NVIDIA Quadro K2000M and above ââ,¬â€œ Mobile Workstation starting from € 420
    NVIDIA Tesla K10 and above ââ,¬â€œ High Performance Computing starting from € 3.250
    NVIDIA GRID ââ,¬â€œ Virtual Desktops & Applications not sure if K1 (starting from € 2.120) would do or if K2 (starting from € 3.900) would be required
    NVIDIA GeForce - and all others not in the list above (Kepler and Maxwell GPUs) - Desktop and Mobile Computers ââ,¬â€œ limited to 2 encode sessions per system
            GTX980 starting from € 550

QuoteSupport for HEVC (H.265) encoding on GM20x GPUs (GTX980 and future Quadro/Tesla/GRID platforms based on GM20x GPUs)

Would this exclude the GTX970 and GTX960 as a valid option?
What would be the minimum requirement for avidemux 2.6 branch to keep up with progress?

Seeing these avidemux developments:
- Encoder: nvenc through ffmpeg
- nvenc/core

As for now: just put my new video card purchase on hold

* prices shown, researched/found by me on 2015/03/29 based upon (Netherlands pricing)
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: mean on March 29, 2015, 01:50:23 PM
I only buy passive video card for my main desktop
So i wont be using the h265 encoding unit for some times
On the other hand, the h264 one seems to work fine with low cost cards as long as they are recent enough (and not older gen renamed)
It's not 100% working yet
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: Jan Gruuthuse on March 29, 2015, 02:58:14 PM
Fair enough.
I seem only to find semi-passive GM206 (GTX 960). Require 4K output for gimp photo editing.
Complete passive would be GTX 750, but these are only Maxwell GM107 instead of GM2xx.

Perhaps something like asus GTX750-DCSL-2GD5 (with display port) 750-ti has no display port. Still have some months before buying (June - July upcoming summer sales)
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: Jan Gruuthuse on March 30, 2015, 09:05:48 AM
Just found out, still need testing.
GT 520 is still supported with:
QuoteOpenGL Vendor: NVIDIA Corporation
OpenGL Renderer: GeForce GT 520/PCIe/SSE2 1024MB (810/535MHz)
OpenGL: 4.5.0 NVIDIA 346.47
Compiler: GCC 4.8 + CUDA 5.5

vdpauinfo:
---------
API version: 1
NVIDIA VDPAU Driver Shared Library  346.47
I'm now rebuilding avidemux against this driver.
Are other requirements needed?
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: Jan Gruuthuse on March 30, 2015, 09:11:49 AM
**************************
***  Optional Library  ***
***      Summary       ***
**************************
*** Video Encoder      ***
    NVENC          No
would the SDK Updated (NVENC SDK 5.0): Janurary 31, 2015 satisfy the requirements?
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: Jan Gruuthuse on March 30, 2015, 09:50:12 AM
installed: cuda (7.0-28)
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: Jan Gruuthuse on March 30, 2015, 12:00:40 PM
now trying with cuda-*-6-5
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: mean on March 30, 2015, 05:05:13 PM
driver >= 346
nvenc SDK 5.0
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: Jan Gruuthuse on March 31, 2015, 04:09:11 AM
Have both and was able to build the samples.
I understood I needed to place the file nvEncodeAPI.h into /usr/include/x86_64-linux-gnu
avidemux did build when it found nvEncodeAPI.h

Anything more needed from nvenc 5.01 sdk? And where do I put those?
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: Jan Gruuthuse on March 31, 2015, 05:14:43 AM
can't install QT4 plugins
Unpacking avidemux3-plugins-qt4 (2.6.8-150331) over (2.6.8-150329) ...
dpkg: error processing archive /home/jan/avidemux2/debs/avidemux3-plugins-QT4-2.6.8-150331-Linux.deb (--install):
trying to overwrite '/usr/lib/ADM_plugins6/videoEncoders/libADM_ve_ffNvenc.so', which is also in package avidemux3-plugins-common 2.6.8-150331
dpkg-deb (subprocess): decompressing archive member: internal gzip write error: Broken pipe
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg-deb (subprocess): cannot copy archive member from '/home/jan/avidemux2/debs/avidemux3-plugins-QT4-2.6.8-150331-Linux.deb' to decompressor pipe: failed to write (Broken pipe)


For inspection, if required: 10.2 MB download (other users please don't install this test build) (https://www.dropbox.com/s/0u5s8s4v1j27s38/avidemux3_2.6.8-150331-64bit_14.04_LTS-Trusty-x265-1-5-debs.tar.gz?dl=0)
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: Jan Gruuthuse on April 02, 2015, 07:26:13 AM
Today's build did install and runs: Avidemux v2.6.8 20150402 (4b502d0).
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: Jan Gruuthuse on April 02, 2015, 01:36:45 PM
2 encoders show up:
H264 (nvidia)
H264 (ff/nvidia)
Trying to encode with default settings, brings this pop-up window:
Cannot setup codec. Bitrate too low?
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: mean on April 02, 2015, 04:51:16 PM
the nvidia one is not finished
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: mean on April 06, 2015, 09:20:09 AM
ffnvenc should work now
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: Jan Gruuthuse on April 06, 2015, 09:41:51 AM
with bff0be8 still did get bitrate to low message.
showing: H264 (ff/nvidia)
no longer showing: H264 (nvidia)
Title: No NVENC capable devices found
Post by: Jan Gruuthuse on April 06, 2015, 10:19:00 AM
build fc163e9 not working: No NVENC capable devices found
[HandleAction]  ************ VIDEO_CODEC_CHANGED **************
  [HandleAction]  ************ SAVE_VIDEO **************
  [refresh]  [Vdpau]Rrefresh
  [renderCompleteRedrawRequest]  RedrawRequest
  [admSaver]  [Save] Encoder index=4
  [save]  Audio starting time 01:13:44,640
  [save]  [A_Save] Saving..
[VideoFilterBridge] Creating bridge from 4424 s to 4449 s
[seektoTime]  First frame of the new segment is a keyframe at 4424640ms
  [DecodePictureUpToIntra]   DecodeUpToInta 110798 ref:0
[edCache] Flush
[goToTimeVideo]  Seek done, in reference, gone to 4424640000 with segment start at 0
  [ADM_coreVideoEncoderFFmpeg]  It is probably field encoded, doubling increment
  [ADM_coreVideoEncoderFFmpeg]  [Lavcodec] Using a video encoder delay of 0 ms
  [ADM_ffNvEncEncoder]  [ffNvEncEncoder] Creating.
[ff] Time base 1/50
[adm_lavLogCallback]  [lavc] No NVENC capable devices found
[ff] Cannot open codec
[setup]  [ffMpeg] Setup failed
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: mean on April 06, 2015, 12:09:28 PM
what is the output ?
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: Jan Gruuthuse on April 07, 2015, 04:33:49 AM
H264 (ff/nvidia)
----------------
display and HWaccel: vdpau:
Output Format on avi, dummy, flv, mmp4, mp4v2, mkv, mpeg-ps, video only
mpeg-ts: hangs
[HandleAction]  ************ SAVE_VIDEO **************
  [refresh]  [Vdpau]Rrefresh
  [renderCompleteRedrawRequest]  RedrawRequest
  [admSaver]  [Save] Encoder index=4
  [save]  Audio starting time 00:00:00,000
  [save]  [A_Save] Saving..
[VideoFilterBridge] Creating bridge from 0 s to 10 s
[convertLinearTimeToSeg]  Frame time=0, taking first segment
  [goToTimeVideo]  Fixating start time to 400 ms
  [seektoTime]  First frame of the new segment is a keyframe at 400ms
  [DecodePictureUpToIntra]   DecodeUpToInta 0 ref:0
[edCache] Flush


Display and HWaccel: LIBVA
Output Format on avi, dummy, flv, mmp4, mp4v2, mkv, mpeg-ps, video only
mpeg-ts: signal 6
[HandleAction]  ************ SAVE_VIDEO **************
  [refresh]  [libva]Rrefresh
  [renderCompleteRedrawRequest]  RedrawRequest
  [admSaver]  [Save] Encoder index=4
  [save]  Audio starting time 00:00:00,000
  [save]  [A_Save] Saving..
[VideoFilterBridge] Creating bridge from 0 s to 10 s
[convertLinearTimeToSeg]  Frame time=0, taking first segment
  [goToTimeVideo]  Fixating start time to 400 ms
  [seektoTime]  First frame of the new segment is a keyframe at 400ms
  [DecodePictureUpToIntra]   DecodeUpToInta 0 ref:0
[edCache] Flush
[adm_lavLogCallback]  [lavc] mmco: unref short failure
  [goToTimeVideo]  Seek done, in reference, gone to 400000 with segment start at 0
  [ADM_coreVideoEncoderFFmpeg]  It is probably field encoded, doubling increment
  [ADM_coreVideoEncoderFFmpeg]  [Lavcodec] Using a video encoder delay of 0 ms
  [ADM_ffNvEncEncoder]  [ffNvEncEncoder] Creating.
[ff] Time base 1/50
[adm_lavLogCallback]  [lavc] No NVENC capable devices found
[ff] Cannot open codec
[setup]  [ffMpeg] Setup failed
*** Error in `/usr/bin/avidemux3_qt4': free(): invalid pointer: 0x0000000003cbbd70 ***


Display: XVideo HWaccel: none
Output Format on avi, dummy, flv, mmp4, mp4v2, mpeg-ps, video only
mkv: freezes:[HandleAction]  ************ SAVE_VIDEO **************
  [refresh]  XV:refresh
  [admSaver]  [Save] Encoder index=4
  [save]  Audio starting time 00:00:00,000
  [save]  [A_Save] Saving..
[VideoFilterBridge] Creating bridge from 0 s to 10 s
[convertLinearTimeToSeg]  Frame time=0, taking first segment
  [goToTimeVideo]  Fixating start time to 400 ms
  [seektoTime]  First frame of the new segment is a keyframe at 400ms
  [DecodePictureUpToIntra]   DecodeUpToInta 0 ref:0
[edCache] Flush
[adm_lavLogCallback]  [lavc] mmco: unref short failure
  [goToTimeVideo]  Seek done, in reference, gone to 400000 with segment start at 0
  [ADM_coreVideoEncoderFFmpeg]  It is probably field encoded, doubling increment
  [ADM_coreVideoEncoderFFmpeg]  [Lavcodec] Using a video encoder delay of 0 ms
  [ADM_ffNvEncEncoder]  [ffNvEncEncoder] Creating.
  [setupInternal]  Codec configured to use global header
[ff] Time base 1/50
[adm_lavLogCallback]  [lavc] No NVENC capable devices found
[ff] Cannot open codec
[setup]  [ffMpeg] Setup failed

mpeg-ts: signal 6
[HandleAction]  ************ SAVE_VIDEO **************
  [refresh]  XV:refresh
  [admSaver]  [Save] Encoder index=4
  [save]  Audio starting time 00:00:00,000
  [save]  [A_Save] Saving..
[VideoFilterBridge] Creating bridge from 0 s to 10 s
[convertLinearTimeToSeg]  Frame time=0, taking first segment
  [goToTimeVideo]  Fixating start time to 400 ms
  [seektoTime]  First frame of the new segment is a keyframe at 400ms
  [DecodePictureUpToIntra]   DecodeUpToInta 0 ref:0
[edCache] Flush
[adm_lavLogCallback]  [lavc] mmco: unref short failure
  [goToTimeVideo]  Seek done, in reference, gone to 400000 with segment start at 0
  [ADM_coreVideoEncoderFFmpeg]  It is probably field encoded, doubling increment
  [ADM_coreVideoEncoderFFmpeg]  [Lavcodec] Using a video encoder delay of 0 ms
  [ADM_ffNvEncEncoder]  [ffNvEncEncoder] Creating.
[ff] Time base 1/50
[adm_lavLogCallback]  [lavc] No NVENC capable devices found
[ff] Cannot open codec
[setup]  [ffMpeg] Setup failed
  [~ADM_ffNvEncEncoder]  [ffNvEncEncoder] Destroying.
  [stopThread]  Destroying threadQueue
  [~ADM_threadQueue]  Killing audio thread and son
  [refresh]  XV:refresh
  [refresh]  XV:refresh
*** Error in `/usr/bin/avidemux3_qt4': free(): invalid next size (fast): 0x00000000054ae910 ***


could there still be an issue:
I manually copied nvEncodeAPI.h into /usr/include/x86_64-linux-gnu
Is there a procedure to install nvenc correctly?
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: mean on April 07, 2015, 05:07:03 AM
It's trying to load :
libnvidia-encode.so.1
libcuda.so"

make sure you have them
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: Jan Gruuthuse on April 07, 2015, 05:29:21 AM
libcuda.so:
libnvidia-encode.so.1:
both are there:
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: Jan Gruuthuse on April 07, 2015, 08:30:53 AM
After building the samples in /usr/local/cuda/samples with make
found in /usr/local/cuda/samples/bin/x86_64/linux/release these tools: deviceQuery and deviceQueryDrv (in device.zip attached)
./deviceQuery
Quote./deviceQuery Starting...

CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "GeForce GT 520"
  CUDA Driver Version / Runtime Version          7.0 / 6.5
  CUDA Capability Major/Minor version number:    2.1
  Total amount of global memory:                 1023 MBytes (1072889856 bytes)
  ( 1) Multiprocessors, ( 48) CUDA Cores/MP:     48 CUDA Cores
  GPU Clock rate:                                1620 MHz (1.62 GHz)
  Memory Clock rate:                             535 Mhz
  Memory Bus Width:                              64-bit
  L2 Cache Size:                                 65536 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536, 65535), 3D=(2048, 2048, 2048)
  Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 32768
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  1536
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (65535, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device PCI Bus ID / PCI location ID:           1 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 7.0, CUDA Runtime Version = 6.5, NumDevs = 1, Device0 = GeForce GT 520
Result = PASS
./deviceQueryDrv
Quote./deviceQueryDrv Starting...

CUDA Device Query (Driver API) statically linked version
Detected 1 CUDA Capable device(s)

Device 0: "GeForce GT 520"
  CUDA Driver Version:                           7.0
  CUDA Capability Major/Minor version number:    2.1
  Total amount of global memory:                 1023 MBytes (1072889856 bytes)
  ( 1) Multiprocessors, ( 48) CUDA Cores/MP:     48 CUDA Cores
  GPU Clock rate:                                1620 MHz (1.62 GHz)
  Memory Clock rate:                             535 Mhz
  Memory Bus Width:                              64-bit
  L2 Cache Size:                                 65536 bytes
  Max Texture Dimension Sizes                    1D=(65536) 2D=(65536, 65535) 3D=(2048, 2048, 2048)
  Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 32768
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  1536
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size (x,y,z):    (65535, 65535, 65535)
  Texture alignment:                             512 bytes
  Maximum memory pitch:                          2147483647 bytes
  Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Concurrent kernel execution:                   Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device PCI Bus ID / PCI location ID:           1 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
Result = PASS
rename device.zip to device.7z (is 7zipped)
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: Jan Gruuthuse on April 07, 2015, 12:39:22 PM
nvidia-smi
QuoteTue Apr  7 14:36:07 2015       
+------------------------------------------------------+                       
| NVIDIA-SMI 346.47     Driver Version: 346.47         |                       
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GT 520      Off  | 0000:01:00.0     N/A |                  N/A |
| 40%   33C    P0    N/A /  N/A |    762MiB /  1023MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0              C   Not Supported                                         |
+-----------------------------------------------------------------------------+
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: mean on April 07, 2015, 05:05:24 PM
I dont think your video card supports nvenc
I had a 610GT which is similar and it was not supported
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: Jan Gruuthuse on April 08, 2015, 04:56:44 AM
That would explain this.
So we are back @ minimum requirement would be an nvidia GPU GM10x or GM20x
Title: Re: nvidia move towards NVENC away from CUDA software-based NVCUVENC
Post by: Jan Gruuthuse on April 15, 2015, 03:51:55 PM
and working with
Quote[ADM_coreVideoEncoderFFmpeg]  [Lavcodec] Using a video encoder delay of 0 ms
  [ADM_ffNvEncEncoder]  [ffNvEncEncoder] Creating.
  [setupInternal]  Codec configured to use global header
[ff] Time base 1/50
[setup]  [ffMpeg] Setup ok
[StreamProcess] Stream 1920x1080, codec : H264
[StreamProcess] Average FPS1000=50000
[StreamProcess] Video Encoder Delay=0ms
[goToTime]   go to time 0,00 secs
  [convertLinearTimeToSeg]  Frame time=0, taking first segment
  [goToTime]  => seg 0, rel time 0,00 secs
Had to do some HW upgrades, replaced
- GT520 by GTX960 (required PCIe 3.0)
- motherboard MS-7680 (H67 chipset PCIe 2.0) by Z77 extrem3 (Z77 chipset PCIe 3.0)
switching to LGA 2011ââ,¬â€˜3 was too expensive, for now.