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 DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
Mountain View desk8 min

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

A source-based Linux FFmpeg template for 4K60 YouTube Live, with NVENC settings, YouTube bitrate targets, HDR guidance, and practical troubleshooting.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a 3840×2160, 60 fps SDR stream from Linux, a practical FFmpeg starting point is NVIDIA NVENC with H.264 at YouTube’s recommended 50 Mbps, constant bitrate, a 120-frame GOP (two seconds), and RTMPS. HEVC is an alternative with a 35 Mbps recommended target. These are platform recommendations, not a guarantee that a particular GPU, driver, FFmpeg build, input, or network can sustain 4K60; check your setup and test a private stream first.

Start with this H.264 SDR command

This template targets 3840×2160 at 60 fps using H.264. Replace INPUT with your media file and the final quoted destination with the private RTMPS ingest URL and stream key supplied by YouTube. Do not share or publish the key.

As an Amazon Associate I earn from qualifying purchases.

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"

The command is a source-based template, not a tested universal recipe. It assumes the input has a usable video stream and, optionally, audio. The optional audio map (-map 0:a:0?) allows the command to proceed if there is no audio stream; remove it or change the mapping if your input uses a different stream layout. -re paces a file input in real time. Capture devices and other live inputs may need different input syntax and pacing.

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

What the important options do

  • -c:v h264_nvenc selects NVIDIA hardware H.264 encoding; -preset p5 -tune hq is a starting point, not a promise of the best preset for every GPU.
  • -rc cbr requests constant-bitrate rate control. -b:v 50M -maxrate 50M set the target and cap to YouTube’s recommended H.264 rate for 2160p60. -bufsize 100M is an illustrative two-second live VBV buffer at that rate; YouTube does not mandate this buffer value.
  • -g 120 requests a 120-frame GOP, equivalent to two seconds at 60 fps. YouTube recommends a two-second keyframe interval and says not to exceed four seconds.
  • -bf 2 requests two B-frames, one of YouTube’s recommended advanced settings. -profile:v high selects the H.264 High profile.
  • -pix_fmt yuv420p selects an 8-bit 4:2:0 pixel format for this SDR H.264 path; -r 60 requests 60 fps output. Confirm that this matches the source and intended output.
  • -c:a aac -b:a 128k -ar 44100 encodes audio as AAC at 128 kbps and 44.1 kHz. Adjust channel layout and audio mapping to suit the actual input and broadcast.
  • -f flv selects the streaming container commonly used with RTMP/RTMPS ingest. YouTube recommends RTMPS, a secure extension to RTMP.

Use YouTube’s primary RTMPS ingestion address and the stream name/key associated with it; those values are private and account-specific. YouTube documents how the primary RTMPS endpoint and stream name are supplied in its LiveStreams API documentation. For destination-specific encoder settings, see YouTube’s live encoder settings.

#1 Best Overall
Sale
ASUS Dual GeForce RTX 5060 Ti 16GB GDDR7 OC Edition Gaming Graphics Card | PCIe 5.0, HDMI 2.1b, DisplayPort 2.1b, 2.5-slot, Axial-tech Fans, 0dB Technology, Dual BIOS
  • AI Performance: 767 AI TOPS
  • OC mode: 2632 MHz (OC mode)/ 2602 MHz (Default mode)
  • Powered by the NVIDIA Blackwell architecture and DLSS 4
  • Axial-tech fan design features a smaller fan hub that facilitates longer blades and a barrier ring that increases downward air pressure
  • A 2.5-slot design maximizes compatibility and cooling efficiency for superior performance in small chassis

Choose codec and bitrate for the stream

YouTube’s current recommendations for 2160p60 distinguish H.264 from HEVC and AV1. Minimum figures are not the same as recommended targets, and a bitrate target alone does not ensure a particular visual result: motion, source quality, encoder performance, and network stability all matter.

2160p60 path YouTube-listed minimum YouTube-recommended bitrate Practical note
H.264 SDR 14 Mbps 50 Mbps Use the H.264 command above as a compatibility-first starting point.
HEVC or AV1 SDR 10 Mbps 35 Mbps Encoder support and the ingest workflow must support the chosen codec.

The values are YouTube’s published 2160p60 ingestion recommendations, not independent quality tests or a guarantee of encoder or network capacity. See YouTube’s encoder settings page for its current guidance.

