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

To repeat a local video file on YouTube Live, create a YouTube stream, then run FFmpeg with -re -stream_loop -1 before the file’s -i option. FFmpeg will read the file at its native frame rate and loop it indefinitely. You still need to match the output encoder settings to YouTube’s current ingest recommendations, confirm the preview in YouTube Studio, and click Go live for a scheduled event.

What the FFmpeg options do

-stream_loop is an input option. Set it to -1 to repeat the input indefinitely, and put it before the -i for the file you want to loop. FFmpeg’s -re option reads input at its native frame rate (equivalent to -readrate 1); FFmpeg documents it as useful when packet timing matters, such as live streaming. For a prerecorded file, put -re before that input too. See the FFmpeg command-line documentation.

Get the YouTube stream URL and key

  1. Open YouTube Studio and go to the Live Control Room. Create or select the live stream you intend to use, following YouTube’s encoder setup instructions.

  2. Copy the server URL and stream key shown for that stream. YouTube describes the key and address as credentials for the encoder; keep the key private and use a placeholder anywhere you publish an example.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    #1 Best Overall
    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.
  3. Choose the intended stream settings in YouTube Studio and consult YouTube’s current encoder settings, bitrate, and resolution guidance before selecting FFmpeg’s output codec and bitrate.

Run FFmpeg to loop the file

This is an illustrative starting command, not a tested universal recipe. Replace input.mp4 with your file and replace the output URL with the server URL and stream key YouTube provides. The example assumes a video stream that can be encoded with libx264 and an audio stream compatible with the AAC settings shown.

ffmpeg -re -stream_loop -1 -i input.mp4 
  -c:v libx264 -preset veryfast -b:v 4500k -maxrate 4500k -bufsize 9000k 
  -g 60 -keyint_min 60 -c:a aac -b:a 128k -ar 44100 
  -f flv 'rtmps://SERVER-URL/STREAM-KEY'

Do not copy the example bitrate or GOP values blindly. The command’s 4500k video bitrate, 60-frame GOP, and other encoder choices are illustrative; choose settings for your actual resolution, frame rate, codec, and YouTube event. The SERVER-URL and STREAM-KEY text is a placeholder, not a working address or credential.

Check the input and available encoder

Before starting, inspect the file’s streams and confirm the codecs and stream types. The example includes audio encoding, so a file without audio may require adjusting the command. Also verify that your FFmpeg build includes the selected encoder; encoder availability depends on how FFmpeg was built. If you explicitly map streams, make sure the maps exist in the file.

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

Choose stream copy or transcoding deliberately

The example transcodes video and audio. Transcoding can accommodate output settings different from the source, but requires enough processing capacity to encode in real time. Stream-copy mode (-c copy) avoids re-encoding and its associated encoder load, but it is only suitable when the input codecs, timestamps, and YouTube ingest requirements are compatible. No single command can guarantee that every file is suitable for stream copy.

Rank #2
Sale
Elgato 4K S Capture Card for PS5, Xbox Series X/S, Switch 2
  • 4K60 Capture: Record in cinematic quality with crisp detail and vivid colors
  • HFR Support: Play and capture in 1440p120 or 1080p240
  • HDR10 Support: Capture brilliant HDR content with tone mapping on Windows
  • Cross-Platform Compatible: Works with PS5, Xbox Series X/S, Switch 2, and more
  • Analog Audio In: Capture in-game chat or commentary with 3.5mm input

Match YouTube’s ingest requirements

YouTube recommends RTMPS for standard encoder ingestion and currently lists H.264, H.265, and AV1 video for RTMP/RTMPS, up to 60 fps, with AAC or MP3 audio. Its recommended keyframe interval is two seconds and must not exceed four seconds. Bitrate recommendations vary by codec, resolution, and frame rate, so use YouTube’s current table rather than treating the example bitrate as universal. YouTube also documents HLS as an alternative in cases such as HDR or codecs unsupported by RTMP, with higher latency; this tutorial’s command uses RTMPS.

Ensure your internet connection has stable upload capacity above the actual outgoing bitrate. If other devices or applications compete for upload bandwidth, the available capacity can fluctuate and impair the stream.

Start the encoder and go live

  1. Run the adapted FFmpeg command. Watch its output for input errors, encoder errors, and connection failures; a running command alone does not confirm YouTube is receiving a healthy stream.

    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.
  2. In the Live Control Room, wait for the preview and check stream health. YouTube recommends testing before a live event and monitoring the stream.

  3. For a scheduled stream, click Go live after the preview appears and you are ready to broadcast. Starting FFmpeg sends the encoder feed; it does not by itself complete the scheduled-stream workflow.

    Rank #3
    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
  4. Keep the process running while you want the file to repeat. Stop FFmpeg when you want to end the feed, then check the event in YouTube Studio.

