Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
Mountain View desk7 min

How to Convert and Loop a Video for a Nonstop YouTube Live Stream with FFmpeg

Use FFmpeg’s input loop option to repeat a video on YouTube Live, then match encoding settings to YouTube’s guidance and your upload capacity.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To send a prerecorded video continuously to YouTube Live, use FFmpeg’s -stream_loop -1 before the input file, then encode and send the output using settings that match YouTube’s current guidance for your chosen resolution, frame rate, and codec. Looping repeats the file; encoding prepares it for the stream. Neither guarantees an uninterrupted broadcast: the source file, computer, upload connection, stream key, and YouTube’s service all matter.

What “the right format” means for a YouTube live stream

A video file’s format is not just its extension. For a stable stream, consider the video and audio codecs, resolution, frame rate, bitrate, keyframe interval, and the connection used to send the feed. If your source already suits the target settings, you may not need to re-encode it; re-encoding is useful when its codec, dimensions, frame rate, or audio do not fit your intended output.

As an Amazon Associate I earn from qualifying purchases.

YouTube automatically transcodes live streams into formats for different viewers, but your encoder still needs to deliver a supported stream at a bitrate your connection can sustain. YouTube’s live encoder guidance lists H.264, H.265/HEVC, and AV1 video; AAC or MP3 audio; CBR; and frame rates up to 60 fps. Its published settings can change, so check the current YouTube live encoder settings, bitrates, and resolutions for the codec and output you plan to use.

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

Choose resolution, frame rate, and bitrate together

For H.264, YouTube Help’s English-language table recommends these video bitrates. They are platform guidance, not a guarantee of a particular picture quality or stream stability.

#1 Best Overall
ZowieBox, 4K HDMI NDI Video Encoder/Decoder, HDMI NDI
  • Compact but Powerful Design: ZowieBox is smaller than a phone, featuring a tally light and LCD screen for streaming status. Capture console gameplay in up to 4K with zero-lag HDMI passthrough, while the built-in video encoder converts video for IP streaming. The IP stream can also be decoded back to a 4K HDMI signal.
  • Standalone Game Streaming: Just plug and play—ZowieBox enables PC-free live gaming without affecting gameplay. As an RTMP hardware encoder and HDMI streamer, it delivers stable streaming directly from your source, making it ideal for gaming, live events, and professional broadcasting.
  • NDI|HX3 Converter Technology: ZowieBox converts HDMI signals to NDI|HX3/HX2/HX, functioning as an NDI video encoder, or NDI Video Decoder for flexible IP workflows. Certified NDI technology enables low-latency gameplay streaming through OBS/vMix. Note: Encoder and decoder modes cannot run simultaneously; full NDI signals are not supported.
  • UVC to HDMI Conversion: Supporting up to 4K@30fps and 1080p@60fps decoding, ZowieBox enables flexible conversion for webcam and video workflows. As a video decoder and HDMI to IP converter, it expands connectivity options for professional video devices. Note: USB capture card functionality is not currently supported.
  • All-around Configuration Options: Control ZowieBox through its web UI on a PC, phone, or tablet. Manage connected PTZ cameras, tally light, video/audio, OSD, work mode, streams, network, and system settings. Support for VISCA over IP encoder workflows enables flexible PTZ control, while the dashboard provides video preview and system status.
Output Minimum H.264 video bitrate Recommended H.264 video bitrate
1080p at 60 fps 6 Mbps 17 Mbps
1080p at 30 fps 5 Mbps 14 Mbps
720p at 60 fps 3 Mbps 8 Mbps
720p at 30 fps 3 Mbps 8 Mbps

Do not apply H.264 figures to another codec. On the same YouTube Help page, the AV1 and H.265 tables are separate; for example, the recommended video bitrate is 10 Mbps for 1080p30 and 12 Mbps for 1080p60, with a 4 Mbps minimum for both. Check the table for your selected codec and output rather than assuming that one figure fits every stream.

