DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober 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
4K streaming

How to Run a 4K 60fps YouTube Live Loop on Ubuntu Server

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

To run a prerecorded video continuously on YouTube Live from Ubuntu Server, configure an encoder to send the video and audio repeatedly to your YouTube stream URL and key over RTMPS. Set the output to 3840×2160 at 60 fps and follow YouTube’s bitrate guidance for your chosen codec. Before leaving it unattended, confirm in YouTube’s Live Control Room that the incoming stream has the expected resolution and frame rate and that stream health is good.

YouTube’s documentation establishes the ingest settings and credential flow, but it does not validate a universal Ubuntu or FFmpeg command. The command below is an implementation example: check it against your installed FFmpeg build, encoder, source file and audio before relying on it.

What you need before starting

  • An Ubuntu Server machine with FFmpeg installed and an encoder capable of processing your source at the intended resolution and frame rate in real time.
  • A stable internet connection with enough sustained upload capacity for the chosen video bitrate, plus audio and network overhead. YouTube’s recommended bitrate is not a measurement of your server’s or ISP’s capacity.
  • A prerecorded video with a usable audio track, or a deliberate choice to send no audio. Check its streams and properties before encoding.
  • A YouTube channel and a live event set up in YouTube Studio, with its stream URL and key available.

Ubuntu version, FFmpeg build, installed hardware encoders and source-file properties vary. Confirm those locally rather than assuming a command that works on one server will work unchanged on another.

Choose YouTube’s 4K 60fps ingest settings

The target video frame size is 3840×2160, at 60 frames per second. YouTube’s current encoder guidance recommends the settings below; they specify what to send, not what a particular system can encode or upload.

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.
#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.
Setting YouTube guidance for this workflow
Resolution and frame rate 3840×2160 (2160p), 60 fps
H.264 bitrate 35 Mbps recommended at 4K/2160p 60 fps
H.265/HEVC or AV1 bitrate 10–40 Mbps listed ingest range at 4K/2160p 60 fps
Rate control CBR recommended
Keyframe interval 2 seconds recommended; do not exceed 4 seconds
Video codecs listed H.264, H.265/HEVC and AV1

Use a codec your installed encoder can actually produce at 4K 60fps without falling behind. Which codec and bitrate are practical depends on the CPU or GPU, FFmpeg build, source characteristics and network. YouTube recommends RTMPS for ordinary live ingestion: Choose live encoder settings, bitrates, and resolutions.

Create the YouTube Live event and protect its key

  1. Open YouTube Studio and create or select the live stream/event you intend to use.
  2. In the stream setup, copy the server URL and stream key shown for that event. Use YouTube’s documented stream-key and encoder setup flow: Set up your encoder for live streaming.
  3. Keep the key private. YouTube treats it like a password: do not publish it, commit it to a repository, or expose it in shared scripts or public logs. If it is exposed, reset it in YouTube Studio before continuing. See YouTube’s stream key guidance.
  4. Use the RTMPS endpoint provided for your stream. YouTube recommends RTMPS for normal live ingestion; its implementation guidance uses a valid RTMPS endpoint on port 443. See RTMPS ingest protocol.

YouTube can detect resolution and frame rate automatically, which is its default recommendation, or you can use a custom stream key and manual settings. Either way, verify the received format in Live Control Room rather than relying only on the encoder’s configured output: encoder settings and Live Control Room stream health.

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.

Inspect the source and installed FFmpeg encoder

Before constructing an encoder command, identify the video and audio streams, frame rate, dimensions and available encoders. These checks are local diagnostics, not settings prescribed by YouTube.

ffprobe -hide_banner -i /path/to/video.mp4
ffmpeg -hide_banner -encoders

Choose a video encoder listed by your FFmpeg build and confirm it is compatible with your hardware. A software H.264 encoder and a hardware encoder have different options and performance limits. Forcing 60 fps or scaling to 3840×2160 does not make a low-frame-rate source contain new motion detail; it changes the output format. Ensure the selected encoder can sustain the target rate before leaving it running.

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.

Build and test a looping RTMPS command

The following is a template, not a verified, drop-in Ubuntu recipe. Replace the input path, encoder options and YouTube destination with values appropriate to your source and installed encoder. Keep the stream key out of shell history and process listings where possible; a protected configuration or secret-injection method is safer than pasting a credential into a shared command.

ffmpeg -re -stream_loop -1 -i /path/to/video.mp4 
  -map 0:v:0 -map 0:a? 
  -vf "scale=3840:2160:force_original_aspect_ratio=decrease,pad=3840:2160:(ow-iw)/2:(oh-ih)/2,fps=60" 
  -c:v libx264 -preset veryfast -b:v 35M -minrate 35M -maxrate 35M -bufsize 70M 
  -g 120 -keyint_min 120 -sc_threshold 0 
  -c:a aac -b:a 192k -ar 48000 
  -f flv "rtmps://YOUR_INGEST_ENDPOINT/YOUR_STREAM_KEY"

