Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
VGSources
Blog

FFmpeg NVENC Settings for 4K 60fps YouTube Live on Linux

A practical Linux FFmpeg/NVENC template for YouTube Live at 4K60, including H.264 and HEVC targets, HDR cautions, setup checks and fixes for common stream problems.
Length7 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a 4K 60fps YouTube Live stream from Linux, a practical SDR starting point is FFmpeg with h264_nvenc, CBR at 50 Mbps, a 2-second keyframe interval, and RTMPS. YouTube’s current recommendation for 2160p60 is 50 Mbps for H.264 or 35 Mbps for HEVC/AV1; the right command still depends on your GPU, driver, FFmpeg build, source and network.

Start with the right codec and bitrate

YouTube’s live encoder settings page lists these 2160p60 targets:

Codec and range Minimum bitrate Recommended bitrate
H.264 SDR 14 Mbps 50 Mbps
HEVC or AV1 SDR 10 Mbps 35 Mbps
HDR Use HEVC and 10-bit encoding Follow the applicable YouTube HDR settings

These are YouTube’s published ingest recommendations, not a guarantee of image quality or proof that a particular GPU can encode 4K60 in real time. H.264 is the compatibility-first choice in the template below. HEVC can be appropriate when the GPU, FFmpeg build and YouTube ingest workflow support it. YouTube’s listed HDR path is HEVC; its cited settings page does not support AV1 for HDR. YouTube’s live encoder settings also recommend CBR, progressive video, up to 60 fps, two B-frames and one reference frame, with a keyframe interval of two seconds and no more than four seconds. YouTube recommends RTMPS.

Check Linux, FFmpeg and the input first

  • Run ffmpeg -encoders and confirm that h264_nvenc appears; for HEVC, look for hevc_nvenc. Check available options with ffmpeg -h encoder=h264_nvenc or ffmpeg -h encoder=hevc_nvenc. An FFmpeg binary must be built with NVIDIA hardware-encoding support.
  • Run nvidia-smi to check that the GPU and driver are visible. Confirm that the specific GPU supports the codec, profile, bit depth and resolution you plan to use. GPU branding alone does not establish those capabilities.
  • Inspect the input for its resolution, frame rate, video and audio streams, and color range. Confirm that you can map the intended streams and produce 3840×2160 progressive video at 60 fps.
  • Check upload capacity and stability for the selected bitrate, with headroom beyond the video target for audio and network variation. A bitrate recommendation does not establish that your connection can sustain it.
  • In YouTube Live Control Room, obtain the stream’s primary RTMPS ingest address and the associated stream key. These values are private; do not publish or share the key.

YouTube’s API describes the primary RTMPS ingestion endpoint and stream name in its liveStreams documentation. Use the values supplied for your own stream.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Use this SDR H.264 command as a starting point

Replace INPUT with the input filename and RTMPS_INGEST_URL/STREAM_KEY with the private RTMPS address and key YouTube supplies. Keep credentials out of shell history and logs where possible; never paste a real key into a public post.

ffmpeg -re -i INPUT 
  -map 0:v:0 -map 0:a:0? 
  -c:v h264_nvenc -preset p5 -tune hq 
  -rc cbr -b:v 50M -maxrate 50M -bufsize 100M 
  -g 120 -bf 2 -profile:v high 
  -pix_fmt yuv420p -r 60 
  -c:a aac -b:a 128k -ar 44100 
  -f flv "RTMPS_INGEST_URL/STREAM_KEY"

What the important flags do

  • -re paces a file input in real time. Do not assume the same pacing syntax is right for a live capture source.
  • -map 0:v:0 -map 0:a:0? selects the first video stream and the first audio stream if present. The optional audio mapping avoids failure when the input has no audio; remove or change it if you need different streams.
  • -c:v h264_nvenc selects NVIDIA’s H.264 encoder. -preset p5 -tune hq is a starting point, not a universal best setting. Use a slower or higher-quality preset only if your specific setup sustains real-time encoding.
  • -rc cbr -b:v 50M -maxrate 50M sets constant bitrate at YouTube’s recommended 2160p60 H.264 target. The -bufsize 100M value is an illustrative live VBV buffer choice; YouTube does not mandate that buffer size.
  • -g 120 requests a 120-frame GOP, or two seconds at 60 fps. -bf 2 sets two B-frames, in line with YouTube’s recommendation.
  • -pix_fmt yuv420p and -profile:v high are for this SDR H.264 template. Check that your input and build support the chosen format and profile.
  • -r 60 requests a 60 fps output. It does not make a lower-frame-rate source contain real 60 fps motion.
  • -c:a aac -b:a 128k -ar 44100 encodes audio as AAC at 128 kbps and 44.1 kHz. Adjust stream mapping and audio settings to suit the actual input and YouTube’s requirements.
  • -f flv muxes the outgoing stream for the RTMP-family ingest connection; the destination in this template is RTMPS.

The command combines YouTube’s destination recommendations with FFmpeg/NVENC options; it is a template, not a tested configuration for every Linux system. Verify the options against your local build, then test with the actual source and a private YouTube stream before relying on it.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Choose HEVC for SDR only when your setup supports it

