FFmpeg: VP9 HDR10 4k Input to HEVC Output Not Saving

Abstract: Fix FFmpeg VP9 HDR10 to HEVC transcoding failures by specifying -pix_fmt yuv420p10le for software or p010le for hardware encoding to preserve 10-bit depth.

Created: 2026-08-13 by

FFmpeg fails to save VP9 HDR10 4K input as HEVC because default pixel formats discard high-bit-depth data. Use -pix_fmt p010le for hardware acceleration or yuv420p10le for software encoding. This preserves the 10-bit HDR metadata and prevents the output from being downgraded to standard dynamic range.

The Core Issue: Pixel Format Mismatch

When you attempt to transcode a 4K VP9 video with HDR10 metadata into an HEVC container, the most common failure point is not the codec itself, but the pixel format. HDR10 requires a 10-bit depth to store the wider color gamut and higher luminance values. By default, FFmpeg often attempts to convert this to an 8-bit format like yuv420p during the encoding process. This conversion truncates the bit-depth, effectively stripping the HDR characteristics from your video. The resulting file saves successfully, but it lacks the HDR metadata and visual fidelity you expect, appearing washed out or incorrectly graded on compatible displays. The term "not saving" in user reports usually refers to the output file existing but lacking the expected HDR properties, or failing entirely due to unsupported pixel format combinations. If the encoder cannot handle the native 10-bit stream, it may crash or produce a corrupted container. Understanding the distinction between the input stream's native format and the required output pixel format is critical for successful transcoding.

Software Encoding Solution

For users relying on CPU-based encoding via libx265, the solution involves explicitly specifying a 10-bit pixel format that matches the input's capabilities. You must instruct FFmpeg to maintain the 10-bit depth throughout the pipeline. Use the following command structure:
ffmpeg -i input_vp9_hdr10.mkv -c:v libx265 -pix_fmt yuv420p10le -crf 18 output_hevc_hdr10.mp4
Here, -pix_fmt yuv420p10le forces the encoder to use a 10-bit YUV 4:2:0 format. This is widely supported by modern players and devices. The -crf 18 setting ensures high quality, though you should adjust this based on your storage constraints. If you encounter errors stating that the pixel format is not supported, verify that your version of libx265 supports 10-bit encoding. Most modern builds do, but older versions might require recompilation or updating. If you are using a newer version of FFmpeg, you can also try yuv420p10le without specifying the endianness, as FFmpeg often handles the byte order automatically. However, explicit specification reduces ambiguity.

Hardware Acceleration Considerations

Many users seek faster encoding times using NVIDIA NVENC or AMD AMF encoders. Hardware encoders have stricter requirements regarding pixel formats. As discussed in our guide on HEVC NVENC with ffmpeg: '-pix_fmt p010le' and '-pix_fmt yuv420p10le' doesn't work, hardware accelerators often require specific internal formats that differ from software encoders. For NVIDIA cards supporting NVENC, you typically need to use p010le. The command would look like this:
ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input_vp9_hdr10.mkv -c:v hevc_nvenc -pix_fmt p010le -crf 18 output_hevc_hdr10.mp4
Note the use of -hwaccel cuda and -hwaccel_output_format cuda. These flags ensure that the decoding happens on the GPU and the frames remain in GPU memory, avoiding slow CPU-GPU transfers. If you skip these, FFmpeg might try to convert the frame to a CPU-readable format, which can lose HDR metadata or cause performance bottlenecks. Always check your GPU driver support for 10-bit HEVC encoding, as older drivers may not support this feature.

Verifying HDR Metadata Preservation

After encoding, it is essential to verify that the HDR metadata was preserved. Use ffprobe to inspect the output file:
ffprobe -v error -show_entries stream=width,height,pix_fmt,tag:STUDIO -of default=noprint_wrappers=1:nokey=1 output_hevc_hdr10.mp4
Look for pix_fmt indicating 10-bit (e.g., yuv420p10le or p010le). Additionally, check for tags related to color transfer characteristics. If the pixel format is 8-bit, the HDR information is lost. For a deeper dive into error resilience when dealing with complex HEVC streams, refer to our article on FFmpeg Error Resilience: A Solution for Wonky HEVC Video Files.

Common Pitfalls and Troubleshooting

One frequent mistake is assuming that simply changing the container format (e.g., from MKV to MP4) will preserve HDR. It does not. The pixel format and color space tags must be explicitly handled. Another issue arises with VP9 inputs that have unusual dimensions or chroma subsampling. While 4K is standard, some VP9 files may use 4:2:2 or 4:4:4 chroma subsampling, which many HEVC encoders do not support. In such cases, you may need to add a scaling filter to convert to 4:2:0 before encoding. Also, ensure that your input file actually contains HDR10 metadata. Some files labeled as HDR may only be mastered in SDR and upscaled. Use ffprobe to check the input stream's color transfer and matrix coefficients. If the input is not true HDR10, no amount of encoding settings will create valid HDR metadata in the output. Finally, be aware of container limitations. While MP4 is common, it has strict limits on stream duration and size. For large 4K HDR files, MKV is often a safer choice for intermediate processing. If you experience audio sync issues after converting to MKV, see our guide on Delays in Audio Sync Playback with FFmpeg: A Solution for MKV Files with HEVC Video, AAC Audio, and MJPEG Subtitles.

Frequently Asked Questions

Why does my HEVC output look flat despite using 10-bit pixel format?

The issue is likely missing color space tags rather than pixel depth. Ensure you include -color_primaries bt2020 -color_trc smpte428 -colorspace bt2020nc in your command. Without these tags, players may interpret the 10-bit data as SDR, resulting in a washed-out appearance.

Can I use libsvtav1 instead of libx265 for VP9 HDR10?

Yes, SVT-AV1 is highly efficient for AV1 output, but if you specifically need HEVC, stick with libx265 or nvenc. SVT-AV1 does not encode HEVC. Using the wrong encoder will result in an AV1 file, not HEVC, which may not be compatible with your target devices.

What if I get a 'pixel format not supported' error with NVENC?

This usually means your GPU driver or FFmpeg build does not support 10-bit NVENC. Update your NVIDIA drivers to the latest version. Alternatively, try using yuv420p10le instead of p010le, as some older hardware implementations prefer the former.

Does HDR10 require a specific container format?

No, HDR10 metadata can be stored in both MP4 and MKV containers. However, MKV is more flexible with multiple streams and subtitles. MP4 is more universally supported by consumer electronics like smart TVs and game consoles.

How do I know if my source VP9 file is actually HDR10?

Use ffprobe to check the stream metadata. Look for tags like STUDIO or color primaries set to BT.2020. If the color transfer characteristic is BT.709, the file is likely SDR, even if it is 10-bit.

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