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

To loop a pre-recorded video on YouTube Live, run FFmpeg on a Linode Compute Instance, pass -stream_loop -1 before the video’s -i input, and send the output to the ingest URL and stream key from YouTube Live Control Room. Preview the broadcast before starting it, and keep the instance running while you want the stream live.

What you need before you start

  • A verified YouTube channel with live streaming enabled. YouTube says the channel must have had no live-streaming restrictions in the previous 90 days, and the minimum age to livestream is 16. Check current eligibility in YouTube’s live-streaming requirements.
  • A Linode (Akamai) Compute Instance running Linux. The Linode guide describes creating an account and instance for a streaming server, but does not establish an instance size, price, or encoding benchmark for this specific workload: Linode’s streaming-server guide.
  • FFmpeg installed with the codecs and protocol support required for your selected output.
  • A prerecorded video file accessible on the instance, plus its exact path.
  • The ingest server URL and stream key for your YouTube encoder stream. Treat the key like a password.

This method is for streaming uploaded video files, not broadcasting a live camera feed. A cloud server can remain online independently of your home computer, but you are responsible for instance administration, file storage, network capacity, and the running FFmpeg process.

Set up YouTube Live and get the ingest details

  1. Open YouTube Studio and go to Create > Go live to open Live Control Room. Select or create an encoder stream and configure its title, visibility, and other event details. YouTube’s encoder setup instructions explain how to connect an encoder.
  2. Copy the server URL and stream key shown for that stream. Use the RTMPS ingest URL if available and supported by your FFmpeg build. YouTube describes RTMPS as RTMP protected by TLS/SSL; see YouTube’s RTMPS guidance.
  3. Keep the key private. Do not place it in a public script, screenshot, repository, or chat. If it is exposed, replace or reset it in YouTube Studio before broadcasting.

Prepare the Linode instance and video

  1. Create a Linux Compute Instance using Linode’s current setup guidance. Apply the distribution’s current security updates and use secure access practices. The appropriate instance size depends on the codec, resolution, frame rate, and whether FFmpeg must encode or can pass through the video; the cited Linode guide does not benchmark this exact workload.
  2. Install FFmpeg with the package instructions for your Linux distribution. Confirm the installed build supports the needed encoder (for example, libx264) and RTMP/RTMPS output.
  3. Copy the video to the server and note its full path. Inspect it with ffprobe /path/to/video.mp4 or another media inspector; verify the video and audio streams, resolution, frame rate, and audio presence before building the output settings.
  4. Ensure the file will remain available for the entire broadcast and that the instance has sufficient storage. If the file has no audio, remove the audio options from the command rather than expecting FFmpeg to create a soundtrack.

Choose compatible output settings

YouTube’s encoder guidance supports RTMP/RTMPS ingest, H.264, H.265/HEVC, and AV1 video, frame rates up to 60 fps, AAC or MP3 audio, and constant bitrate (CBR). For a broadly compatible FFmpeg example, the command below encodes H.264 video and AAC audio. Match resolution and bitrate to the source and the host’s measured outbound capacity; do not assume a Linode size can encode a particular format without testing.

  • Bitrate: Set VIDEO_BITRATE to an appropriate value for the resolution, frame rate, and content, following YouTube’s encoder settings. Use the same target for -b:v and -maxrate in this CBR-style example, and set -bufsize to a compatible rate-control buffer value.
  • Keyframes: YouTube recommends a two-second keyframe interval and says not to exceed four seconds. Set -g to approximately two times the frame rate for a two-second GOP—for example, 60 at 30 fps or 120 at 60 fps. Confirm actual frame rate and output behavior rather than assuming the source is constant-frame-rate.
  • Pixel format: yuv420p is commonly used for compatibility with H.264 playback pipelines.
  • Network headroom: YouTube recommends upload capacity with 20% margin above the total stream bitrate. Include audio and any other traffic when assessing the instance’s available outbound capacity; consult YouTube’s bitrate guidance.

Run FFmpeg in an infinite loop