Match the output to what the source can provide and what your connection can upload consistently. A 1080p60 output is not automatically better if the source is 720p or your upload cannot sustain the required total bitrate. YouTube recommends leaving 20% upload-bandwidth headroom; include audio and other upload activity when assessing whether the connection has enough capacity.

Rank #2
URayCoder HD HEVC H.265 MPEG4 H.264 4K HDMI to Video Streaming IPTV Encoder for HDMI to RTSP RTMP HTTP UDP HLS SRT Facebook YouTube Live Streaming Server
  • 【Innovative Product with Leading Technology】- Equipped with an advanced H.265 /H.264 dual encoding chip, supports 4K UHD (3840x2160) video input and output, with a maximum frame rate of 30fps at 4K resolution and up to 120fps at 2K and lower resolutions, delivering a smooth and detailed visual experience. It also supports HDCP 1.4 decryption, easily decoding various HDMI ultra HD video sources, delivering a cinematic visual experience for both professional live streaming and 4K ultra HD content transmission.
  • 【Multi-protocol and Multi-platform Compatibility】- Fully compatible with streaming protocols such as HTTP, RTSP, RTMP(S), SRT, HLS(M3U8), MP4, Multicast(UDP, RTP, PTL), FLV, WebRTC, TRTC, ICECAST, it can simultaneously output 4 video streams with different protocols and push them to live streaming platforms such as YouTube, Facebook, Twitch, and Vimeo with one click. Simultaneous live streaming across multiple platforms can be achieved without additional equipment.
  • 【Highly Customizable Settings to Meet Individual Needs】- It supports adding static text, scrolling captions, brand logos, and timestamps. Users can freely adjust core parameters such as video resolution, frame rate, and bitrate, and also perform personalized editing functions such as video cropping, rotation, flipping, and mirroring. It supports dual input of HDMI embedded audio and line-in audio, with adjustable sound quality, making your live stream content more distinctive and allowing you to create a unique brand live stream style.
  • 【Stable and Efficient Transmission, Easy Operation】- Employing HDMI to Ethernet core connection technology, it ensures stable and reliable network transmission with low latency and no lag, adapting to various network environments. Equipped with an intuitive user interface and detailed instruction manual, no professional technical background is required; setup can be completed quickly after connecting the device. It is also compatible with multiple terminals such as computers and mobile phones for management, and the video stream status can be viewed in real time via a URL.
  • 【Lifetime Free Warranty and Technical Supports】- All URayCoder video codecs come with a lifetime free warranty and technical supports, supporting secondary development and feature customization to meet enterprise-level personalized needs. Meanwhile, we providing many kinds of customization services such as shell pattern printing, logo addition, hardware and function development, ensuring reliable quality and worry-free after-sales service.

Prepare the video and encoder settings

  1. Inspect the file. Confirm its dimensions, frame rate, video and audio codecs, aspect ratio, and duration. Choose an output that fits both the source and your viewing goal. If you need to inspect those properties, an FFmpeg utility such as ffprobe can report media details; exact output varies by file and build.
  2. Select a supported codec and bitrate. For a conventional SDR H.264 stream, use CBR and choose the bitrate for your resolution and frame rate from YouTube’s current table. For H.265 or AV1, use that codec’s own table.
  3. Set the keyframe interval. YouTube recommends a two-second interval and says it should not exceed four seconds. In an FFmpeg command using a GOP length measured in frames, convert the desired interval to frames: at 30 fps, 60 frames is two seconds; at 60 fps, 120 frames is two seconds.
  4. Check the remaining video and audio settings. YouTube’s advanced guidance includes square pixels, progressive scan, CABAC, and Rec. 709 for SDR. It lists 44.1 kHz audio, with 128 Kbps for stereo and 384 Kbps for 5.1 surround. Its guidance identifies H.265 as the recommended HDR video codec and says AV1 is not supported for HDR. Use the settings appropriate to the source and stream rather than forcing a conversion that degrades it.
  5. Use RTMPS when available. YouTube recommends RTMPS. Your FFmpeg build and destination need to support the chosen protocol. Keep the stream key private: anyone with access to it may be able to broadcast to your channel.

