To loop a local 3840×2160, 60 fps SDR video to YouTube Live with an NVIDIA GPU, use FFmpeg’s -stream_loop -1 to repeat the file and -re to read it in real time. This H.264/NVENC command is a starting point; check your source, GPU, network and YouTube stream health before relying on it.
FFmpeg command for a 4K60 SDR file
ffmpeg -re -stream_loop -1 -i "input.mp4"
-map 0:v:0 -map 0:a:0?
-c:v h264_nvenc -preset p5 -rc cbr
-b:v 50M -maxrate 50M -bufsize 100M
-g 120 -bf 2
-c:a aac -b:a 128k -ar 44100
-f flv "rtmps://YOUR_INGEST_URL/YOUR_STREAM_KEY"
- Replace
input.mp4with the path to your video. - In YouTube Live Control Room, copy the ingest address and stream key into the final RTMPS URL. Keep the key private; anyone with it may be able to broadcast to your channel.
- Run the command in a terminal on a computer with a compatible NVIDIA GPU and an FFmpeg build that includes
h264_nvenc.
The command assumes the input is already 3840Ă—2160 at 60 fps, has audio, and is suitable for an SDR H.264 stream. It does not upscale or convert a different source to 4K60.
What the options do
-rereads the file at its native frame rate, pacing file playback in real time rather than sending it as fast as possible.-stream_loop -1repeats the input indefinitely. Both are input options, so they belong before-i. See the FFmpeg documentation.-map 0:v:0selects the first video stream.-map 0:a:0?selects the first audio stream if one exists; the question mark makes that mapping optional. Change the mapping if your file’s streams differ.-c:v h264_nvencselects NVIDIA’s hardware H.264 encoder.-preset p5and-rc cbrselect an encoder preset and constant-bitrate rate control; available options and performance depend on your GPU and FFmpeg build.-b:v 50Msets the target video bitrate to 50 Mbps.-maxrate 50Msets its maximum, and-bufsize 100Msets the rate-control buffer.-g 120sets a 120-frame GOP, equivalent to a two-second keyframe interval at 60 fps.-bf 2requests two B-frames.-c:a aac -b:a 128k -ar 44100encodes audio as AAC at 128 Kbps and 44.1 kHz. If your file has no audio, remove the audio mapping and audio options.-f flvselects the output container used for this RTMP(S) stream.
Match the stream to YouTube’s ingest guidance
YouTube Help’s current encoder recommendations, checked on 2026-10-03, list 50 Mbps for H.264 at 2160p60 and 35 Mbps for AV1 or H.265/HEVC at that resolution. The retrieved page does not state a publication year. It recommends CBR, a two-second keyframe frequency (not exceeding four seconds), frame rates up to 60 fps, and AAC or MP3 audio. For stereo it lists 128 Kbps and 44.1 kHz. Its advanced settings include progressive scan, two B-frames, one reference frame, square pixels and Rec. 709 for SDR. See YouTube’s encoder recommendations.
YouTube recommends RTMPS, the secure extension to RTMP. Its guidance also says 2160p streams use normal latency because low latency is unavailable at that resolution. Test with representative picture movement and audio, then watch stream health in Live Control Room before depending on the broadcast.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
- 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
Check your file, FFmpeg build, GPU and upload connection
- Inspect the source before streaming: confirm its dimensions, frame rate, audio streams, pixel format and SDR or HDR characteristics. Configure the command for what the file actually contains.
- Check encoder availability with
ffmpeg -h encoder=h264_nvenc. A listed encoder does not guarantee that your specific GPU supports the required format or can sustain a 4K60 encode. NVIDIA’s NVENC application note describes hardware encoder capabilities; supported codecs, profiles, bit depth, dimensions, frame rate and performance vary by GPU. The NVIDIA FFmpeg guide includes 4K60 and live-streaming examples. - Make sure your upload connection can sustain the video bitrate plus audio and protocol overhead, with headroom. YouTube’s recommended video bitrate alone is not the total stream bitrate.
- Watch and listen to a test broadcast. The end-to-start transition can create a visible or audible jump; use a seamless source if that matters.
Choosing a codec, including for HDR
The command uses H.264 because its 50 Mbps target matches YouTube’s listed 2160p60 H.264 recommendation. YouTube lists 35 Mbps for AV1 or HEVC at 2160p60, but that does not make either codec universally better: compatibility, supported GPU encoding and the source all matter. Check your exact card and installed FFmpeg options rather than assuming a codec or setting is available.
For HDR, do not use the SDR command unchanged. YouTube recommends H.265/HEVC over RTMP(S) for HDR, with 10-bit HDR and the relevant color metadata; its listed settings do not support AV1 for HDR. Verify that the source, encoder, metadata and full delivery path preserve the intended color characteristics before going live. See YouTube’s encoder recommendations.
Rank #2
- 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
Troubleshooting a failed or unhealthy stream
| Symptom | What to check |
|---|---|
FFmpeg cannot find or initialize h264_nvenc |
Confirm your FFmpeg build includes the encoder and your NVIDIA GPU supports the required input and 4K60 encode. Check ffmpeg -h encoder=h264_nvenc and your GPU’s capabilities. |
| YouTube does not receive the broadcast | Recheck the ingest address and stream key in Live Control Room, the RTMPS URL, outbound connectivity and firewall rules. Do not expose the key when sharing logs or command lines. |
| Stream health reports problems or playback stutters | Check network stability and available upload capacity against the full stream bitrate, not just the video target. Confirm the GPU sustains real-time encoding and review FFmpeg output and YouTube stream health. |
| No audio reaches the stream | Check whether the file contains an audio stream and whether -map 0:a:0? selects the intended one. Adjust mapping for files with a different stream layout. |
| FFmpeg exits or the stream behaves unexpectedly | Check file timestamps and formats, encoder initialization, the selected audio stream, network stability and ingest settings. Test with the same source and settings before relying on an unattended run. |
| A hitch or jump repeats at the loop point | The file’s end and beginning may not join cleanly. Edit or prepare a seamless loop if the boundary must be unobtrusive. |
Because this is file input, real-time pacing with -re is appropriate. FFmpeg cautions against applying read-rate limiting carelessly to an actual capture or live input, where it can cause packet loss.
Or let it run in the cloud
If the goal is an always-on YouTube channel rather than managing a local FFmpeg process, StreamNeo loops uploaded videos 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; StreamNeo automatically recovers if YouTube drops the stream. It sends videos as uploaded, up to 4K 60fps, at one flat price per slot, with no re-encode or quality tiers. The first day is free with no card. Monthly: $9.99 per month.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Quick Recap
Best Value
- 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
Rank #4
- 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
Rank #3
- 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
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.