Rank #2
GIGABYTE GeForce RTX 5070 Ti Gaming OC 16G Graphics Card, 16GB 256-bit GDDR7, PCIe 5.0, WINDFORCE Cooling System, GV-N507TGAMING OC-16GD Video Card
  • Powered by the NVIDIA Blackwell architecture and DLSS 4
  • Powered by GeForce RTX 5070 Ti
  • Integrated with 16GB GDDR7 256bit memory interface
  • PCIe 5.0
  • WINDFORCE cooling system

HEVC SDR alternative

For an HEVC-capable GPU and ingest path, replace -c:v h264_nvenc with -c:v hevc_nvenc, use a profile and pixel format supported by your GPU and FFmpeg build, and set -b:v 35M -maxrate 35M. Keep CBR and a two-second GOP as a starting point. Validate the precise encoder options locally with ffmpeg -h encoder=hevc_nvenc and test before using it live.

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

NVIDIA’s Video Codec SDK 13.1 FFmpeg documentation includes a 4K60 HEVC live example using a 20 Mbps target, a 40 Mbps VBV buffer, GOP 120, B-frames, lookahead, and split encoding. That is an NVIDIA example, not YouTube’s destination-specific recommended rate: YouTube’s current 2160p60 HEVC target is 35 Mbps. Do not copy the lower target as though YouTube recommended it. NVIDIA’s example and encoder guidance are documented in the Video Codec SDK 13.1 FFmpeg guide.