Rights, monetization, and archives

Confirm you have rights to the video and audio

YouTube scans live streams for third-party content. A match may replace the live image with a placeholder; if the content continues, YouTube may interrupt or terminate the stream. Even if you have a license, the rights holder may need to add your channel to its Content ID allowlist. Review YouTube’s live-stream copyright guidance before broadcasting.

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

Permission does not settle monetization eligibility

YouTube’s reused-content review is separate from copyright enforcement and is not decided by permission or fair use alone. A license therefore does not guarantee that a repeated stream will qualify for monetization. See YouTube’s channel monetization policies.

Do not assume a 24/7 stream will be archived

YouTube’s encoder setup instructions say streams under 12 hours are automatically archived. That stated automatic-archive condition does not cover streams lasting 12 hours or longer, so do not rely on an archive for a continuous 24/7 broadcast. Review YouTube’s live stream settings guidance and plan separately if you need a recording.

Troubleshoot common failures

  • FFmpeg says it cannot open the input: Check the file path, filename, permissions, and that the file is readable by the process running FFmpeg.

    Rank #4
    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
  • The loop option has no effect or FFmpeg errors: Confirm -stream_loop -1 appears before the relevant -i. It is an input option, not an output option.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • YouTube does not show a preview: Confirm that FFmpeg is still running, the output uses the current server URL and matching stream key, and the selected protocol and codecs meet YouTube’s ingest requirements. Check FFmpeg’s connection messages and YouTube stream health.

  • The stream buffers or drops frames: Compare the configured output bitrate with stable upload capacity, then lower bitrate or resolution if needed using YouTube’s current recommendations. Also check whether the encoder can sustain real-time transcoding.

  • There is no sound or video: Inspect the input streams and review any explicit stream maps. A command that encodes audio cannot produce it from a file with no audio stream; likewise, confirm the expected video stream exists.

  • The feed connects but YouTube interrupts it: Review stream health and check for a third-party-content match or other live-stream notice. Resolve rights and Content ID allowlisting issues where applicable.

    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.
    Best Value
    Sale
    acer USB 3.0 HDMI Capture Card, 4K HDMI Loop-Out, 1080P 60Hz for Streaming
    • 【4K Clarity, 1080P Performance】Enjoy stunning clarity with our USB 3.0 Video Capture Card—featuring 4K input and smooth 1080P@60Hz output. Featuring YUY2 technology, it delivers richer colors than MJPEG for lifelike live streaming and recording. Plus, it delivers high-quality video with minimal latency, making it perfect for gamers and content creators.
    • 【Mic-in for Easy Commentary】Plug in a headset or mic directly to stream/record voice easily—no extra adapters. Great for real-time gaming commentary, online classes, or vlog dubbing. Paired with its low-latency tech, it keeps voice synced perfectly with video, eliminating post-editing hassle from mismatched audio-visuals. Fits most 3.5mm devices—ideal for gamers, teachers, creators.
    • 【Plug and Play, no Extra-Drivers】No extra drivers or external power—just plug in and start capturing instantly. Small and lightweight, it fits easily in your bag for outdoor live streams, on-the-go recordings, or emergencies. Ideal for game capture, video conferences, and online teaching, it saves hassle while delivering smooth results.
    • 【Wide Compatibility: Apps & Devices】No extra adapters—works flawlessly with your go-to platforms and gear. It pairs with streaming/recording apps like Twitter, YouTube, Facebook, OBS, XSplit, and VLC, plus devices including Switch/Switch2, PS5/PS4, Xbox, DSLR cameras, PC, macOS, and Android. Whether gaming, streaming, or hosting video calls, it keeps HD quality intact, eliminating "compatibility headaches".
    • 【Worry-Free After-Sales Support】We are committed to delivering exceptional quality products that combine sophisticated design with affordable pricing, offering you the best solutions for seamlessly connecting your work and life. Whether you're a newcomer or a seasoned user, feel free to reach out anytime with any questions—your satisfaction is our top priority.
  • The key may have been exposed: Reset the stream key in the Live Control Room, then update the encoder with the replacement. Never publish a real key in a command example, public script, or screenshot.

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 you do not want a computer and home connection to stay on, StreamNeo is a cloud service for keeping a YouTube channel live from uploaded videos. Upload a recording or build a playlist, add your YouTube stream key, and go live. It loops the uploaded videos from the cloud; it does not broadcast a camera feed.

Start your free first day with 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.