Loop and send a file with FFmpeg

This illustrative starting command repeats input.mp4, encodes H.264 and AAC, and sends an FLV stream to a YouTube ingest URL. Replace the placeholders and settings for your file, codec, network, and selected YouTube table row. The command is an example, not a tested universal configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ffmpeg -stream_loop -1 -re -i input.mp4 
  -c:v libx264 -preset veryfast -b:v 4500k -maxrate 4500k -bufsize 9000k 
  -g 60 -c:a aac -b:a 128k -f flv 
  "rtmps://<YouTube-ingest>/<stream-key>"
  • -stream_loop -1 is an input option that repeats the input indefinitely, so it belongs before that input’s -i. FFmpeg documents this behavior in its command-line documentation.
  • -re reads the file at its native rate so it is paced like a live source instead of being sent as fast as the computer can process it.
  • -c:v libx264 selects the H.264 encoder. The sample’s 4500k is only an illustrative value; it is not YouTube’s recommendation for every resolution and frame rate. Set -b:v and, when using a capped rate, -maxrate and -bufsize to suit your chosen output and encoder workflow.
  • -g 60 means a 60-frame GOP. It corresponds to two seconds only at 30 fps; change it for other frame rates to maintain the intended interval. YouTube’s requirement concerns keyframe timing, while this is an example of an FFmpeg/libx264 setting.
  • -c:a aac -b:a 128k encodes AAC audio at 128 Kbps, which matches YouTube’s listed stereo audio bitrate. Confirm the source has usable audio and choose the appropriate channel layout.
  • Replace the URL with the YouTube ingest server and stream key shown for your broadcast. Do not publish the key or save it somewhere other people can access.

For another video codec, such as H.265 or AV1, use an encoder available in your FFmpeg build and follow YouTube’s corresponding codec guidance. Scaling, frame-rate conversion, and audio resampling can also be added when needed, but should be chosen deliberately: they consume resources and cannot restore detail missing from the source. Consult YouTube’s current encoder guidance before relying on a particular combination.

Rank #3
UNISHEEN 1080P60 HDMI Video Encoder, H.265/H.264 Live Streaming Encoder, HDMI to RTSP/RTMP/SRT/HLS/WebRTC IPTV Encoder for YouTube Facebook Live, Browser Setup, No PC Software Needed
  • 【Hardware H.265/H.264 Encoding at 1080P60】Dedicated hardware encoder delivers broadcast-quality 1080P60 streams with H.265/H.264 compression. Reduces bandwidth usage by up to 50% compared to legacy H.264-only solutions, while maintaining crisp, crystal-clear video output.
  • 【Broad Protocol Support for IP Distribution】 Supports SRT, RTMP(S), RTSP, UDP, HTTP, HLS, WebRTC, TRTC, Icecast and SHOUTcast — integrate seamlessly with CDNs, surveillance NVRs, IPTV systems and browser-based monitoring dashboards. One device replaces multiple single-purpose streaming boxes.
  • 【Browser-Based Setup in Minutes】 Set up in minutes through any browser — no software, drivers or OS compatibility issues. DHCP is enabled by default to prevent IP address conflicts on your network. Note: basic networking knowledge (IP address, RTSP/RTMP configuration) is recommended for advanced streaming setups.
  • 【Compact Design with Flexible Deployment】Palm-sized form factor (approx. 90×54×29mm) fits easily behind monitors, on shelves, or in equipment racks. Low power consumption ensures reliable 24/7 operation for live events, remote monitoring, and digital signage.
  • 【Professional Audio & OSD Overlay + 1-Year Warranty】 Supports HDMI embedded audio plus external 3.5mm input. Built-in OSD generator adds scrolling text, logos, or timestamps directly to the video stream — ideal for branding, event info, or security labeling. Backed by a 1-year warranty and 24/7 online technical support.

