To stream a prerecorded video from Ubuntu Server at 4K and 60 fps, inspect the file, configure FFmpeg to encode a real-time output that matches YouTube’s ingest requirements, and send it to the RTMPS destination and stream key shown in YouTube Live Control Room. For H.264 at 2160p60, YouTube’s current recommendation is 35 Mbps CBR with a two-second keyframe interval. FFmpeg’s -re option paces file input in real time; looping and unattended recovery need separate validation on your installed system.
What you need before starting
- An Ubuntu Server host with the video file available locally and enough sustained CPU or supported hardware-encoder capacity to produce 3840×2160 at 60 fps.
- An FFmpeg build that includes the encoder you intend to use. Availability depends on the build installed on your server.
- A YouTube channel with access to Live Control Room, where you can obtain the current RTMPS ingest destination and stream key.
- A stable upload connection able to sustain the encoder’s bitrate, with additional capacity for network variation. YouTube recommends testing the connection but does not specify a universal headroom multiplier.
A 4K output setting cannot add detail absent from the source. If the file is lower resolution, encoding it at 3840×2160 is upscaling, not native 4K.
Inspect the source file and FFmpeg build
Check the media properties
Use ffprobe or an equivalent media inspector to check the video dimensions, frame rate, codecs, and audio and video streams. Confirm the file actually contains the picture and frame rate you expect. A 60 fps output target requires the source and encoding process to support it; a lower-frame-rate source does not become true 60 fps footage simply by selecting a 60 fps output.
Confirm encoder availability and sustained performance
Check which encoders your installed FFmpeg build provides before choosing software or hardware encoding. Producing 4K60 is compute-intensive. The relevant choice depends on whether the encoder is available, whether it can sustain the workload, the image quality it delivers at the chosen bitrate, and the host’s power and thermal limits. No single encoder choice or Ubuntu package build is established as suitable for every server; test your own host before relying on it.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitches#1 Best Overall
- 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.
Get YouTube’s ingest details
- Open YouTube Live Control Room and create or select the intended live stream.
- Copy the current RTMPS ingest destination and stream key provided there. Use the destination and key shown for your stream rather than assuming a fixed server address.
- Keep the stream key secret. Anyone who obtains it may be able to publish to your channel.
YouTube says, “We recommend streaming to YouTube Live with RTMPS, a secure extension to the popular RTMP video protocol.” Its current encoder guidance recommends H.264, H.265, or AV1; up to 60 fps; constant bitrate (CBR); and a two-second keyframe interval, not exceeding four seconds. For 4K streams, YouTube’s low-latency option is unavailable, so the stream uses normal latency. See YouTube’s encoder settings guidance.
Configure real-time pacing and the 4K60 output
For file input, FFmpeg documents -re as reading at the input’s native frame rate; it is equivalent to -readrate 1. This pacing is useful when output packet timing matters, including live streaming. Place input options such as -re before the corresponding -i option.
Rank #2
- 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.
Set the encoder’s output to match the intended format and YouTube’s current recommendations. For H.264 at 3840×2160 and 60 fps, use CBR at YouTube’s recommended 35 Mbps, with a two-second keyframe interval. Select an encoder available in your FFmpeg build and confirm it can sustain the workload. If you use H.265 or AV1 instead, YouTube lists a 10–40 Mbps range for those codecs; the H.264 recommendation should not be applied to them as though it were the same setting.
The official FFmpeg documentation available for this guidance does not establish the exact syntax for indefinite file looping. Verify the loop option and behavior against the documentation for your installed FFmpeg version; do not assume a loop command copied from another version will work as intended.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
- 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.
Use the current official references for details that can change: YouTube encoder settings, FFmpeg documentation, and YouTube’s liveStreams API reference and RTMPS ingestion guidance.
Test the broadcast before leaving it running
- Start a test stream using the intended file, encoder, bitrate, frame rate, and RTMPS details.
- Check representative motion and audio rather than testing only a static frame or silent clip.
- In YouTube’s monitoring tools, verify the received resolution and frame rate and review stream-health messages.
- Confirm that the server sustains the encoding workload and the network sustains the outgoing bitrate throughout the test.
- Only rely on a longer broadcast after you have checked the behavior you need, including what happens when the process exits or the network drops.
YouTube recommends testing with representative movement and audio and monitoring stream health during the event. Its H.264 bitrate guidance is a recommendation, not proof that a particular server or network can deliver a stable stream.
Rank #4
- 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
Plan for looping and unattended operation
Real-time pacing, repeating a file, and recovering from failures are separate problems. Validate the indefinite-loop configuration for your installed FFmpeg version. For unattended operation, separately design and test process supervision, restart behavior, logging, and handling of network interruptions. A command that sends one stream does not by itself guarantee automatic reconnects or continuous operation, and no particular Ubuntu service configuration is established here.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Common problems and what to check
- YouTube reports the wrong resolution or frame rate: Recheck the source properties, encoder output settings, and what YouTube actually receives. An output label alone does not establish that the source is native 4K60.
- The stream buffers or loses health: Check whether the server can sustain encoding and whether the upload connection can sustain the configured bitrate. Test under representative conditions; there is no universal upload headroom multiplier stated in YouTube’s guidance.
- The file plays too quickly or output timing is irregular: Confirm that
-reis placed before the corresponding input’s-i. It paces file reading in real time; it does not solve encoder overload or network instability. - The file does not repeat: Check the loop syntax and behavior against the documentation for the FFmpeg version installed on the server. The exact indefinite-loop command is version-specific and is not established here.
- The stream stops after a process or connection failure: Treat supervision and recovery as separate requirements. Test process restarts, network interruption handling, and logs rather than assuming FFmpeg or YouTube will restart the entire workflow automatically.
- The stream key is rejected or the wrong channel goes live: Re-copy the current key and destination from the correct Live Control Room stream, and keep the key private.
Or let it run in the cloud
If your aim is a continuous prerecorded YouTube stream without maintaining an Ubuntu server, StreamNeo offers a cloud-based alternative: upload your video or build a playlist, add your YouTube stream key once, and go live. The uploaded video loops from the cloud, so nothing has to stay on at home. It streams the upload as made, up to 4K 60fps, at one price per slot, and automatically recovers if YouTube drops the stream. The first day is free with no card required. Monthly pricing is $9.99 per month. StreamNeo is for prerecorded video streaming to YouTube, not camera broadcasts. Start the free day on StreamNeo.
Best Value
- 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.
Copyright and YouTube policy checks
Before broadcasting a loop, confirm that you have the necessary rights to every video and audio track. A live stream can still raise copyright issues when the material is prerecorded, and authorization to upload a video does not automatically establish permission to rebroadcast it. Review YouTube’s current rules and any rights-holder restrictions for your content before going live.
Quick Recap
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.




