An NVENC FFmpeg server moves video decoding, scaling and encoding onto the GPU with one command: ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:v h264_nvenc output.mp4. NVIDIA's support matrix lists 4 NVENC and 4 NVDEC engines on the RTX PRO 6000 Blackwell and 2 of each on the RTX PRO 4000 Blackwell SFF, with concurrent sessions "Unrestricted" on both, where the GeForce RTX 5090 is capped at 12. Both cards encode H.264, HEVC and AV1, including 4:2:2 for H.264 and HEVC. This guide shows the documented commands, a batch script and the limits, on a MassiveGRID GPU dedicated server with a 1 Gbps port and unlimited traffic.
The starting point is a clean Ubuntu 24.04 LTS server with root SSH access and a working NVIDIA driver. If nvidia-smi does not show the card yet, the first-hour setup guide for drivers, CUDA and Docker gets you there.
How many NVENC encoders does each card have?
The encoder and decoder are separate hardware blocks on the GPU, so their number, not the vRAM, decides how much video a card moves at once. These rows are from NVIDIA's Video Encode and Decode Support Matrix and product pages, checked on 16 November 2026.
| GPU | NVENC engines | NVDEC engines | Max concurrent sessions | H.264 and HEVC 4:2:2 encode | AV1 encode |
|---|---|---|---|---|---|
| RTX PRO 6000 Blackwell (96 GB) | 4 (9th generation) | 4 (6th generation) | Unrestricted | Yes | Yes |
| RTX PRO 4000 Blackwell SFF (24 GB) | 2 (9th generation) | 2 (6th generation) | Unrestricted | Yes | Yes |
| GeForce RTX 5090 (32 GB) | 3 | 2 | 12 | Not compared here | Not compared here |
| L40S and RTX 6000 Ada (48 GB) | 3 | 3 | Unrestricted | No | Yes |
Two points matter for a transcoding server. First, "Unrestricted" means the driver does not cap how many streams you open; the hardware still divides its time between them, so more sessions means fewer frames per second each. Second, NVIDIA's launch material for the RTX PRO Blackwell family says the 9th-generation NVENC adds 4:2:2 encoding for H.264 and HEVC and improves HEVC and AV1 quality, and that the 6th-generation NVDEC adds 4:2:2 H.264 and HEVC decode and doubles H.264 decode throughput. The matrix does not state 4:2:2 for AV1, so do not plan on it.
In server terms: the RTX PRO 4000 server costs $449.99 per month for 2 encoders, about $225 per encoder engine, and the RTX PRO 6000 server costs $1,656.15 per month for 4, about $414 per engine. If transcoding is the only workload, the 24 GB machine on the RTX PRO 4000 server page is the economical choice. The 96 GB card earns its price when the same machine also runs AI models, as the comparison of the two Blackwell cards explains.
Does your ffmpeg build have NVENC?
NVENC support is compiled into ffmpeg, not loaded at run time, so check the build before anything else. Whether the ffmpeg package in Ubuntu 24.04's archive includes it is something we did not verify, so test it instead of assuming:
apt update && apt install -y ffmpeg tmux
ffmpeg -hide_banner -encoders | grep nvenc
ffmpeg -hide_banner -hwaccels
The first command should list h264_nvenc, hevc_nvenc and av1_nvenc, and the second should list cuda. FFmpeg's documentation notes that -hwaccels shows what the build supports, and that "actual runtime availability depends on the hardware and its suitable driver being installed", so a listed encoder still needs the working driver from the setup guide.
If the encoders are missing, NVIDIA's "FFmpeg with NVIDIA GPU" guide gives the build steps for Linux. They need the CUDA toolkit installed first, because the configure line points at /usr/local/cuda:
git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
cd nv-codec-headers && sudo make install && cd -
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg/
sudo apt-get install build-essential yasm cmake libtool libc6 libc6-dev unzip wget libnuma1 libnuma-dev
cd ffmpeg
./configure --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --disable-static --enable-shared
make -j 8
sudo make install
The cd ffmpeg line is our addition so the block runs top to bottom; the rest is as printed in NVIDIA's guide. Because of --enable-nonfree, the resulting binary is for your own use, not for redistribution. Run the -encoders check again afterwards.
What are the documented FFmpeg NVENC commands?
These three lines are copied from NVIDIA's guide (Video Codec SDK 13.0 documentation). The first decodes on the GPU, keeps the frames in GPU memory and encodes H.264 at 5 Mbit/s, copying the audio:
ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4
The second adds a GPU scaler, here to 1280x720, so the frame never travels to system memory:
ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -vf scale_cuda=1280:720 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4
The third is NVIDIA's high-quality example, with the slow preset, look-ahead, B-frames and adaptive quantisation:
ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy -c:v h264_nvenc -preset p6 -tune hq -b:v 5M -bufsize 5M -maxrate 10M -qmin 0 -g 250 -bf 3 -b_ref_mode middle -temporal-aq 1 -rc-lookahead 20 -i_qfactor 0.75 -b_qfactor 1.1 output.mp4
For HEVC and AV1 the guide prints no separate lines. It says the command lines "use h264_nvenc, and should be replaced by hevc_nvenc for HEVC encode and av1_nvenc for AV1 encode". Following that instruction, the first command becomes:
ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy -c:v hevc_nvenc -b:v 5M output.mp4
ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy -c:v av1_nvenc -b:v 5M output.mkv
These two swapped lines are our application of NVIDIA's instruction, not text from the page, and the AV1 line writes Matroska by our choice. If ffmpeg rejects an option after a swap, ffmpeg -h encoder=av1_nvenc lists what that encoder accepts in your build.
The presets NVIDIA's guide uses are p2 (fast), p4 (medium) and p6 (slow), with -tune hq for quality or -tune ll for low latency. One compatibility note: the guide writes -vsync 0, while FFmpeg's current documentation lists -fps_mode for the same purpose. If a recent build warns about or refuses -vsync, use -fps_mode passthrough in its place.
Verify. While a job runs, nvidia-smi in a second session should show an ffmpeg process on the GPU. Then inspect the result:
ffprobe -hide_banner -select_streams v:0 -show_entries stream=codec_name,width,height,bit_rate output.mp4
How do you batch-transcode a folder?
NVIDIA's guide gives two rules for throughput. Run several sessions in parallel ("say 4 FFmpeg sessions"), and when one input needs several outputs, produce them in a single ffmpeg process so the decode and the CUDA context are shared; its section on one-to-many transcoding has the command lines.
The script below applies the first rule to a directory. It runs the documented one-to-one command on every MP4 in /srv/in, a fixed number at a time, skips files that are already done and keeps a log per file. Set JOBS to the number of NVENC engines as a starting point, 2 on the RTX PRO 4000 and 4 on the RTX PRO 6000, then raise it and watch total frames per second.
#!/usr/bin/env bash
# batch-nvenc.sh: transcode /srv/in/*.mp4 to /srv/out with hevc_nvenc
set -euo pipefail
IN=/srv/in; OUT=/srv/out; LOGS=/srv/logs; JOBS=2
mkdir -p "$OUT" "$LOGS"
encode() {
src="$1"; name="$(basename "${src%.*}")"
[ -s "$OUT/$name.mp4" ] && { echo "skip $name"; return 0; }
ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i "$src" \
-c:a copy -c:v hevc_nvenc -b:v 5M "$OUT/$name.part.mp4" \
> "$LOGS/$name.log" 2>&1 \
&& mv "$OUT/$name.part.mp4" "$OUT/$name.mp4" \
|| echo "FAILED $name" | tee -a "$LOGS/failed.txt"
}
export -f encode; export OUT LOGS
find "$IN" -name '*.mp4' -print0 | xargs -0 -n 1 -P "$JOBS" bash -c 'encode "$0"'
chmod +x batch-nvenc.sh
tmux new -s transcode ./batch-nvenc.sh
Verify by comparing counts, ls /srv/in/*.mp4 | wc -l against ls /srv/out/*.mp4 | wc -l, and by reading /srv/logs/failed.txt, which exists only if a file failed. On the 4x RTX PRO 6000 server, run one copy of the script per card with export CUDA_VISIBLE_DEVICES=0 to 3, the GPU-pinning method NVIDIA's guide shows.
How does NVENC quality compare with x264?
We publish no measurements of our own, and a single number would mislead: the answer depends on content, resolution, bitrate and presets on both sides. What can be said without inventing figures:
- A hardware encoder makes its decisions in fixed silicon within a fixed time budget. Software encoders such as x264 and x265 at their slow presets can spend far more computation per frame, and for archive masters or very low bitrates that is still the conservative choice.
- NVIDIA states that the 9th-generation NVENC in the RTX PRO Blackwell cards improves HEVC and AV1 encoding quality over the previous generation, without publishing a figure on the product page.
- Throughput is the reason to use NVENC. NVIDIA's guide itself notes that ffmpeg's performance is "slightly lower" than the stand-alone numbers in the Video Codec SDK documentation because of software overhead, so benchmark with ffmpeg, not with a datasheet.
The method that settles it: take three representative clips, encode each with your current software settings and with NVENC at -preset p6 -tune hq at the same bitrate, and score both against the source with VMAF (ffmpeg's libvmaf filter, if your build includes it) and by eye. Then raise the NVENC bitrate until the scores match. That extra bitrate, set against the hours saved, is your answer. Only video is accelerated: audio, muxing and CPU filters still run on the processor.
Why does unlimited traffic matter for a transcoding server?
Transcoding is a network workload as much as a GPU one: sources come in, renditions go out, often to viewers. Every MassiveGRID GPU server has a 1 Gbps port with unlimited traffic and one dedicated IPv4 address. The ceiling is arithmetic: 1 Gbps is 125 MB per second, 450 GB per hour, and about 328 TB if the port were saturated for a 730-hour month. None of it is metered.
Compare the metered model. AWS charges $0.09 per GB for the first 10 TB of data transfer out to the internet each month, with the first 100 GB free (AWS price list, checked on 16 November 2026). Sending 10 TB of finished video out of EC2 is therefore 9,900 GB at $0.09, about $891, before the instance itself. On the instance side, the 24 GB server works out at $0.62 per hour over a 730-hour month, against $0.8048 per hour on demand for an AWS g6.xlarge with one 24 GB L4 in us-east-1.
The other large clouds meter the same way. Azure lists $0.087 per GB after the first 100 GB, about $861 for 10 TB, and Google Cloud's Premium Tier lists $0.12 per GiB up to 1 TiB and $0.11 from there to 10 TiB, about $1,035 for 10 TB (their pricing pages, checked on 16 November 2026). The dedicated versus hourly GPU pricing comparison works through the break-even hours.
The dedicated server is the wrong tool if you transcode a few hours a week: it would sit idle, and an hourly instance or software encoding on CPU cores you already rent costs less. It fits a steady library or upload pipeline that keeps the encoders busy most of the day. Each server also carries a one-time setup fee ($346.48 on the RTX PRO 4000 server), so count the first month as $796.47.
What goes wrong?
- "Unknown encoder 'h264_nvenc'". The ffmpeg build lacks NVENC. Rebuild with the steps above or install a build that includes it, then rerun the
-encoderscheck. - The command works but the CPU is at 100% and the GPU idle. A filter in
-vfis a CPU filter, which forces frames out of GPU memory, or the input codec has no hardware decoder so ffmpeg fell back to software. Usescale_cudaorscale_npp, and check the log for the decoder it chose. - The disk fills during a batch. The RTX PRO 4000 server has 2x 512 GB NVMe. Stream sources in from object storage or another server and move outputs off as they finish, instead of staging a whole library locally.
- A drive fails mid-library. A dedicated server is one machine. Put the two NVMe drives in RAID 1 if the working set matters, and keep masters somewhere else: backups are your responsibility.
Security. A transcoding worker needs no public service at all. Keep SSH on keys only, allow nothing else inbound with ufw allow OpenSSH and ufw enable, and have the worker pull jobs from your queue or storage over outbound connections. If you do expose an upload or job API, put it behind a TLS reverse proxy and require an API key.
Frequently Asked Questions
Is there an NVENC session limit on the RTX PRO 6000 or RTX PRO 4000?
No. NVIDIA's Video Encode and Decode Support Matrix lists maximum concurrent sessions as "Unrestricted" for the RTX PRO 6000 Blackwell and the RTX PRO 4000 Blackwell SFF, while the GeForce RTX 5090 is listed with a maximum of 12 (checked on 16 November 2026). The hardware still shares its 4 or 2 encoder engines between the sessions you open.
Do these cards support AV1 and 4:2:2 encoding?
Both encode AV1 with av1_nvenc, and both are listed with H.264 4:2:2 and HEVC 4:2:2 encode, which NVIDIA says is new in the 9th-generation NVENC. The matrix does not state 4:2:2 for AV1.
How do I check whether ffmpeg supports NVENC?
Run ffmpeg -hide_banner -encoders | grep nvenc. If h264_nvenc, hevc_nvenc and av1_nvenc are listed, the build has them. If not, build ffmpeg with the nv-codec-headers as described in NVIDIA's FFmpeg guide.
Which MassiveGRID GPU server is best for video transcoding?
For transcoding alone, the RTX PRO 4000 server at $449.99 per month: 2 NVENC and 2 NVDEC engines, 14 CPU cores for audio and muxing, and a 1 Gbps port with unlimited traffic. Choose the 96 GB RTX PRO 6000 server at $1,656.15 per month for 4 engines of each or when the machine also runs AI models.
A transcoding server with unmetered traffic
The MassiveGRID RTX PRO 4000 server: RTX PRO 4000 Blackwell SFF with 2 NVENC and 2 NVDEC engines and 24 GB, Intel Core i5-13500, 64 GB RAM, 2x 512 GB NVMe, a 1 Gbps port with unlimited traffic and one dedicated IPv4 for $449.99 per month plus a one-time setup fee. Bare metal with root access.
See the RTX PRO 4000 ServerFurther Reading
- NVIDIA: Video Encode and Decode Support Matrix (NVENC and NVDEC counts, session limits, 4:2:2 and AV1)
- NVIDIA Video Codec SDK 13.0: FFmpeg with NVIDIA GPU (build steps and command lines)
- NVIDIA: RTX PRO 6000 Blackwell Max-Q product page (9th-generation NVENC, 6th-generation NVDEC)
- NVIDIA: RTX PRO 4000 Blackwell SFF Edition product page
- NVIDIA newsroom: RTX PRO Blackwell announcement (4:2:2 encode and decode)
- FFmpeg documentation: -encoders, -hwaccels and -fps_mode
- AWS EC2 on-demand pricing: instance rates and data transfer out
- Azure bandwidth pricing (internet egress)
- Google Cloud network pricing (Premium Tier internet egress)