Test before relying on a long run

  1. In YouTube Studio, create or open the live stream and copy its ingest details and stream key into your encoder configuration. Follow YouTube’s current live stream settings guidance; interface labels can change.
  2. Start FFmpeg and verify that YouTube receives the signal. Test with audio and moving video similar to what you intend to broadcast, not only a static frame.
  3. Check stream health and any encoder or YouTube messages. Watch for unstable upload, dropped frames, missing audio, unexpected aspect ratio, or a mismatch between the configured output and actual stream.
  4. After the test, correct the bitrate, keyframe timing, audio, or network issue and test again before leaving the stream unattended.

YouTube Help states, “Make sure to test before you start your live stream.” Its streaming tips also advise testing with representative audio and movement and monitoring stream health and messages during the event. These checks reduce avoidable problems, but do not guarantee continuity.

Common problems and practical fixes

  • The stream will not connect: Check that the ingest URL and key are current, the key has no accidental spaces, the stream is ready to receive an encoder signal, and your FFmpeg build supports the required encoder, muxer, and RTMPS connection.
  • YouTube reports poor stream health or frames drop: Confirm the selected bitrate matches the codec, resolution, and frame rate. Check that sustained upload bandwidth has at least the recommended 20% headroom, and reduce the output bitrate or resolution if the connection cannot support it reliably.
  • The video looks soft or has the wrong shape: Compare the output resolution and aspect ratio with the source. Avoid upscaling low-resolution material just to label it as HD; use scaling or aspect-ratio filters only when you have a specific conversion need.
  • The keyframe interval is too long: Recalculate GOP frames from frame rate and desired interval. For a two-second interval, use 60 frames at 30 fps or 120 at 60 fps rather than copying one GOP value across different frame rates.
  • Audio is missing, clipped, or out of sync: Check the source audio stream, selected channel layout, sample rate, and audio bitrate. Test a representative segment and confirm audio in YouTube’s preview before starting a long run.
  • The stream stops despite looping: -stream_loop -1 repeats the file, but does not restart FFmpeg after a process crash, restore a failed network connection, prevent a computer from sleeping, or fix a YouTube-side interruption. Investigate the relevant failure separately; a loop option alone is not a complete unattended-streaming system.

Copyright, permissions, and monetization

Only stream video and audio you own or have permission to broadcast. A file playing in a loop does not grant rebroadcast rights, and permission to use a track or clip in one context may not cover a public live stream. Review YouTube’s current copyright and live-stream policies before broadcasting.

Rank #4
Blackmagic Design Streaming Encoder 4K – 4K Ultra HD Live Streaming via SRT & RTMP, SDI Input, Ethernet + Mobile, Includes 6ft Power Cord (BDLKWEB/D/SED4K)
  • 4K & HD STREAMING IN H.264 AND H.265 – Self-contained processor supporting H.264 and H.265 encoding in HD or Ultra HD (up to 2160p60) via SRT or RTMP, streaming directly to YouTube, Facebook, X, Twitch, Zoom, Microsoft Teams, OBS, Wowza, and many more — no encoding PC needed.
  • 12G-SDI INPUT WITH STANDARDS CONVERSION – Supports input resolutions up to DCI 4K60 with an SDI input and SDI loop output, plus Teranex-powered automatic standards conversion so any HD or Ultra HD source streams cleanly at any target resolution.
  • DUAL MONITOR OUTPUTS – Features both SDI and HDMI monitor outputs with a user-configurable standards converter on both the 12G-SDI Out and 4K HDMI Out, so you can feed a confidence monitor or downstream device at any required format independent of your streaming standard.
  • ETHERNET + 5G/4G MOBILE WITH AUTO-FAILOVER – Connect via Gigabit Ethernet (10/100/1000BASE-T) or tether a smartphone via USB-C for mobile data, with automatic switchover between connections — ensuring your stream stays on air even if the primary internet connection drops.
  • CLOSED CAPTIONS, TIMECODE & REST API – Supports embedding CEA-608 and CEA-708 closed captions in live RTMP streams, source timecode over RTMP and SRT, and offers a REST API over Ethernet for external HTTP control — ideal for broadcast automation and accessibility-compliant workflows.

