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

To loop a prerecorded video on YouTube Live with FFmpeg, use -stream_loop -1 before the input, encode to YouTube’s supported live-stream settings, and publish to its RTMPS ingest URL with your stream key. For a 1080p30 H.264 starting point, YouTube lists 5 Mbps as the minimum and 14 Mbps as the recommended video bitrate; use CBR, a two-second keyframe interval, and stereo AAC at 128 kbps. Looping the file does not make the computer, network, FFmpeg process, or YouTube ingest failure-proof, so those need separate monitoring and recovery plans.

FFmpeg settings for a 24/7 YouTube stream

YouTube’s published settings depend on codec, resolution, and frame rate. The following table gives the relevant H.264 examples; the figures are YouTube’s current guidance, accessed in 2026, not a guarantee that a particular network or encoder can sustain them.

Output profile Minimum video bitrate Recommended video bitrate
720p30 H.264 3 Mbps 8 Mbps
1080p30 H.264 5 Mbps 14 Mbps

These are H.264 values: if you encode with libx264, use the H.264 row rather than borrowing the value shown for another codec. YouTube lists 10 Mbps as the recommended 1080p30 bitrate for AV1 or H.265/HEVC, versus 14 Mbps for H.264. Higher frame rates and resolutions have different recommendations. See YouTube’s live encoder settings, bitrates, and resolutions for the applicable row.

  • Protocol: RTMP or RTMPS is supported; YouTube recommends RTMPS, which encrypts the connection to Google’s servers.
  • Rate control: Use constant bitrate (CBR).
  • Keyframes: Set a two-second interval; do not exceed four seconds. At 30 fps, two seconds is 60 frames.
  • Video: H.264 is a broadly compatible FFmpeg choice. YouTube also lists H.265/HEVC and AV1 as supported; verify that your FFmpeg build and output path support the codec you choose.
  • Audio: AAC stereo at 128 kbps is YouTube’s recommended advanced setting. Its guidance recommends 44.1 kHz for stereo.
  • SDR: Use Rec. 709, 8-bit SDR. YouTube’s advanced recommendations also include progressive scan, two B-frames, one reference frame, and CABAC; verify the relevant encoder options in your local FFmpeg build.

A 5 Mbps 1080p30 H.264 feed is the published minimum, not YouTube’s recommended bitrate. If your connection has room to sustain it, the 14 Mbps recommendation gives more bitrate headroom for that profile, particularly for motion-heavy material. YouTube advises testing with similar audio and motion to the intended stream and leaving capacity beyond the stream bitrate. The settings and headroom guidance are in YouTube’s encoder settings and streaming tips.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
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.

Loop one video indefinitely with FFmpeg

This illustrative command assumes a conventional 1920×1080, 30 fps input, an FFmpeg build with libx264 and AAC support, and a YouTube RTMPS ingest URL and key from Live Control Room. Replace the three uppercase or example values with yours:

ffmpeg -re -stream_loop -1 -i input.mp4 
  -c:v libx264 -preset veryfast -b:v 5M -maxrate 5M -bufsize 10M 
  -pix_fmt yuv420p -r 30 -g 60 -keyint_min 60 -sc_threshold 0 
  -c:a aac -b:a 128k -ar 44100 -ac 2 
  -f flv "YOUTUBE_RTMPS_INGEST_URL/STREAM_KEY"
  1. Install or verify FFmpeg. Check your local build and confirm that it includes the chosen video encoder, AAC encoder, and required output protocol. Available options vary by build.
  2. Get the ingest details. In YouTube Live Control Room, copy the stream URL and stream key into the encoder destination. Treat the key like a password: keep it out of public scripts, logs, screenshots, and source control. YouTube’s encoder setup instructions explain where to find and enter those values.
  3. Set the video parameters to match the actual output. The example sends H.264 at 5 Mbps with a 60-frame GOP at 30 fps. Change the bitrate, dimensions, and frame rate to match the chosen YouTube profile and your source. In the example, -maxrate 5M matches the target video bitrate and -bufsize 10M is an illustrative encoder choice, not a YouTube-mandated value.
  4. Start the command and check the live preview. Monitor the preview and stream health in Live Control Room. Test the actual upload path, with audio and motion resembling the intended broadcast, before relying on it unattended.

-stream_loop -1 is an input option meaning repeat the input indefinitely; it belongs before the corresponding -i. -re reads a file at its native rate, which is useful when simulating a live source from a file. It is not a universal option for a real-time capture input. FFmpeg options are positional, so their placement affects which input or output they apply to. See the FFmpeg command-line documentation.

The example is a configuration illustration, not a tested command or a promise of uninterrupted service. Values such as -preset veryfast, -bufsize 10M, -pix_fmt yuv420p, -ar 44100, and -sc_threshold 0 are example FFmpeg choices, not mandatory YouTube values. Confirm the output dimensions, frame rate, GOP, audio, and encoder availability against your input and target.

Rank #2
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

How to keep the stream running when something fails

A 24/7 stream has several distinct continuity problems. Repeating the media is only the first.

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

Input repeats, but FFmpeg can still stop

-stream_loop -1 repeats a finite input; it does not restart FFmpeg if the process exits, the host reboots, or an encoder error terminates the job. If unattended operation matters, add a process supervisor and alerting, and make restart behavior visible. Test the restart policy rather than assuming a retry will preserve an uninterrupted viewer session.

Output errors need their own recovery strategy