This illustrates an H.264 path with a 35 Mbps target and a 120-frame GOP, which corresponds to two seconds at 60 fps. It is not proof that libx264, these exact options, the optional-audio mapping, or the chosen filter chain is available or suitable on your server. Verify encoder support and output behavior with your FFmpeg version. In particular, if the source is not 16:9, the scale-and-pad filter preserves its aspect ratio by adding bars; choose a different crop or layout only if that is intentional.

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

The example embeds a placeholder URL, not a real credential. Construct the actual destination using the stream URL and key YouTube provides for the event; do not publish the resulting command with a live key in it. For AV1 or H.265, select an installed encoder that supports the format and use YouTube’s listed 10–40 Mbps range as guidance rather than copying the H.264 bitrate. Encoder-specific options and performance must be checked locally.

Confirm the output before relying on it

  1. Start the event and send a short test first, if your event setup allows it.
  2. Watch FFmpeg’s output for encoder errors, dropped or duplicated frames, connection failures and interruptions at the loop boundary.
  3. In YouTube Live Control Room, confirm the incoming resolution, frame rate and stream health. A configured 3840×2160/60 output is not confirmation that YouTube received that format.
  4. Check both picture and sound, including the transition where the video loops back to its start.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Keep the Ubuntu stream running unattended

The loop and restart policy are server-side implementation choices; YouTube’s documentation does not certify a particular Ubuntu command, process supervisor or service file. Do not treat a successful short test as proof of reliable unattended operation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.
  • Run the process under an account with access only to the media and configuration it needs.
  • Use a service manager or supervisor if you require restart after a process failure or reboot. Configure logs with care so the stream key cannot leak.
  • Monitor process health, available disk space, sustained upload capacity and YouTube’s stream health. A restart policy cannot fix an invalid key, unsupported encoder or failing connection.
  • Test recovery deliberately and verify that a restarted encoder reconnects to the intended event and resumes sending a valid feed.

To end transmission, stop sending content from the encoder. YouTube says streams under 12 hours are automatically archived; see YouTube’s live stream archive guidance.

RTMPS or HLS?

For ordinary live ingestion, use RTMPS. YouTube describes HLS as an alternate ingest option for cases such as HDR or codecs that RTMP does not support. HLS sends segments rather than one continuous RTMP-style stream, so it can introduce higher latency. Choose it only when your codec or HDR requirements call for it and your encoder supports YouTube’s HLS workflow: Stream using a custom HLS ingest URL.

Copyright and YouTube channel rules still apply

A prerecorded loop remains a YouTube livestream, so having permission to upload a file does not automatically clear every right needed for continuous public streaming. Check rights for the footage, music, performances and other material, and review YouTube’s applicable policies before scheduling a long-running event. Repeating content does not itself establish that it is permitted or suitable for monetization; YouTube’s channel monetization policies address reused and repetitive content separately from the technical ingest settings. Review the current YouTube channel monetization policies and use the platform’s notices and restrictions as they appear for your channel.

Troubleshoot common failures

Symptom Likely area to check What to do
YouTube receives no signal Wrong event URL or key, connection, firewall, or encoder exit Re-copy the event’s URL and key in Studio, protect and verify the credential, then inspect FFmpeg errors and outbound connectivity to the RTMPS endpoint on port 443.
Received stream is not 4K or 60 fps Encoder output, source properties, or YouTube ingest status Inspect FFmpeg’s output configuration and source; then check the received resolution and frame rate in Live Control Room. Do not infer receipt from command-line settings alone.
Frames drop or encoding falls behind Insufficient CPU/GPU capacity or an unsuitable encoder configuration Test the chosen encoder locally at the target settings, reduce other system load, or choose an encoder your hardware can sustain. Confirm that any changed codec follows YouTube’s guidance.
Stream health is poor or feed disconnects Upload capacity, network stability, or server interruption Check sustained upload performance and the encoder/network logs. Allow overhead beyond the video bitrate; a nominal ISP plan does not establish sustained throughput.
Playback has no sound or breaks at the loop point Source audio stream mapping or media boundary Inspect the source with ffprobe, confirm the intended audio stream is mapped and encoded, and test the transition in a short run.
Key or authentication errors after a reset Encoder still using an old credential Update the protected configuration with the current Studio key and restart the encoder without exposing the new key in logs or public scripts.

Or let it run in the cloud

If you would rather not maintain an Ubuntu server and encoder process, StreamNeo keeps an uploaded video or playlist live on YouTube from the cloud:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Upload your recording or build a playlist.
  2. Add your YouTube stream key once.
  3. Go live; StreamNeo loops the video from the cloud, so your computer and home connection do not have to stay on.

Each slot streams the upload as made, up to 4K 60fps, at one flat price per slot; there are no quality tiers. It can recover automatically 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. UPI and cards are supported in India; card checkout is available worldwide. See StreamNeo plans, then start your free 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.

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.

Read next

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
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.