For a YouTube-bound 2160p60 SDR stream, YouTube’s recommended HEVC target is 35 Mbps. In the template, substitute -c:v hevc_nvenc for -c:v h264_nvenc, and set -b:v 35M -maxrate 35M. Keep CBR and the two-second GOP. Select an HEVC-compatible profile and pixel format that the GPU and FFmpeg build actually support; the H.264-specific yuv420p and high settings should not be copied blindly.

NVIDIA’s Video Codec SDK 13.1 includes a 4K60 HEVC live example using a 20 Mbps target and 40 Mbps VBV buffer, among other settings. That example is not YouTube’s current recommended 2160p60 HEVC bitrate; use YouTube’s 35 Mbps target for this destination unless you have a deliberate bandwidth constraint. See NVIDIA’s FFmpeg/NVENC documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

For HDR, preserve the source’s color pipeline

Use HEVC Main 10 for YouTube HDR, with a genuine 10-bit HDR source and correct color metadata. NVIDIA’s YouTube HDR guidance says to use Low or Normal latency, not Ultra Low. HDR signaling must match the source’s transfer function and metadata; fixed HDR color flags pasted into an SDR workflow can misrepresent the image. Do not treat HDR as a quality switch or convert an SDR source to HDR by changing encoder flags. Consult YouTube’s live encoder settings and NVIDIA’s Video Codec SDK guidance for the applicable HDR details.

Test a representative stream and troubleshoot by symptom

  1. Run a private or otherwise controlled test with the real source, intended audio and planned bitrate. Check that YouTube receives 3840×2160 progressive video at the expected frame rate and reports healthy stream status.
  2. Test representative motion and audio, not just a static frame. Watch for encoder overload, dropped frames, audio gaps and network instability over a sustained interval.
  3. If the test fails, use the matching symptom below, change one variable at a time, and repeat the test.
Symptom Likely cause to check Practical fix
“Unknown encoder” or NVENC option errors FFmpeg lacks the relevant NVENC encoder or does not accept an option. Check ffmpeg -encoders and the encoder’s local help output. Use an FFmpeg build with NVIDIA hardware encoding support and adjust options to those that build exposes.
GPU or driver is not visible Driver installation, device access or GPU support may be missing. Check nvidia-smi, then verify that the GPU supports the selected codec, profile, resolution and bit depth.
Encoding falls behind or frames are dropped The selected preset, resolution, frame rate or workload exceeds the system’s sustained real-time capacity. Try a faster preset or reduce the output workload, then retest. Do not assume a particular GPU will sustain 4K60 based on its name alone.
YouTube reports unstable or insufficient stream health Upload capacity, network variation or an incorrect bitrate may be involved. Confirm the destination-specific bitrate, check the connection under sustained load, and test with appropriate network headroom.
Wrong resolution or frame rate at ingest The source, filter chain or output settings do not produce 3840×2160 at 60 fps. Inspect input properties and mapping; verify the outgoing stream in YouTube’s health information. A -r 60 flag alone cannot create source detail or natural motion absent from the input.
No audio or wrong audio track The input lacks audio or the mapping selects a different stream. Inspect the input’s audio streams and change -map accordingly; the optional map in the template silently permits no audio.
Washed-out or incorrectly colored HDR HDR metadata, transfer function, bit depth or source color pipeline does not match the encoded output. Verify that the source is actually HDR, use a supported 10-bit HEVC Main 10 path, and preserve source-matched metadata rather than applying generic HDR flags.
Stream does not connect Ingest URL, stream key or protocol may be incorrect. Copy the primary RTMPS ingest address and key from YouTube Live Control Room and confirm the destination string. Treat the key as a credential.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Follow YouTube’s content and live-stream rules

Encoding settings do not grant rights to the video, music or other material in a stream. Before broadcasting, confirm that you have permission for all content and check YouTube’s live-stream encoder and content requirements. Reused or repetitive material may raise separate YouTube policy and monetization issues; technical acceptance of a stream is not a copyright clearance or a guarantee of monetization. Review the rules that apply to your channel and content, and do not rebroadcast material without the necessary rights.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Or let it run in the cloud

If the goal is an always-on YouTube channel rather than a Linux/NVENC encoding exercise, StreamNeo keeps uploaded videos playing as a 24/7 YouTube Live stream from the cloud. Upload a recording or build a playlist, add your YouTube stream key once, and go live. Your computer and home connection do not have to stay on. It is for uploaded video, not a live camera feed.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
  • Every slot streams the uploaded file as made, up to 4K 60fps, at one flat price per slot with no re-encoding or quality tiers.
  • It can automatically recover if YouTube drops the stream.
  • The first day is free with no card, one free day per account. Monthly billing is $9.99 per month.

Start your free StreamNeo day.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How To Create Custom Stickers & Shoutouts In Monster Hunter WildsMonster Hunter WildsBlog20min
  2. How to Get XL Gogoat in Pokemon Legends Z-A (An Extra-Large Gogoat)Pokemon Legends Z-ABlog20min
  3. How to Get Rotting Lightbringer in Diablo 4Diablo 4Blog17min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.