Skip to content

Instructions (English)

Rainman74 edited this page Feb 4, 2026 · 3 revisions

NVEncC Wrapper – User Manual

1. Purpose of the Wrapper

This wrapper is used for automated video transcoding with NVEncC on Windows. It provides a structured command-line interface that allows complex NVEnc parameters to be applied consistently and transparently.

The wrapper deliberately separates responsibilities for crop, resolution, scaling, filters, and modes in order to achieve controlled and predictable processing results.


2. Basic Operation

The wrapper processes all supported video files in the current working directory. Files that have already been processed or are already in the target codec are automatically detected and not encoded again.

Processing follows a fixed sequence:

  1. Validation of command-line parameters
  2. Determination of encoder, audio, and quality parameters
  3. Determination of crop and resolution parameters
  4. Analysis of filters and modes
  5. Decision whether scaling is required
  6. Passing final parameters to NVEncC

Crop, resize, filter, and mode are logically separated and only interact where technically required.


3. Invocation and Syntax

The wrapper is executed directly inside the directory containing the video files to be processed.

Syntax:

encoder audio quality crop filter mode decoder

All parameters are position-dependent. Missing parameters are replaced by internal defaults.

Example:

hevc ac3 auto auto


4. Parameter Description

4.1 Encoder (Position 1)

The encoder parameter defines the target codec and profile. Profile, bit depth, and encoder-specific options are set internally.

Value Meaning
def Default encoder (HEVC, Main profile)
hevc HEVC encoding
he10 HEVC encoding with 10-bit color depth
h264 AVC encoding
av1 AV1 encoding

4.2 Audio (Position 2)

The audio parameter controls handling of all audio streams.

Re-encoding only occurs if the source audio stream is not already in the target format. This applies equally to AC3, AAC, and E-AC3.

Value Meaning
copy Copy all audio streams unchanged
copy1 Copy audio stream 1 only
copy2 Copy audio stream 2 only
copy12 Copy audio streams 1 and 2
copy23 Copy audio streams 2 and 3
ac3 AC3 encoding (stereo and 5.1)
aac AAC encoding (stereo and ≥5.1, including higher channel counts)
eac3 E-AC3 encoding (stereo and multichannel)

4.3 Quality (Position 3)

The quality parameter controls the encoder QVBR value.

Value Meaning
def Default quality
auto Automatic quality selection based on filename
hq High quality
uhq Very high quality
lq Low quality
ulq Very low quality

4.4 Crop and Resolution (Position 4)

4.4.1 Automatic Crop

Value Meaning
auto Automatic crop detection without scaling

In automatic mode the wrapper analyzes the video using ffmpeg cropdetect. Black bars and tolerable border areas are detected.

Automatic crop determines only the required crop values and the resulting native output resolution. It does not trigger scaling.


4.4.2 Fixed Crop Presets (without scaling)

Value Meaning
696 Vertical crop to 696 pixels
768 Vertical crop to 768 pixels
800 Vertical crop to 800 pixels
804 Vertical crop to 804 pixels
808 Vertical crop to 808 pixels
812 Vertical crop to 812 pixels
816 Vertical crop to 816 pixels
872 Vertical crop to 872 pixels
960 Vertical crop to 960 pixels
1012 Vertical crop to 1012 pixels
1024 Vertical crop to 1024 pixels
1036 Vertical crop to 1036 pixels
1040 Vertical crop to 1040 pixels

4.4.3 Output Resolution Presets (with scaling)

Value Meaning
720 Scale to 1280 width
720p Scale to 720 height
720f Scale to 1280×720
1080 Scale to 1920 width
1080p Scale to 1080 height
1080f Scale to 1920×1080
2160 Scale to 3840 width
2160p Scale to 2160 height
2160f Scale to 3840×2160
1036p Scale to 1920×1036

4.5 Filter (Position 5)

Filters are applied after crop and optional scaling.

Value Meaning
copy No filter
smooth Smoothing
smooth31 Strong smoothing
smooth63 Very strong smoothing
nlmeans NLMeans denoise
gauss Gaussian filter
gauss5 Strong Gaussian filter
sharp Sharpen
ss Smooth + sharpen
denoise AI denoise
denoisehq Strong AI denoise
artifact AI artifact reduction
artifacthq Strong AI artifact reduction
superres AI upscaling
superreshq High-quality AI upscaling
vsr Video Super Resolution
vsrdenoise VSR + denoise
vsrartifact VSR + artifact reduction

Filters with internal scaling fully replace resize handling.


4.6 Mode (Position 6)

Value Meaning
copy No modification
deint Automatic deinterlace
yadif YADIF deinterlace
yadifbob YADIF bob deinterlace
double Frame rate doubling
23fps Convert to 23.976 fps
25fps Convert to 25 fps
30fps Convert to 30 fps
60fps Convert to 60 fps
29fps Convert to 29.97 fps
59fps Convert to 59.94 fps
HDRtoSDR HDR to SDR conversion
dv Dolby Vision passthrough
dolby-vision Dolby Vision passthrough

4.7 Decoder (Position 7)

Value Meaning
def Default hardware decoding
hw Force hardware decoding
sw Force software decoding
auto Automatic selection

5. Resize Logic

Scaling decisions are made strictly based on parameters.

Scaling is only performed when technically required.

Situation Behavior
Automatic crop No resize
Fixed crop without target resolution No resize
Explicit target resolution Resize required
Filter with scaling No additional resize
Mode with scaling No additional resize
Resize required without filter scaling High-quality scaler applied

6. Debug Mode

Debug mode exposes internal decisions.

Value Meaning
DEBUG_AUTOCROP=1 Debug enabled
DEBUG_AUTOCROP=0 Debug disabled

Debug prints crop values, resolution decisions, resize logic and final NVEnc parameters.


7. File Handling and Special Cases

7.1 Already Encoded Files

Files already in the target codec are not re-encoded.

All skipped files are moved into _Converted instead of codec-specific folders.


7.2 Invalid AUTO-CROP Results

Files with ambiguous geometry are moved into _Check.


7.3 Already Processed Files

If an output file already exists, processing is skipped.


7.4 Optional Metadata Normalization

The wrapper can optionally normalize container metadata after encoding.

This is controlled internally by:

EDIT_TAGS=1

Normalization includes:

  • Removing global title
  • Cleaning generic track names
  • Normalizing language tags
  • Fixing default and forced flags

Metadata failures isolate the file in _Check.


8. Typical Use Cases

Archive material Automatic crop, no scaling, optional filters.

Cinema material Automatic crop removes letterbox while preserving native resolution.

Upscaling Explicit target resolution combined with AI filters.


9. Summary

Area Principle
Crop explicit or automatic
Resize only when required
Filter independent from geometry
Audio reencode only when needed
Debug informational only