Permission and monetization are separate questions. Repeated or prerecorded content may be subject to YouTube’s channel monetization policies, and a stream meeting technical requirements does not establish eligibility. Review the rules that apply to your channel and content rather than assuming that continuous playback qualifies.

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.
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 want a prerecorded video to keep a YouTube channel live without leaving a computer running at home, StreamNeo is a cloud alternative to managing a local FFmpeg process. Upload a recording or build a playlist, add your YouTube stream key once, and go live. StreamNeo loops uploaded videos from the cloud; it is for YouTube streams, not camera broadcasts or other platforms.

Best Value
H.265 H.264 4K HDMI to IP Network Video Encoder, 1080P HD Video Audio Encoder Supports RTSP RTMPS UDP HLS SRT HTTP WebRTC ICECAST, for IPTV, Live Streaming, YouTube, Facebook, OBS, ONVIF NVR, etc.
  • ⭐【Innovative Product with Leading Technology】- Equipped with an advanced H.265 /H.264 dual encoding chip, supports 4K UHD (3840x2160) video input and output, with a maximum frame rate of 30fps at 4K resolution and up to 120fps at 2K and lower resolutions, delivering a smooth and detailed visual experience. It also supports HDCP 1.4 decryption, easily decoding various HDMI ultra HD video sources, delivering a cinematic visual experience for both professional live streaming and 4K ultra HD content transmission.
  • ⭐【Multi-protocol and Multi-platform Compatibility】- Fully compatible with streaming protocols such as HTTP, RTSP, RTMP(S), SRT, HLS(M3U8), MP4, Multicast(UDP, RTP, PTL), ONVIF, FLV, WebRTC, TRTC, ICECAST, it can simultaneously output 4 video streams with different protocols and push them to live streaming platforms such as YouTube, Facebook, Twitch, and Vimeo with one click. Simultaneous live streaming across multiple platforms can be achieved without additional equipment.
  • ⭐【Highly Customizable Settings to Meet Individual Needs】- It supports adding static text, scrolling captions, brand logos, and timestamps. Users can freely adjust core parameters such as video resolution, frame rate, and bitrate, and also perform personalized editing functions such as video cropping, rotation, flipping, and mirroring. It supports dual input of HDMI embedded audio and line-in audio, with adjustable sound quality, making your live stream content more distinctive and allowing you to create a unique brand live stream style.
  • ⭐【Stable and Efficient Transmission, Easy Operation】- Employing HDMI to Ethernet core connection technology, it ensures stable and reliable network transmission with low latency and no lag, adapting to various network environments. Equipped with an intuitive user interface and detailed instruction manual, no professional technical background is required; setup can be completed quickly after connecting the device. It is also compatible with multiple terminals such as computers and mobile phones for management, and the video stream status can be viewed in real time via a URL.
  • ⭐【Lifetime Free Warranty and Technical Supports】- All URayCoder video codecs come with a lifetime free warranty and technical supports, supporting secondary development and feature customization to meet enterprise-level personalized needs. Meanwhile, we providing many kinds of customization services such as shell pattern printing, logo addition, hardware and function development, ensuring reliable quality and worry-free after-sales service.
  • Nothing has to stay on at home; the stream continues from the cloud.
  • Any quality up to 4K 60fps streams as uploaded, at one flat price per slot, with no re-encode or quality tiers.
  • Automatic recovery is included if YouTube drops the stream.
  • The first day is free with no card, one free day per account. The Monthly plan is $9.99 per month.
  • Each slot includes one always-on stream, 10 GB storage per slot pooled across active slots, 24/7 looping and playlists, and support from the StreamNeo team.

See StreamNeo for details, or start your free first 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.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

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.