To loop one or more local videos continuously to YouTube Live with FFmpeg, put compatible files in an ffconcat playlist, loop that playlist with -stream_loop -1, and send a real-time encoded feed to the RTMPS URL and stream key from YouTube Live Control Room. The concat demuxer requires the files to have matching streams and time bases; if they do not, normalize or re-encode them before using this method.
What the concat demuxer does—and when to use it
FFmpeg’s concat demuxer reads a text playlist as a virtual input, presenting the listed files in sequence. With -stream_loop -1, FFmpeg repeats that input indefinitely; -re reads file input at its native rate so the output behaves like a live feed rather than sending the video as fast as the computer can process it. These are FFmpeg options, and exact syntax or encoder availability can vary by build. See the FFmpeg documentation and FFmpeg command-line documentation.
As an Amazon Associate I earn from qualifying purchases.
This method is useful when you want to stream files in sequence without first creating one joined file. It is not a universal way to combine arbitrary videos: FFmpeg’s documentation says, “All files must have the same streams (same codecs, same time base, etc.).” If your sources differ, use a filter-based workflow that re-encodes them, or normalize them to compatible streams first. FFmpeg’s FAQ discusses the concat filter as an option when re-encoding is needed.
Prepare and check your video files
Confirm FFmpeg can produce the output
Install an FFmpeg build that includes the encoder and FLV muxer you intend to use. Check the build with:
#1 Best Overall
- 【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 -version
If you plan to use libx264, verify that encoder is available in your build. The example below uses H.264 video, AAC audio, and FLV output; it will not work unchanged if your FFmpeg build lacks those components.
Check that the files are compatible
Inspect each input with FFmpeg’s probing tools or another media inspector. Compare the streams present, codecs, time bases, dimensions, and frame rates. Files with mismatched stream layouts or timing may fail to concatenate cleanly or produce timestamp problems. Make the inputs compatible before starting the live broadcast.
For multiple files, list them in the order you want them to play. The concat demuxer relies on file duration information; inaccurate or truncated duration metadata can cause gaps, timestamp shifts, or artifacts at later boundaries. The demuxer supports a duration directive if you need to override a file’s stored duration; use an accurate value for the media.
Rank #2
- 【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.
Create the ffconcat playlist
Save a UTF-8 plain-text file named, for example, playlist.ffconcat. Its first line must be exactly ffconcat version 1.0. Add one file directive for each video, in playback order:
ffconcat version 1.0
file '/path/to/first-video.mp4'
file '/path/to/second-video.mp4'
Replace the sample paths with paths to your own files. Add or remove file lines as needed. Follow FFmpeg’s playlist syntax when escaping spaces and special characters in paths. The command below uses -safe 0 to permit paths outside the concat demuxer’s safe default syntax; use it only with a playlist you control, not a playlist containing untrusted paths.
Choose YouTube-compatible output settings
YouTube’s current encoder guidance supports RTMP or RTMPS ingest with H.264, HEVC, or AV1, frame rates up to 60 fps, AAC or MP3 audio, and constant bitrate (CBR). YouTube recommends keyframes every 2 seconds and says not to exceed 4 seconds. Bitrate depends on the codec, resolution, and frame rate, so choose it from the current YouTube encoder guidance for your actual output rather than copying a sample value.
Rank #3
- 【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.
For one specific reference point, YouTube’s current table lists H.264 at 1080p30 as 5 Mbps minimum and 14 Mbps recommended. Those are encoder-setting recommendations, not independent performance findings; available upload capacity must sustain the feed. Recheck YouTube’s table when you configure a different resolution, frame rate, or codec.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Match GOP length to frame rate
The GOP value in FFmpeg is measured in frames, while YouTube’s keyframe interval guidance is expressed in seconds. For a fixed-frame-rate output, calculate the GOP frame count as approximately the output frame rate multiplied by the interval in seconds. At 30 fps, a 2-second interval corresponds to 60 frames; at 60 fps it corresponds to 120. Choose settings that keep keyframes at the recommended cadence and no more than 4 seconds apart.
Start the looping stream
Copy the exact RTMPS server URL and stream key from YouTube Live Control Room. Substitute the URL and key in the final command argument below. Keep the key private: YouTube describes stream keys as “like your YouTube stream’s password and address.” Use the YouTube stream settings guidance and RTMPS guidance to locate and protect the credentials.
Rank #4
- 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
ffmpeg -stream_loop -1 -re -f concat -safe 0 -i playlist.ffconcat
-c:v libx264 -preset veryfast -b:v 4500k -maxrate 4500k -bufsize 9000k
-g 60 -keyint_min 60 -sc_threshold 0
-c:a aac -b:a 128k -ar 44100
-f flv 'rtmps://STREAM_URL/STREAM_KEY'
This is an illustrative H.264/AAC command, not a universal preset or a verified broadcast recipe. Its -g 60 setting represents a two-second GOP only at 30 fps. Adjust the GOP for your chosen output frame rate, and replace the example video bitrate with a value from YouTube’s current table. The -stream_loop, -re, and other input options appear before the corresponding -i, as required for input options.
Use the exact RTMPS URL provided in Live Control Room rather than assuming the sample URL structure. If you encounter a TLS connection error, YouTube’s RTMPS guidance recommends checking the RTMPS URL and port 443.
Recommended Free Tools
Test and monitor the broadcast
- Enable live streaming in advance. YouTube says first-time live-stream enablement can take up to 24 hours. Check the channel’s eligibility and activation before the planned broadcast in its encoder setup guidance.
- Start FFmpeg and check YouTube’s preview. Confirm that video and audio appear, the order and loop boundaries are correct, and the stream-health messages do not show a problem.
- Test with representative content. YouTube recommends testing with audio and movement similar to what you will use during the actual stream. Allow time to catch connection, bitrate, and continuity issues before relying on the broadcast.
- Keep an eye on the live event. Check stream health and continuity while FFmpeg is running. The process depends on the computer, its storage, and its network connection remaining available.
YouTube’s encoder setup guidance says streams under 12 hours are automatically archived. Do not assume the same archive behavior for a broadcast that runs longer.
Troubleshoot common problems
- FFmpeg rejects a file or the playlist: Check that the first playlist line is exactly
ffconcat version 1.0, paths are valid, and the playlist syntax is correct. Confirm that the FFmpeg build supports the selected encoder and muxer. - The concat input fails or changes badly at a boundary: Compare the files’ streams, codecs, time bases, dimensions, and frame rates. The demuxer expects matching stream properties. Normalize the files or use a filter-based re-encode workflow.
- There is a gap, timestamp jump, or artifact: Check for inaccurate duration metadata or truncated input files. Correct the source durations; where appropriate, use the concat demuxer’s
durationdirective with an accurate value. - YouTube does not receive the stream: Verify the RTMPS URL and key copied from Live Control Room, check that the key has not been reset or mistyped, and confirm RTMPS connectivity. If TLS fails, check the exact URL and port 443 against YouTube’s RTMPS guidance.
- The picture buffers or quality is poor: Compare the configured video bitrate with YouTube’s table for the chosen codec, resolution, and frame rate. Check that the available upload rate can sustain the stream and review YouTube’s stream-health feedback.
- Keyframes arrive at the wrong interval: Recalculate the GOP in frames from the output frame rate. A GOP of 60 frames is two seconds only at 30 fps; the interval should follow YouTube’s 2-second recommendation and must not exceed 4 seconds.
- The broadcast stops when the computer or connection stops: This FFmpeg workflow runs from your own computer, so it depends on that machine, its files, and its internet connection staying available.
Or let it run in the cloud
If you do not want a computer and home connection to stay on, StreamNeo keeps an uploaded-video YouTube stream running from the cloud. Upload your recording or build a playlist, add your YouTube stream key once, and go live. StreamNeo plays uploaded videos rather than broadcasting from a camera, and it streams to YouTube only.
Quick Recap
- Nothing has to stay on at home; the stream runs from the cloud.
- Every slot streams the uploaded file as made, up to 4K 60fps, at one flat price per slot rather than quality-based tiers.
- Automatic recovery is included if YouTube drops the stream.
- The first day is free with no card, once per account.
Monthly pricing: $9.99 per month.
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.