FFmpeg documents a FIFO output pattern using -f fifo, -fifo_format flv, -attempt_recovery 1, and -recovery_wait_time 1 to attempt recovery every second indefinitely after temporary failures. This is an FFmpeg example, not a guarantee that YouTube will preserve the same player session or that every publishing error is recoverable. Check behavior for your local FFmpeg version and build, then test it against the actual ingest endpoint. The example appears in the FFmpeg full documentation.

Rank #3
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

Do not treat protocol reconnect options documented for input protocols as a universal RTMP output reconnect switch. In particular, HTTP input options such as -reconnect do not, by themselves, recover a YouTube RTMP publishing output. FFmpeg documents protocol-specific behavior in its protocol documentation.

Network and host failures require operational coverage

A network interruption can break a live stream. YouTube recommends leaving about 20% bandwidth room and, when using a primary and backup stream, ensuring their combined bitrate plus that headroom fits the available outbound bandwidth. It also recommends testing backup-encoder failover. For a long-running broadcast, monitor both the publishing process and YouTube’s stream health, alert on failure, and test a fallback path; no FFmpeg loop setting replaces those measures. See YouTube’s streaming tips.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

Preflight checks before going live

  • Check the local FFmpeg version and build, and verify the chosen encoders and output protocol are present.
  • Run an upload-speed test under realistic conditions. Leave bandwidth headroom; a speed-test peak does not establish that the connection can sustain the stream continuously.
  • Test a representative clip with the intended movement and audio. Check the Live Control Room preview and stream-health indicators.
  • Start the encoder in advance, then verify the watch page and playback on a mobile device. YouTube recommends advance setup and continuous monitoring for encoder-based streams.
  • Exercise the fallback encoder by stopping the primary or disconnecting its Ethernet, then confirm the player rolls over as expected.
  • For unattended runs, configure a supervisor, alerting, and a tested restart/failover procedure. Recovery can still involve a gap.
  • Confirm that you have the rights to all material and that the stream complies with YouTube policies. A looping setup does not grant content rights or guarantee monetization.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Playlists, archives, and policy considerations

Multiple files are not the same as looping one file

A playlist or concat workflow must account for compatible stream parameters, timestamps, audio continuity, and what happens when the encoder changes files or restarts. Do not assume that looping one file produces playlist rotation or gapless transitions. Test the specific transitions and output before using a mixed-file sequence for a continuous broadcast.

Rank #4
Sale
acer Video Capture Card HDMI to USB 3.0, 1080P 60FPS/2K 30FPS for Streaming
  • 【1080P 60FPS & 2K 30FPS】Supports HDMI input up to 4K 30FPS for ultra‑clear source signals, and captures/streams smooth footage at max 1080P 60FPS or 2K 60FPS to eliminate motion blur and stuttering, delivering fluid visuals for gaming, live streaming and video recording via high‑speed USB 3.0 transmission.
  • 【USB 3.0 High-Speed Interface】USB 3.0 interface with up to 5Gbps bandwidth for lag-free HD capture and streaming with consoles, cameras, desktops, and laptops. Aluminum casing dissipates heat effectively, ensuring stable performance under prolonged high-bandwidth loads. Note: For best results, use a USB 3.0 port.
  • 【Easy Plug-and-Play design】with no additional driver software required. The 2-in-1 USB-A & Type-C interface design ensures wide compatibility with laptops, desktops, gaming consoles and mobile devices. Its compact and lightweight construction enhances portability, allowing you to carry and use it effortlessly anytime and anywhere.
  • 【Wide Universal Compatibility】Works with diverse devices: laptops, tablets, PS4/PS5, Nintendo Switch, cameras, TV boxes, and Oculus Quest 2/3. It supports major operating systems: Windows 7/8/8.1/10, Mac OS, Linux, Android, and iPadOS 17+. Fully compatible with popular software and streaming platforms like OBS Studio, QuickTime Player, TikTok, Twitch, and YouTube—all without requiring drivers.
  • 【Worry-Free After-Sales Support】Whether you're a newcomer or a seasoned user, feel free to reach out anytime with any questions—your satisfaction is our top priority. NOTE: This capture card supports one-way transmission only (HDMI to USB), and ensure your device is equipped with a USB 3.0 port to achieve optimal performance.

Plan a separate archive for long broadcasts

YouTube’s encoder setup guidance says streams under 12 hours are automatically archived. That statement does not establish that a stream running continuously beyond 12 hours will produce one complete archive. If a complete local copy matters, arrange an independent recording and archive workflow. The same YouTube guidance says monetization applies if the creator is in the YouTube Partner Program; configuring FFmpeg does not itself establish eligibility. See YouTube’s encoder setup guidance.

Or let it run in the cloud

If you do not want a home computer and connection to be responsible for a continuous broadcast, StreamNeo keeps an uploaded video or playlist live on YouTube from the cloud. Upload the recording or build a playlist, add your YouTube stream key once, and go live. It plays uploaded videos rather than broadcasting a camera feed.

  • Nothing has to stay on at home for the cloud stream to keep running.
  • Your video streams as uploaded, up to 4K 60fps, at one price per slot regardless of quality; there are no quality tiers.
  • StreamNeo automatically recovers if YouTube drops the stream.
  • The first day is free with no card, one free day per account.

Each slot includes one always-on stream, 10 GB storage per slot pooled across active slots, looping and playlists, automatic recovery, and support from the StreamNeo team. Plans have the same product; only the billing duration changes. UPI and cards are available in India, and card checkout is available worldwide. For five or more slots, contact support.

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

Monthly: $9.99 per month. Start your free day on StreamNeo.

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.