Use -stream_loop -1 as an input option before -i. The value -1 means repeat indefinitely. FFmpeg documents the input-loop option in its command-line documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Guermok Video Capture Card, 4K USB3.0 HDMI to USB C, 1080P 60FPS & 2K 30FPS
  • 【1080P 60FPS Video Capture Card】 This HDMI game capture card is based on USB3.0 high speed transmission port, input resolution up to 4K@30HZ, output resolution up to 2K@30Hz or 1920×1080@60Hz. Type c and USB interface can meet most of the devices in daily life. Easily meet the online capture, real-time recording, online meetings, live gaming and other functions, so you have a better visual enjoyment. Note: For capture use only; requires capture software to function and is not intended for direct screen casting to a monitor or TV
  • 【Ultra Low Latency Screen Sharing】 HDMI capture card is made of good quality aluminum alloy with strong heat dissipation, allowing you to enjoy ultra low latency while live gaming or video recording or live streaming, avoiding blue screens and lag. This HDMI to USBC capture card supports easy recording of good quality audio or HD video and transferring it to your computer or streaming platform, allowing you to record 60 fps HD video directly on your hard drive and real-time preview
  • 【Plug and Play, Easy to Carry】 This HDMI 1080P video capture card does not require any additional drivers or external power supply, just plug and play for fast capture. The capture card is small and lightweight, so you can put it in your bag for emergencies, making it very portable for outdoor live streaming. It's also a great way to share content in game recording, video conference, video recorder and online teaching
  • 【Wide Compatibility USB Capture Card】 Easily streams to Facebook, Youtube or Twitch. With the connection, this HDMI to USB C/3.0 video capture devices can be working on several Operating Systems and various software: Windows 7/ 8/ 10, Mac OS or above, Linux, Android, Laptop, Xbox One, PS3/PS4/PS5, Camera, DVDs, Set Top Box, Webcame, DSLR, Switch/Switch 2, TV BOX, HDTV, Potplayer/VLC, ZOOM, OBS Studio etc.
  • 【Package Content & Note】 1x HD Audio Capture Card , 1x USB 3.0 to USB C Adapter (A-side 3.0, B-side 2.0), 1x user manual. Please note that you need to restart the OBS Studio software after the audio setup is complete, otherwise it will result in no sound output. When using an adapter, if the device is recognized as USB 2.0, try using the other side with the USB-C port. Simply flip the capture card and reconnect it to be recognized as USB 3.0
ffmpeg -re -stream_loop -1 -i /path/to/video.mp4 
  -c:v libx264 -preset veryfast -b:v VIDEO_BITRATE 
  -maxrate VIDEO_BITRATE -bufsize VIDEO_BUFFER 
  -pix_fmt yuv420p -g KEYFRAME_INTERVAL 
  -c:a aac -b:a 128k -f flv 'RTMPS_INGEST_URL/STREAM_KEY'

This is a configuration template, not a tested command. Replace every uppercase placeholder with a value appropriate to your source and YouTube stream, and use the exact ingest URL and key displayed in Live Control Room. Keep the URL quoted so shell characters in the key are not interpreted. If YouTube provides a complete server URL and key separately, combine them in the format shown by YouTube rather than copying a sample credential.

-re reads the file at its natural playback rate; without it, FFmpeg may send file data faster than real time. The loop option must precede the input it applies to. If you have multiple inputs, position the option before the corresponding -i. For further option details, consult the FFmpeg documentation.

