-
Notifications
You must be signed in to change notification settings - Fork 0
Instructions (English)
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.
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:
- Validation of command-line parameters
- Determination of encoder, audio, and quality parameters
- Determination of crop and resolution parameters
- Analysis of filters and modes
- Decision whether scaling is required
- Passing final parameters to NVEncC
Crop, resize, filter, and mode are logically separated and only interact where technically required.
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
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 |
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) |
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 |
| 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.
| 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 |
| 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 |
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.
| 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 |
| Value | Meaning |
|---|---|
| def | Default hardware decoding |
| hw | Force hardware decoding |
| sw | Force software decoding |
| auto | Automatic selection |
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 |
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.
Files already in the target codec are not re-encoded.
All skipped files are moved into _Converted instead of codec-specific folders.
Files with ambiguous geometry are moved into _Check.
If an output file already exists, processing is skipped.
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.
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.
| Area | Principle |
|---|---|
| Crop | explicit or automatic |
| Resize | only when required |
| Filter | independent from geometry |
| Audio | reencode only when needed |
| Debug | informational only |