Rank #3
ASUS TUF Gaming GeForce RTX™ 5080 16GB GDDR7 OC Edition Graphics Card
  • Powered by the NVIDIA Blackwell architecture and DLSS 4. System Requirements: Minimum 850W PSU with 16-pin 12V-2x6 (12VHPWR) connector required. Verify before purchasing.
  • Military-grade components deliver rock-solid power and longer lifespan for ultimate durability. Compatibility: 348mm (13.7") length, 3.6 slots, 4.3 lbs. Confirm case clearance and slot spacing. GPU bracket included.
  • Protective PCB coating helps protect against short circuits caused by moisture, dust, or debris
  • 3.6-slot design with massive fin array optimized for airflow from three Axial-tech fans
  • Phase-change GPU thermal pad helps ensure optimal thermal performance and longevity, outlasting traditional thermal paste for graphics cards under heavy loads

Use the right settings for SDR or HDR

SDR

For ordinary SDR, use a source-matched SDR workflow. YouTube lists Rec. 709 SDR and recommends the codec-specific bitrate targets above. Do not treat HDR color settings as a general quality upgrade or apply HDR metadata to SDR material.

HDR

YouTube’s cited guidance specifies HEVC for HDR, 10-bit HDR, and does not list AV1 as supported for HDR on that settings page. NVIDIA’s YouTube HDR guidance specifies HEVC Main 10 and Low or Normal latency—not Ultra Low. Use a 10-bit-capable GPU, input, pixel format, and encoding path, and preserve metadata that accurately describes the source’s transfer function and color characteristics. There is no safe set of fixed HDR flags to paste into every command: the correct signaling depends on the actual HDR source and its metadata. Consult YouTube’s encoder settings and NVIDIA’s NVENC FFmpeg guidance.

Rank #4
GIGABYTE GeForce RTX 5060 WINDFORCE OC 8G Graphics Card, Cooling System, 8GB 128-bit GDDR7, PCIe 5.0, Manufactured by NVIDIA, DisplayPort & HDMI - Video Output Interface, GV-N5060WF2OC-8GD Video Card
  • Powered by the NVIDIA Blackwell architecture and DLSS 4
  • Powered by GeForce RTX 5060
  • Integrated with 8GB GDDR7 128bit memory interface
  • PCIe 5.0
  • WINDFORCE cooling system

Check Linux, GPU, FFmpeg, and input before streaming

  1. Verify NVIDIA visibility. Run nvidia-smi and confirm the GPU and driver are visible. The GPU must support the codec, profile, bit depth, and resolution you plan to use; a NVIDIA brand name alone does not establish those capabilities.
  2. Verify encoder support in this FFmpeg build. Run ffmpeg -encoders and check for h264_nvenc and/or hevc_nvenc. Then inspect available options with ffmpeg -h encoder=h264_nvenc or ffmpeg -h encoder=hevc_nvenc. NVIDIA’s FFmpeg guidance assumes a binary built with NVIDIA hardware-acceleration support.
  3. Inspect the input. Confirm it contains the expected 3840×2160 video, the intended frame rate, the audio stream you want, and the correct SDR/HDR characteristics. Adjust stream mapping if audio or video is not at the assumed index.
  4. Check ingest credentials privately. Copy the primary RTMPS address and associated stream key from YouTube’s live setup. Keep the key out of public scripts, screenshots, logs, and shared chat.
  5. Run a representative private test. Use footage with motion and audio similar to the planned stream. Confirm the picture, sound, keyframe cadence, stream health, and real-time encoding behavior before the event. YouTube recommends checking audio and representative motion and monitoring stream health.

Tune for real-time headroom, not just quality

NVENC preset choices trade encoding quality against available performance. The p5 preset is a conservative starting point here, not a universal optimum. If your specific GPU encodes continuously in real time with headroom, test a higher-quality preset; if it falls behind or drops frames, move toward a faster preset and retest. The feasibility of 4K60 depends on the input, GPU generation, driver, FFmpeg build, and network. The cited official guidance does not establish a model-by-model Linux benchmark or certify that every NVIDIA GPU can sustain every preset at 4K60.

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

YouTube recommends CBR, up to 60 fps, progressive scan, two B-frames, one reference frame, and a two-second keyframe interval (not more than four seconds). The template sets two B-frames and a 120-frame GOP, but does not explicitly set a reference-frame count; NVENC options vary by build, so inspect the installed encoder help rather than assuming a flag is accepted. YouTube’s 4K streams use normal latency in its guidance; NVIDIA treats latency tolerance separately from quality/performance choices. Avoid copying file-transcoding options into a live command without checking their effect on latency and sustained real-time encoding.

Best Value
ASUS TUF Gaming GeForce RTX 5070 12GB GDDR7 OC EditionGaming Graphics Card
  • Powered by the NVIDIA Blackwell architecture and DLSS 4 OC mode: 2640MHz/Default mode: 2610MHz (Boost Clock)
  • Military-grade components deliver rock-solid power and longer lifespan for ultimate durability
  • Protective PCB coating helps protect against short circuits caused by moisture, dust, or debris
  • 3.125-slot design with massive fin array optimized for airflow from three Axial-tech fans
  • Phase-change GPU thermal pad helps ensure optimal thermal performance and longevity, outlasting traditional thermal paste for graphics cards under heavy loads
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common failures

  • “Unknown encoder” or an NVENC initialization error: the FFmpeg binary may lack NVENC support, the driver may not expose the GPU, or the GPU/build combination may not support the requested codec or option. Check ffmpeg -encoders, the encoder’s help, and nvidia-smi; confirm the selected codec and profile are supported.
  • Frames arrive late or the encoder falls behind: the selected preset or workload may exceed real-time capacity. Try a faster preset, reduce other GPU load, and run a sustained test with representative motion. Do not assume changing the bitrate alone solves a GPU throughput limit.
  • YouTube reports bitrate or stream instability: check that the command uses the intended rate control and target, that the uplink can sustain the stream, and that YouTube is receiving RTMPS at the correct ingest address. A published bitrate recommendation is not a guarantee of your network capacity.
  • Stream does not start or reaches the wrong channel: recheck the private RTMPS URL and stream key in YouTube’s live setup, including which stream is active. Never expose the key when seeking help.
  • Picture is wrong size or frame rate: inspect the input and output properties and confirm the actual 3840×2160, 60 fps path. The -r 60 option requests an output rate; it cannot make unsuitable source footage contain genuine 60 fps motion.
  • No audio, wrong audio, or silence: confirm the source audio stream and mapping. The template maps the first audio stream only if present; choose the correct stream and channel layout for your file or capture source.
  • HDR looks washed out or incorrectly colored: check that the source is actually HDR, that the pipeline is 10-bit HEVC Main 10, and that color metadata matches the source. Do not add generic HDR flags to SDR or guess transfer-function metadata.

Copyright and YouTube channel rules still apply

Encoding settings do not grant rights to the video or audio you broadcast and do not guarantee monetization. Use content you own or have permission to stream, including music, and review YouTube’s live-stream and channel policies for the current requirements. Replaying a file as live content does not by itself establish that it complies with copyright rules or monetization policies. You can use StreamNeo’s copyright safety checklist as a preflight aid; it is not a substitute for permission or YouTube policy.

Or let it run in the cloud

If your goal is a YouTube channel that stays live with uploaded video, StreamNeo is a cloud alternative to keeping a Linux computer running. Upload a recording or build a playlist, add your YouTube stream key once, and go live; StreamNeo loops the uploaded video from the cloud. It does not broadcast from a camera and streams to YouTube only.

  • Your computer and home connection do not have to stay on.
  • Video streams as uploaded, up to 4K 60fps, with no re-encode and one flat price per slot for any quality.
  • Automatic recovery if YouTube drops the stream.
  • The first day is free with no card (one free day per account); billing options are a day, a week, a month, 6 months, or a year, and you can cancel any time. Every slot includes 10 GB storage, pooled across active slots, plus looping, playlists, and StreamNeo team support.
  • Monthly: $9.99 per month.

See StreamNeo for details, or start the free first day.

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

Quick Recap

SaleBestseller No. 1
ASUS Dual GeForce RTX 5060 Ti 16GB GDDR7 OC Edition Gaming Graphics Card | PCIe 5.0, HDMI 2.1b, DisplayPort 2.1b, 2.5-slot, Axial-tech Fans, 0dB Technology, Dual BIOS
ASUS Dual GeForce RTX 5060 Ti 16GB GDDR7 OC Edition Gaming Graphics Card | PCIe 5.0, HDMI 2.1b, DisplayPort 2.1b, 2.5-slot, Axial-tech Fans, 0dB Technology, Dual BIOS
AI Performance: 767 AI TOPS; OC mode: 2632 MHz (OC mode)/ 2602 MHz (Default mode); Powered by the NVIDIA Blackwell architecture and DLSS 4
$768.60
Bestseller No. 2
GIGABYTE GeForce RTX 5070 Ti Gaming OC 16G Graphics Card, 16GB 256-bit GDDR7, PCIe 5.0, WINDFORCE Cooling System, GV-N507TGAMING OC-16GD Video Card
GIGABYTE GeForce RTX 5070 Ti Gaming OC 16G Graphics Card, 16GB 256-bit GDDR7, PCIe 5.0, WINDFORCE Cooling System, GV-N507TGAMING OC-16GD Video Card
Powered by the NVIDIA Blackwell architecture and DLSS 4; Powered by GeForce RTX 5070 Ti; Integrated with 16GB GDDR7 256bit memory interface
Bestseller No. 3
ASUS TUF Gaming GeForce RTX™ 5080 16GB GDDR7 OC Edition Graphics Card
ASUS TUF Gaming GeForce RTX™ 5080 16GB GDDR7 OC Edition Graphics Card
3.6-slot design with massive fin array optimized for airflow from three Axial-tech fans; Auto-Extreme precision automated manufacturing helps ensure higher reliability
$1,829.99
Bestseller No. 4
GIGABYTE GeForce RTX 5060 WINDFORCE OC 8G Graphics Card, Cooling System, 8GB 128-bit GDDR7, PCIe 5.0, Manufactured by NVIDIA, DisplayPort & HDMI - Video Output Interface, GV-N5060WF2OC-8GD Video Card
GIGABYTE GeForce RTX 5060 WINDFORCE OC 8G Graphics Card, Cooling System, 8GB 128-bit GDDR7, PCIe 5.0, Manufactured by NVIDIA, DisplayPort & HDMI - Video Output Interface, GV-N5060WF2OC-8GD Video Card
Powered by the NVIDIA Blackwell architecture and DLSS 4; Powered by GeForce RTX 5060; Integrated with 8GB GDDR7 128bit memory interface
$497.06
Bestseller No. 5
ASUS TUF Gaming GeForce RTX 5070 12GB GDDR7 OC EditionGaming Graphics Card
ASUS TUF Gaming GeForce RTX 5070 12GB GDDR7 OC EditionGaming Graphics Card
3.125-slot design with massive fin array optimized for airflow from three Axial-tech fans; Auto-Extreme precision automated manufacturing helps ensure higher reliability
$937.39

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.

Leave a Reply

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

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.