Rank #2
Sale
Capture Card, 4K HDMI Video Capture Card, Game Capture Card, 1080P 60FPS Video Capture Device, HDMI to USB 3.0 Capture Card for Streaming, Work with Camera/Xbox/PS4/PS5/PC/OBS
  • 【1080P HD High Quality】Capture resolution up to 1080p for video source and it is ideal for all HDMI devices such as PS4, PS3, Xbox One, Xbox 360, Wii U, DVDs, DSLR, Camera, Security Camera and set top box. Note: Video input supports 4K30/60Hz and 1080p120/144Hz. Does not support 4K120Hz/144Hz. Output supports up to 2K30Hz.
  • 【Plug and Play】No driver or external power supply required, true PnP. Once plugged in, the device is identified automatically as a webcam. Detect input and adjust output automatically. Won't occupy CPU, optional audio capture. No freeze with correct setting.
  • 【Compatible with Multiple Systems】suitable for Windows and Mac OS. High speed USB 3.0 technology and superior low latency technology makes it easier for you to transmit live streaming to Twitch, Youtube, Facebook, Twitter, OBS, Potplayer and VLC.
  • 【HDMI LOOP-OUT】Based on the high-speed USB 3.0 technology, it can capture one single channel HD HDMI video signal. There is no delay when you are playing game live.
  • 【Support Mic-in for Commentary】Rybozen capture card has microphone input and you can use it to add external commentary when playing a game. Please note: it only accepts 3.5mm TRS standard microphone headset.

Preview, start, and monitor the broadcast

  1. Start the FFmpeg command and watch its output for connection errors, encoder errors, or repeated reconnects.
  2. In Live Control Room, wait for the incoming stream preview and check both picture and sound. Verify a transition across the end of the file to confirm the loop behaves as expected.
  3. When the preview and stream health are satisfactory, start the live event in YouTube. Keep the FFmpeg process and instance running for the duration of the broadcast.
  4. Monitor YouTube’s stream health and the server’s CPU, memory, disk, and network use. Leave the recommended 20% outbound bandwidth margin above the total stream bitrate.

For a long broadcast, account for the fact that YouTube’s cited automatic archive statement applies to streams under 12 hours. Do not assume a single indefinitely running broadcast will be archived as one complete video; plan separate sessions or verify archive behavior for longer events in YouTube’s encoder guidance.

Stop the stream safely

  1. End the live event in YouTube Live Control Room.
  2. Stop FFmpeg with Ctrl+C in the terminal running it, or stop its managed service if you configured one.
  3. Check YouTube Studio for the resulting archived video and confirm the event ended as intended.

Troubleshooting common failures

  • YouTube does not show an incoming preview: Confirm the copied server URL and key belong to the selected encoder stream, that there are no added spaces or shell-parsing problems, and that the instance can reach the ingest service. Try the RTMPS URL if supported by the installed FFmpeg build.
  • FFmpeg reports an unknown encoder or protocol: The installed build may lack the selected codec or RTMP/RTMPS support. Install a build with the required components and verify support before restarting the event.
  • The broadcast buffers or stream health is poor: Check actual outbound throughput and total bitrate, then reduce output bitrate or resolution if needed. YouTube’s 20% bandwidth margin is a recommendation, not a guarantee that a particular instance or route will sustain the stream.
  • The image or audio is rejected or missing: Inspect the file’s streams and output settings. Ensure the audio options match whether the file has an audio stream, and align codec, frame rate, keyframe interval, and bitrate with YouTube’s current encoder guidance.
  • The loop does not repeat: Verify -stream_loop -1 appears before the intended file’s -i. Check FFmpeg logs at the point where playback reaches the file’s end.
  • The process stops when you disconnect: A foreground process may end with its terminal session. Run it in a persistent terminal or configure an appropriate process supervisor, and confirm the process remains active after disconnecting.
  • The stream ends after a server reboot or failure: FFmpeg must be restarted unless you have configured a supervisor or recovery procedure. YouTube can also disconnect an encoder; monitor and restart the process as needed.

Linode versus a computer you already control

Consideration Linode Compute Instance Your own computer
Availability Can run independently of your home computer, provided the instance and process stay up. Requires the computer to stay powered on and connected.
Network Depends on the instance’s outbound capacity and route to YouTube. Depends on your local upload connection; YouTube recommends 20% headroom over total stream bitrate.
Media access Video must be copied to and retained on the instance. Video can remain on local storage available to FFmpeg.
Administration You maintain the Linux instance, software, file, and running process. You maintain the computer, FFmpeg, file, and uninterrupted power and network.
Cost and encoding capacity Current price and capacity for this exact encode are not established by the cited Linode guide; check current Linode terms and test the chosen workload. Depends on hardware and electricity costs; no universal cost or performance comparison is established here.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or let it run in the cloud

