HEVC NVENC with ffmpeg: '-pix_fmt p010le' and '-pix_fmt yuv420p10le' doesn't work

Abstract: Resolve hevc_nvenc invalid argument errors by converting input pixel formats like p010le to supported planar formats such as yuv420p10le.

Created: 2026-09-18 by

HEVC NVENC in FFmpeg requires the input format to match the encoder's native pixel format, typically yuv420p for 8-bit or yuv420p10le for 10-bit. The error occurs because p010le is not a valid output pixel format for the hevc_nvenc encoder, which expects planar YUV data rather than packed formats. You must ensure your input stream is converted to the correct format using the -pix_fmt option before encoding.

Understanding Pixel Format Compatibility

The core issue when using hevc_nvenc is a mismatch between the source video's pixel format and what NVIDIA’s hardware encoder accepts. NVIDIA encoders are highly optimized but strict about input formats. For HEVC (H.265) encoding, the standard 8-bit format is yuv420p, while 10-bit high dynamic range (HDR) content requires yuv420p10le. When users attempt to use -pix_fmt p010le, they are specifying a packed 10-bit format. The hevc_nvenc encoder does not support packed pixel formats as direct inputs. It requires planar formats where the luma (Y) and chroma (U/V) components are stored separately. This is why yuv420p10le works, but p010le fails with an "Invalid argument" or "Unsupported pixel format" error. It is crucial to distinguish between the pixel format of the input file and the pixel format specified for the encoder. If your source file is already in p010le, you cannot simply pass it to the encoder. You must insert a software conversion step to transform the data into yuv420p10le before handing it off to the GPU encoder.

Correcting the Command Line Syntax

To resolve this, you need to explicitly set the pixel format that matches your desired bit depth. For standard SDR (Standard Dynamic Range) video, use -pix_fmt yuv420p. For HDR or high-quality archival, use -pix_fmt yuv420p10le. Here is the corrected structure for a basic HEVC NVENC command:
ffmpeg -i input.mp4 -c:v hevc_nvenc -pix_fmt yuv420p10le -b:v 10M output.mp4
If your input file uses a different format, such as rgb24 or p010le, FFmpeg will automatically convert it if you specify the target -pix_fmt. However, if you are piping data or using complex filters, you may need to be more explicit. For example, if you are dealing with a 10-bit source that is incorrectly formatted, you can force the conversion:
ffmpeg -i input_10bit.p010le -vf format=yuv420p10le -c:v hevc_nvenc -pix_fmt yuv420p10le output.mp4
In this command, the -vf format=yuv420p10le ensures that the video filter chain outputs the correct planar format before the encoder processes it. This avoids the common pitfall of assuming the encoder will handle arbitrary input formats.

Handling 8-Bit vs 10-Bit Content

Choosing between 8-bit and 10-bit encoding depends on your source material. Most web-based video and standard broadcast content is 8-bit. Using yuv420p10le for 8-bit content increases file size without visible quality improvement. Conversely, encoding 10-bit HDR content as 8-bit results in banding and loss of detail in shadows and highlights. Check your input file properties using:
ffprobe -v error -select_streams v:0 -show_entries stream=width,height,r_frame_rate,pix_fmt -of default=noprint_wrappers=1:nokey=1 input.mp4
Look at the pix_fmt field. If it says yuv420p, stick to 8-bit encoding. If it says yuv420p10le or p010le, you should use 10-bit encoding. Note that some older NVIDIA drivers or cards may have limited support for 10-bit NVENC, so verify your GPU capabilities. For more details on optimizing HEVC settings, see FFMPEG: H.265 (HEVC) Video Encoding with VCNVENC (yuv420) at 800Mbps.

Diagnostics and Troubleshooting

If you still encounter errors after adjusting the pixel format, check the following:
  • Driver Version: Ensure your NVIDIA drivers are up to date. Older drivers may lack support for specific HEVC profiles or 10-bit processing.
  • GPU Memory: 10-bit encoding consumes more VRAM. If you run out of memory, the encode will fail. Reduce resolution or bitrate if necessary.
  • Profile Selection: Use -profile:v main10 for 10-bit content. Standard profiles like main are for 8-bit and may reject 10-bit inputs.
A complete, robust command for 10-bit HEVC NVENC looks like this:
ffmpeg -i input.mp4 -c:v hevc_nvenc -profile:v main10 -pix_fmt yuv420p10le -rc vbr -b:v 10M output.mp4
This sets the profile to main10, specifies the 10-bit pixel format, and uses variable bitrate encoding for better quality efficiency. For general guidance on obtaining specific FFmpeg settings, refer to Attempting to Get Specific Settings for FFmpeg Encodes.

Frequently Asked Questions

Why does my encode fail with 'Invalid pixel format'?

This error usually means the input format does not match the encoder's expectations. Ensure you are using yuv420p for 8-bit or yuv420p10le for 10-bit, and avoid packed formats like p010le.

Can I use NVENC for 10-bit video?

Yes, most modern NVIDIA GPUs support 10-bit HEVC encoding via NVENC. You must specify -pix_fmt yuv420p10le and use the main10 profile to enable this functionality.

What is the difference between yuv420p and yuv420p10le?

yuv420p is an 8-bit planar format suitable for standard dynamic range video. yuv420p10le is a 10-bit planar format used for HDR content, providing greater color depth and reducing banding artifacts.

How do I check my current pixel format?

Use the ffprobe command with the -show_entries stream=pix_fmt flag to inspect the pixel format of your source media file before encoding.

Does NVENC support other pixel formats?

NVENC primarily supports yuv420p, yuv420p10le, and sometimes nv12 depending on the codec and version. Packed formats like p010le are generally not supported directly by the hardware encoder.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More