rigaya release a command line H.264&H.265 encoder (https://onedrive.live.com/?cid=6bdd4375ac8933c6&id=6BDD4375AC8933C6!2293) which is based on the nvenc-Encoder from the NVIDIA SDK:
DownloadCode:NVEncC (x64) 1.01 by rigaya, build Feb 14 2015 16:43:56 avi reader: disabled avs reader: disabled vpy reader: enabled How to use: NVEncC.exe [options] -i <input file name> -o <output file name> Input is raw YUV, YUV4MPEG2 (y4m). At the time of Raw input, fps, also specify input-res is required. The output format is raw H.264 / AVC or H.265 / HEVC ES. Execution example: NVEncC -i "<avsfilename>" -o "<outfilename>" avs2pipemod -y4mp "<avsfile>" | NVEncC --y4m -i - -o "<outfilename>" Options: -h, -? display of --help Help -v, - display of version version information Check or --check-hw NVEnc is available View the available functions of the --check-features NVEnc View it knows environmental information of --check-environment NVEnc -i, - input <filename> specifies the input file name -o, - specified output <filename> output file name Input format (If not specified, automatic judgment from extension) reads the file as --raw raw reads the file as --y4m y4m reads the file as --vpy vpy reads the file as --vpy-mt vpy (mt) --input-res <int> x <int> input resolution --crop <int>, <int>, <int>, <int> left, top, right, the number of pixels cut off below -f, - fps <int> / <int> or <float> specified frame rate -c, - codec <string> Specifies the output codec h264 (or avc), h265 (or hevc) --profile <string> specified profile H.264: baseline, main, high (default) --level <string> specification of Level --sar <int>: Specify the <int> SAR (PAR, pixel ratio) --dar <int>: <int> Specifies the DAR (screen ratio) --cqp <int> or encoded at a fixed quantization amount <int>: <int>: <int> default: <I>: <P>: <B> = <20>: <23>: <25> --vbr <int> variable bit rate of the bit rate (kbps) --cbr <int> fixed bit rate of the bit rate (kbps) Default 7500 kbps --max-bitrate <int> maximum bit rate (kbps) / default: 17500 kbps --gop-len <int> number of GOP frames / default: 0 frames (automatic) -b, - bframes <int> Continuous B frame number / default 3 frames --ref <int> reference distance / default 3 frames --mv-precision <string> motion vector accuracy / default: Q-pel Q-pel ... 1/4 pixel accuracy (high precision) half-pel ... 1/2 pixel accuracy full-pel ... 1-pixel accuracy (low precision) H.264 / AVC --interlaced interlace hold encoder I use --cabac CABAC I use --cavlc CAVLC I want to enable the --deblock deblocking filter I want to disable the --no-deblock deblocking filter designation of --fullrange fullrange --videoformat <string> undef, ntsc, component, pal, secam, mac default: undef --colormatrix <string> undef, auto, bt709, smpte170m, bt470bg smpte240m, YCgCo, fcc, GBR default: undef --colorprim <string> undef, auto, bt709, smpte170m, bt470m bt470bg, smpte240m, film default: undef --transfer <string> undef, auto, bt709, smpte170m, bt470m bt470bg, smpte240m, linear, log100, log316 default: undef H.265 / HEVC I specify the maximum size of --cu-max <int> CU I specify the minimum size of --cu-min <int> CU 8, 16, 32 can be specified
Requirements:
and a Kepler or newer NVIDIA card. (H.265 encoding requires Maxwell or newer)NVEnc 0.xx requires NVIDIA driver after 334.89
NVEnc 1.xx requires NVIDIA driver after 347.09
Requires VC2013 redistributable
a. Does anyone have some experience with it?
b. Does anyone know how to interpret the 'RC Modes' value "NVEncC.exe --check-features" shows?
Cu Selur
Ps.: Hybrid will not support this encoder any time soon, since I lack a graphic card which has H.265 encoding. May be I'll add support for the H.264 encoding in a few weeks.
+ Reply to Thread
Results 1 to 30 of 92
-
Last edited by Selur; 17th Feb 2015 at 03:31.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
I assume you need a new Nvidia card for this to work? I can't get it to work and the error messages are in Japanese.
-
If you run "NVEncC.exe --check-features > features.txt" you can see what is possible with your card.
For me it's:
Code:Environment Info OS : Windows 7 (x64) CPU: Intel Core i7-4770K @ 3.50GHz [TB: 4.00GHz] (4C/8T) GPU: GeForce GTX 660 Ti (7 EU) @ 980 MHz (347.52) RAM: Total 32575 MB / Used 3690 MB 使用可能な各機能の情報を表示します。 コーデック: H.264/AVC Max Bframes 4 RC Modes 63 Field Encoding 1 MonoChrome 0 FMO 0 Quater-Pel MV 1 B Direct Mode 1 CABAC 1 Adaptive Transform 1 Max Temporal Layers 0 Hierarchial P Frames 0 Hierarchial B Frames 0 Max Level 51 Min Level 1 4:4:4 0 Max Width 4096 Max Height 4096 Dynamic Resolution Change 1 Dynamic Bitrate Change 1 Forced constant QP 0 Dynamic RC Mode Change 0 Subframe Readback 0 Constrained Encoding 0 Intra Refresh 1 Custom VBV Bufsize 1 Dynamic Slice Mode 1 Ref Pic Invalidiation 1 PreProcess 0 Async Encoding 1 Max MBs 65536 MAX MB per sec 983040 Lossless 0
Code:ffmpeg -loglevel fatal -threads 8 -an -sn -pix_fmt yuv420p -s 640x352 -f rawvideo -i "f:\test.avi" -pix_fmt yuv420p -f yuv4mpegpipe - | NVEncC --codec h264 --y4m -i - -o "h:\test.264"
I also tried using the NVEncC64.exe but it also ended with a system crash.
Translating an error message wouldn't be the problem. (capture the error message and translate it using google translate)
-> so my guess atm. is that either it's still buggy or really needs a Maxwell NVIDIA card.
Cu SelurLast edited by Selur; 15th Feb 2015 at 14:15. Reason: shortend call a bit
users currently on my ignore list: deadrats, Stears555, marcorocchini -
-
Sure, that might be the case, but since I really don't like my system crashing on me that's enough testing for me today.
-> So if anyone has some success with this please share.users currently on my ignore list: deadrats, Stears555, marcorocchini -
Does anyone have some experience with it?
-
part of the readme in English:
=Basic System Requirement=
Windows 7,8,8.1 (x86/x64)
Hardware supporting NVEnc
NVIDIA GPU GeForce Kepler and after (GT/GTX 6xx and after)
※The Femi generation: GT 63x, 62x are not supported
NVEnc 0.xx requires NVIDIA driver after 334.89
NVEnc 1.xx requires NVIDIA driver after 347.09
...
Requires VC2013 redistributable
ただ残念ながら現時点ではBフレームが全く使えない状態でのエンコードになってしまう。なので圧縮率として はかなり厳しい物になるんじゃないかなと思う
It is regretful that B-frame is completely unusable. The compression ratio will be poor as a result.Stopping development until someone save me from poverty or get me out of Hong Kong...
Twitter @MaverickTse -
-
NVIDIA GPU GeForce Kepler and after (GT/GTX 6xx and after)
...
NVEnc 1.xx requires NVIDIA driver after 347.09
-> If someone manages to get the H.264 encoding working on a non-Maxwell card please report how.
With GTX 960 it does 4k hevc at realtime
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
C:\>NVEncC64.exe --y4m --input-res 1920x1080 --codec H264 --cbr 10000 --gop-len
200 -i G:\park_joy_1080p50.yuv -o G:\NVEnc.h264
NVEnc 1.01 (x64), using NVENC API v5.0
OS ????? Windows 7 (x64)
CPU Pentium Dual-Core E6600 @ 3.06GHz (2C/2T)
GPU GeForce GTX 750 (4 EU) @ 1084 MHz (347.52)
?????????? CUDA, 16 frames
???????? y4m (yv12) -> nv12 [SSE2], 1920x1080, 50/1 fps
?????? H.264/AVC high
1920x1080p 1:1 50.000fps (50/1fps)
???????? CBR - ????????
?????? 10000 kbps (Max: 10000 kbps)
??QP? I:20 P:23 B:25
GOP? 200 frames
??B????? 3 frames
???? 3 frames
???????? 1/4????
CABAC/deblock cabac / on
encoded 500 frames, 182.88 fps, 9796.31 kbps, 11.68 MB
encode time 0:00:03 / CPU Usage: 34.00%
frame type IDR 3
frame type I 3, avgQP 34.33, total size 0.45 MB
frame type P 125, avgQP 37.61, total size 7.48 MB
frame type B 372, avgQP 42.04, total size 3.75 MB
x264 finished after 15s (100% CPU, GPU 2%)
NVEnc64 completed through 3s (34% CPU, GPU 23%)
It is interesting to know about the possibility GTX 960 encode in 4k HEVC 10bit -
Does NVEnc work for you if you feed it through a pipe?
users currently on my ignore list: deadrats, Stears555, marcorocchini -
here it does
"C:\Daten\Projekte\VS\VB\StaxRip\bin\Applications\ avs2pipemod\avs2pipemod.exe" -y4mp "" | "C:\Daten\Projekte\VS\VB\StaxRip\bin\Applications\ NVEncC\NVEncC.exe" --y4m -c h265 -i - -o "_out.h265" -
I thus obtained to encode (Other ways lead to the collapse of the driver and a blue screen):
ffmpeg -i G:\prometheus(black).mkv -pix_fmt yuv420p -f yuv4mpegpipe - | NVEncC64 --codec h264 --cbr 10000 --gop-len 200 --y4m -i - -o G:\test.264
C:\>ffmpeg -i G:\prometheus(black).mkv -pix_fmt yuv420p -f yuv4mpegpipe - | NVEn
cC64 --codec h264 --cbr 10000 --gop-len 200 --y4m -i - -o G:\test.264
ffmpeg version N-69835-g03adafb Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-lib
modplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw
b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge
r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --en
able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enab
le-zlib
libavutil 54. 18.100 / 54. 18.100
libavcodec 56. 22.100 / 56. 22.100
libavformat 56. 22.100 / 56. 22.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.100 / 5. 11.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, matroska,webm, from 'G:\prometheus(black).mkv':
Metadata:
title : ╨Я╤А╨╛╨╝╨╡╤В╨╡╨╣
CREATION_TIME : 2013-09-06 07:10:53
track :
DATE :
ALBUM_ARTIST :
COMPOSER :
ALBUM :
ARTIST :
COMMENT :
COPYRIGHT :
ENCODER : Lavf55.14.101
Duration: 00:00:17.10, start: 0.000000, bitrate: 28925 kb/s
Chapter #0:0: start 0.000000, end 17.058000
Metadata:
title : Chapter 11
Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9],
23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Metadata:
title : ╨Я╤А╨╛╨╝╨╡╤В╨╡╨╣
LANGUAGE : eng
Stream #0:1(rus): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
Metadata:
title : DTS - ╨Ф╤Г╨▒╨╗╤П╨╢ (Blu-ray EUR)
LANGUAGE : rus
Output #0, yuv4mpegpipe, to 'pipe:':
Metadata:
title : ╨Я╤А╨╛╨╝╨╡╤В╨╡╨╣
COPYRIGHT :
track :
DATE :
ALBUM_ARTIST :
COMPOSER :
ALBUM :
ARTIST :
COMMENT :
encoder : Lavf56.22.100
Chapter #0:0: start 0.000000, end 17.058000
Metadata:
title : Chapter 11
Stream #0:0(eng): Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080 [S
AR 1:1 DAR 16:9], q=2-31, 200 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc (default)
Metadata:
title : ╨Я╤А╨╛╨╝╨╡╤В╨╡╨╣
LANGUAGE : eng
encoder : Lavc56.22.100 rawvideo
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[yuv4mpegpipe @ 048f8a40] Encoder did not produce proper pts, making some up.
NVEnc 1.01 (x64), using NVENC API v5.0
OS ????? Windows 7 (x64)
CPU Pentium Dual-Core E6600 @ 3.06GHz (2C/2T)
GPU GeForce GTX 750 (4 EU) @ 1084 MHz (347.52)
?????????? CUDA, 16 frames
???????? y4m (yv12) -> nv12 [SSE2], 1920x1080, 24000/1001 fps
?????? H.264/AVC high
1920x1080p 1:1 23.976fps (24000/1001fps)
???????? CBR - ????????
?????? 10000 kbps (Max: 10000 kbps)
??QP? I:20 P:23 B:25
GOP? 200 frames
??B????? 3 frames
???? 3 frames
???????? 1/4????
CABAC/deblock cabac / on
frame= 15 fps=0.0 q=0.0 size= 45563kB time=00:00:00.62 bitrate=596602.2kbits
frame= 41 fps= 39 q=0.0 size= 124538kB time=00:00:01.71 bitrate=596601.6kbits
frame= 70 fps= 45 q=0.0 size= 212625kB time=00:00:02.91 bitrate=596601.6kbits
frame= 99 fps= 48 q=0.0 size= 300713kB time=00:00:04.12 bitrate=596601.5kbits
frame= 127 fps= 49 q=0.0 size= 385763kB time=00:00:05.29 bitrate=596601.5kbits
frame= 159 fps= 51 q=0.0 size= 482963kB time=00:00:06.63 bitrate=596601.4kbits
frame= 191 fps= 53 q=0.0 size= 580164kB time=00:00:07.96 bitrate=596601.4kbits
frame= 222 fps= 54 q=0.0 size= 674326kB time=00:00:09.25 bitrate=596601.4kbits
frame= 253 fps= 55 q=0.0 size= 768489kB time=00:00:10.55 bitrate=596601.4kbits
frame= 284 fps= 55 q=0.0 size= 862652kB time=00:00:11.84 bitrate=596601.4kbits
frame= 314 fps= 56 q=0.0 size= 953777kB time=00:00:13.09 bitrate=596601.4kbits
frame= 345 fps= 56 q=0.0 size= 1047940kB time=00:00:14.38 bitrate=596601.4kbits
frame= 377 fps= 57 q=0.0 size= 1145140kB time=00:00:15.72 bitrate=596601.4kbits
frame= 407 fps= 57 q=0.0 size= 1236265kB time=00:00:16.97 bitrate=596601.4kbits
frame= 412 fps= 57 q=0.0 Lsize= 1251452kB time=00:00:17.18 bitrate=596601.4kbit
s/s dup=0 drop=5
video:26kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing ov
erhead: 4859909.500000%
encoded 412 frames, 58.63 fps, 8527.58 kbps, 17.47 MB
encode time 0:00:07 / CPU Usage: 14.56%
frame type IDR 3
frame type I 3, avgQP 16.00, total size 0.19 MB
frame type P 103, avgQP 15.34, total size 6.30 MB
frame type B 306, avgQP 16.19, total size 10.98 MB
C:\>
How do I get a load of 50% or 100%Still the author tried to build a monitor for the GPU to statistics
Last edited by Gravitator; 16th Feb 2015 at 14:56.
-
@Selur, add the requirement to the system in the first post.
= Basic System Requirement =
Windows 7,8,8.1 (x86 / x64)
H.265 encoding only possible on nVidia cards with chipMaxwell GM20x (GTX 980/970/960)
H.264 encoding only possible on nVidia cards with chip Kepler and after (GT / GTX 6xx and after)
※ The Femi generation: GT 63x, 62x are not supported
NVEnc 0.xx requires NVIDIA driver after 334.89
NVEnc 1.xx requires NVIDIA driver after 347.09
...
Requires VC2013 redistributable -
@Selur, add the requirement to the system in the first post.
= Basic System Requirement =
Windows 7,8,8.1 (x86 / x64)
H.265 encoding only possible on nVidia cards with chipMaxwell GM20x (GTX 980/970/960)
H.264 encoding only possible on nVidia cards with chip Kepler and after (GT / GTX 6xx and after)
※ The Femi generation: GT 63x, 62x are not supported
NVEnc 0.xx requires NVIDIA driver after 334.89
NVEnc 1.xx requires NVIDIA driver after 347.09
...
Requires VC2013 redistributable -
Staxrip already added support for this:
1.2.0.3 beta (2015-02-16)
Added qaac encoder, Apple library not included
Added nvidia GPU encoder supporting H.265 encoding with GTX 960 card
Added setting to prevent windows entering standby mode while encoding
Fixed shutdown feature not executed by the last instance only
Improved eac3to GUI
Improved AviSynth filter profiles editor
Improved audio encoding GUI
Improved MediaInfo GUI
Improved command line audio and video encoding GUI, processing as batch now supporting piping
Updated x265 builds to version 1.5 and updated x265 GUI
Updated mkvtoolnix to version 7.6.0
This may be big, I may just have to start saving up some pennies and buy a 960 card. -
using:
Code:ffmpeg -loglevel fatal -threads 8 -an -sn -pix_fmt yuv420p -s 640x352 -f rawvideo -i "f:\test.avi" -pix_fmt yuv420p -f yuv4mpegpipe - | NVEncC --codec h264 --cbr 10000 --y4m -i - -o "h:\test.264"
When using a longer source the output frame count is fine.users currently on my ignore list: deadrats, Stears555, marcorocchini -
Stopping development until someone save me from poverty or get me out of Hong Kong...
Twitter @MaverickTse -
Have you tried video with a more common resolution? 640x352 is somewhat odd.
Have you tried feeding NVEnc with a file?users currently on my ignore list: deadrats, Stears555, marcorocchini -
Nope.
I can output a y4m with FFmpeg that contains a mere 109 frames (from AviUtl using the ffmpegout plugin)
Code:General Format : YUV4MPEG2 File size : 144 MiB Duration : 4s 546ms Overall bit rate : 265 Mbps Video Format : YUV Duration : 4s 546ms Bit rate : 265 Mbps Width : 1 280 pixels Height : 720 pixels Display aspect ratio : 16:9 Frame rate : 23.976 fps Color space : YUV Chroma subsampling : 4:2:0 Scan type : Progressive Compression mode : Lossless Bits/(Pixel*Frame) : 12.000 Stream size : 144 MiB (100%)
Code:-f rawvideo -s 1280x720 -pix_fmt nv12 -r 1990/83 -i "-" -an -sn -c:v rawvideo -pix_fmt yuv420p
If that also fails, that may suggest there is a problem with the piping implementation in NVEnc.
I'm still using GTX570 so I cannot directly help with troubleshooting this encoder.Stopping development until someone save me from poverty or get me out of Hong Kong...
Twitter @MaverickTse -
using:
Code:avs2pipemod -y4mt input.avs | NVEncC --codec h264 --cbr 10000 --y4m -i - -o "h:\test.264"
Code:LoadCPlugin("G:\Hybrid\avisynthPlugins\ffms2.dll") # loading source: F:\test.avi FFVideoSource("F:\test.avi") return last
Still when using:
Code:ffmpeg -loglevel fatal -threads 8 -an -sn -pix_fmt yuv420p -s 640x352 -f rawvideo -i "f:\test.avi" -pix_fmt yuv420p -f yuv4mpegpipe - | NVEncC --codec h264 --cbr 10000 --y4m -i - -o "h:\test.264"
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Stopping development until someone save me from poverty or get me out of Hong Kong...
Twitter @MaverickTse -
Perhaps, I will do so.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
ffmpeg pipe works fine here for your clip to x264, although the 1st frame is duplicated in the output file
Code:ffmpeg -i test.avi -an -f yuv4mpegpipe -pix_fmt yuv420p - | x264 - --demuxer y4m --preset veryfast --crf 20 -o test.mp4
or ffmpeg to ffmpeg pipe works ok too; so it's not the pipe. (1st frame duplicated too, that is ffmpeg decoding issue)
Code:ffmpeg -i test.avi -an -f yuv4mpegpipe -pix_fmt yuv420p - | ffmpeg -i - -c:v utvideo -an ut.avi
-
Strange may be there is something off with my compile of ffmpeg, will look into that.
btw. my NVEncC crashes seem to be to be related to "Forced constant QP 0" and probably "cqp" used as default method (I guess).users currently on my ignore list: deadrats, Stears555, marcorocchini -
btw. using '--input -' doesn't work here, using '-i -' does.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Stopping development until someone save me from poverty or get me out of Hong Kong...
Twitter @MaverickTse