If the goal is simply to keep uploaded videos looping on YouTube without maintaining an FFmpeg host, StreamNeo is a cloud option: 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 streams the uploaded video to YouTube, not from a camera.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
Capture Card 4K HDMI Video Streaming to USB 3.0 1080P 60FPS Capture Device
  • High-Quality Video Capture, 4K HDMI Capture Card Ready: Capture smooth and vibrant video with this 4K HDMI capture card, engineered for gamers and content creators who demand crisp 1080P 60FPS video quality. Whether you're streaming to Twitch or recording gameplay for YouTube, your footage will look professional and detailed
  • Plug-and-Play USB Capture Card, No Drivers Needed: Designed as a USB capture card for streaming, this device works instantly out of the box, just plug into your PC or laptop and start capturing. Fully compatible with popular software like OBS Studio, Streamlabs, and XSplit, making setup quick and stress-free for beginners and pros alike
  • Universal Compatibility PS5, Xbox, Switch & More: Stream or record gameplay from virtually any HDMI-enabled device including Nintendo Switch, PS5, Xbox Series X, DSLR cameras, and PCs. The video capture card for gaming supports seamless passthrough so you can play without lag while your audience watches every frame in real time
  • Low-Latency Performance for Smooth Streaming: This capture card for streaming minimizes delay between gameplay and broadcast, so you get reliable, low-latency capture that works well for competitive gaming, live broadcasts, and podcast sessions. Suitable for those building their channel with high-quality, engaging content
  • Compact & Portable Design for Content Creators: Lightweight and portable, this USB 3.0 capture card works well for creators who travel or switch gaming setups often. Throw it in your bag and stream or record wherever you are, at home, events, LAN parties, streaming or studio sessions
Rank #3
Video Capture Card, 4K USB3.0 HDMI to USB C, 1080P60FPS HDMI Capture Card for Streaming, Gaming, Video Recording Compatible with Switch, Xbox, PS4/5, OBS,iPad Mac OS Windows,Camera, Zoom(Silver)
  • 【4K HDMI Input, 2K@30Hz Recording】Powered by a true USB 3.0 high-speed interface, the capture card supports up to 4K@30Hz HDMI input and records at 2K@30Hz or 1080P@60Hz. Perfect for gamers, streamers, and professionals who need crisp, smooth video for live streaming, gameplay recording, or online meetings.
  • 【Ultra Low Latency Screen Sharing】Built with a premium aluminum alloy shell and advanced chipset for stable heat dissipation, ensuring ultra-low latency transmission. Capture high-quality video and dual-channel audio in real time—no lag, no frame drop—ideal for Twitch, YouTube, or OBS streaming.
  • 【Easy Plug and Play, Compact & Portable】No driver or external power required—just plug and play via USB 3.0 or Type-C connection to your Windows or macOS computer. Lightweight and compact design makes it easy to carry for outdoor streaming, live shows, or mobile recording setups.
  • 【Wide Compatibility & Multi-Device Support】Compatible with Windows 7 8 10 11, macOS, Linux,Android and supports most popular software such as OBS, Zoom, VLC, Twitch Studio, and more. Works seamlessly with PS4, PS5, Xbox, Switch, DSLR cameras, TV boxes, and other HDMI-output devices for streaming to YouTube, Twitch, etc.
  • 【What You Get】Includes: HDMI Capture Card, USB 3.0 to USB-C Adapter, User Manual. Tips: Make sure your tablet’s OTG function is enabled before connecting. Test your HDMI device with a monitor first to confirm video and audio output, then connect to the Video Capture Card for recording.
  • One flat price per slot for any uploaded quality up to 4K 60fps, with no re-encoding or quality tiers.
  • Automatic recovery if YouTube drops the stream.
  • The first day is free with no card required, once per account.
  • Monthly option: $9.99 per month. Shorter and longer billing options are available; see StreamNeo pricing.

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.