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

To repeat a fixed sequence of local video files in a YouTube Live stream, put their paths in an FFmpeg concat file and pass that input to FFmpeg with -stream_loop -1. This works best when the files have matching stream layouts, codecs and time bases. You still need to choose output settings that match the current ingest options shown for your YouTube account.

What the concat file does

An FFmpeg concat file is a plain-text list that presents several media files as one virtual input, in the order listed. With -stream_loop -1, FFmpeg repeats that finite input indefinitely. The list is static: it does not discover new files or provide a scheduling system.

This method runs on the computer where FFmpeg is running. The machine, FFmpeg process, network connection and source files must remain available for the stream to continue.

Prepare and check the video files

Compare the streams before concatenating

The concat demuxer expects the listed files to have the same streams, including matching codecs and time bases. Check that they have compatible audio and video stream counts and types, and consistent encoding properties. It does not normalize different files for you.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
KAMRUI Essenx E2 Mini PC, AMD Ryzen 5 3500U(4 Cores, 8 Threads, Up to 3.7GHz), 16GB DDR4(Expandable) 256GB M.2 SSD Micro PC, HDMI+DP Dual 4K@60Hz Display Home/Business/Office Mini Desktop Computers
  • 【Ryzen 5 3500U Processor】KAMRUI Essenx E2 Mini PC is equipped with AMD Ryzen 5 3500U (4-cores/8-threads, up to 3.7GHz) with integrated Radeon Vega 8 Graphics(1200MHz, 8 Core). The 3500U CPU operates at a base frequency of 2.1 GHz and a Boost frequency of 3.7 GHz. This DDR supports upgradable up to 32GB, SSD supports up to 2TB.(NOT INCLUED), KAMRUI E2 3500U Mini PC is ideal for light office work and home entertainment. KAMRUI E2 3500U is more than 35% more powerful and smoother in operation than the Intel N150, 33% faster than Intel N95, 28% performance boost over Intel i3-10110U, and 42% stronger processing power than AMD Ryzen 3 3200U.
  • 【16GB DDR4 & 256GB SSD】The KAMRUI E2 mini computers is equipped with 16GB DDR4(Expandable up to 32GB) for faster multitasking and smooth application switching. 256GB M.2 SSD ensures fast startup times,fast file transfers and plenty of storage space,eliminating slow loading times and ensuring fast responsiveness.Storage space can RAM supports up to 32 GB, SSD supports up to 2TB (Not included)make file storage easier.
  • 【4K Dual Display & USB 3.2 Type-A Port】KAMRUI E2 3500U mini desktop pc is equipped with an HDMI 2.0+DP 1.4 interfaces for faster transmission, Support Dual 4K@60Hz Display, E2 mini desktop computers is ideal for visual home entertainment, home office, conference rooms, etc. USB3.2 Gen1 Type-A Port×2 with a transfer speed of up to 5Gbps (10 times faster than USB 2.0) for efficient data transfer. The RJ45 1000M Gigabit Ethernet Port ensures a stable network connection.
  • 【WiFi+Bluetooth stable connection】The Kamrui E2 micro pc have reliable and stable wireless connection, open websites in seconds, watch movies without buffering and download files smoothly, connect your monitor from WiFi or Ethernet, use a wireless keyboard and mouse through bluetooth, which will be powerful workstation for you.
  • 【Versatile Ports】This KAMRUI E2 Small pc is equipped with HDMI 2.0×1(4K@60Hz)、DP1.4×1(4K@60Hz)、Gigabit Ethernet Port (RJ45, 10/100/1000Mbps) ×1、USB3.2 Gen1 Type-A Port×2(5Gbps)、USB2.0 Type-A Port×2、3.5mm Audio Jack ×1、DC In ×1、Power Button ×1
  • If the files already have compatible streams, try the concat demuxer with stream copy or the encoding template below.
  • If they differ in codec, stream layout, size, aspect ratio or other relevant properties, standardize them first or use FFmpeg’s concat filter and re-encode.
  • Allow for encoding time and processing capacity when choosing the filter route; it adds a re-encoding step.

FFmpeg’s documentation distinguishes the concat demuxer from the concat filter and recommends the filter when re-encoding is needed: FFmpeg concat filter documentation.

Check durations

The demuxer uses each file’s duration to position the following file. Inaccurate duration metadata can cause irregular transitions or artifacts. Inspect the media and its reported durations; the concat file’s duration directive can override a duration when you have a reliable value. Do not add a guessed duration to mask a problem. See FFmpeg concat demuxer documentation.

Create the concat playlist

Save a plain-text file named playlist.ffconcat in the same folder as the example clips. The first line must be ffconcat version 1.0, followed by one file directive for each clip:

Rank #2
Sale
GMKtec G3S Mini PC Intel N95 Processor (Up to 3.4GHz) 8GB RAM 256GB M.2 SSD
  • 12th Intel Alder Lake N95 Processor – The GMKtec G3 S Mini PC is powered by the 12th Gen Intel N95 processor with 4 cores, 4 threads, 6MB cache and a burst frequency up to 3.4GHz. Compared with N100/N5105/N5100/N5095, the N95 delivers up to 36% overall performance improvement. Perfect for routine tasks, office work, and home entertainment, this compact mini desktop is more convenient than traditional bulky PCs.
  • 8GB RAM & 256GB SSD Storage – Pre-installed with 8GB DDR4 memory and a fast 256GB M.2 2242 SSD, the G3 S mini desktop offers quicker startup, smoother multitasking, and faster file transfers. Enjoy seamless performance whether you’re working on multiple applications, browsing, or streaming content.
  • Rich Interfaces & Connectivity – The G3 S mini computer comes equipped with USB 3.2 (up to 10Gbps), dual HDMI 2.0 (4K@60Hz), and a 3.5mm audio jack. With support for WiFi 5, Bluetooth 5.0, and Gigabit Ethernet (RJ45 1000MbE), it connects easily with monitors, projectors, printers, office equipment, and other peripherals, making it versatile for both home and business use.
  • Dual 4K Display Support – Featuring upgraded Intel UHD Graphics (up to 1000MHz), the G3 S supports 4K video playback and AV1 decoding for a smooth viewing experience. With dual HDMI outputs, you can connect two 4K@60Hz displays simultaneously, enabling efficient multitasking for work and entertainment.
  • GMKtec WARRANTY - GMKtec offers a 1-year limited GMKtec's warranty for each mini PC, starting from the date of the purchase. All defects due to design and workmanship are covered. With a professional after sales team always ready to attend to your needs, you can simply relax and enjoy your mini PC.
ffconcat version 1.0
file 'segment-01.mp4'
file 'segment-02.mp4'
file 'segment-03.mp4'

Relative paths keep the example portable and work with FFmpeg’s default safe-path behavior when they use permitted portable characters. The demuxer’s safe-path mode is enabled by default. If a trusted playlist genuinely needs file names or paths that safe mode rejects, -safe 0 can permit them, but it relaxes path checks as well as the guard against unsafe directives. Do not use it with untrusted playlist contents. Details are in the concat demuxer documentation.

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

Run FFmpeg and send the loop to YouTube Live

  1. Get the current ingest settings. In YouTube’s live control room, check the stream’s ingest details and current guidance for codec, resolution, frame rate, bitrate, keyframe interval and audio. These can depend on the stream setup; do not treat an old forum command as authoritative.
  2. Keep the stream key private. Use the ingest endpoint and key provided for your stream. Do not publish the key in a script repository, screen recording or log that others can access.
  3. Run a short test with the files and output settings you intend to use. A command template for a compatible playlist is:
ffmpeg -re -stream_loop -1 -f concat -i playlist.ffconcat 
  -c:v libx264 -c:a aac -f flv 'rtmp://INGEST_ENDPOINT/STREAM_KEY'

This is a template, not a verified YouTube recipe. Replace the endpoint and key with the values for your stream, and select output encoding and FLV/RTMP settings using current account-specific guidance. The example encodes video with libx264 and audio with aac; verify that those choices and all required parameters suit your setup. -stream_loop -1 is an input option, so it belongs before the corresponding -i. -re reads file input at a rate intended to approximate real time; check its behavior with your installed FFmpeg version and source. The example does not set a bitrate, resolution, frame rate or keyframe interval because those should be confirmed against current YouTube guidance rather than copied from an outdated recipe.

Watch FFmpeg’s output and YouTube’s live console during the test. Confirm that YouTube receives a usable audio/video stream and that the handoff between clips is acceptable before leaving the process unattended. A community example of FFmpeg outputting FLV to a YouTube Live RTMP endpoint is not a substitute for current official platform requirements.

Rank #3
HDMI Media Player, Black Mini 1080p Full-HD Ultra HDMI AV Output MP4 Player
  • 【Mini Portable Media player】-- Fits into the palm of your hand, It is a perfect travel partner for those short on space and sockets. Also compact and easy multifunction HD media player for office work and home entertainment;Aluminum alloy material, not easy to damage during carrying
  • 【1080P MP4 Player】-- Full HD 1080p@60Hz supports most video decoding formats: RM, RMVB, AVI, DIVX, MKV, MOV, HD MOV, MP4, M4V, PMP, AVC, FLV, VOB, MPG, DAT, MPEG, TS, TP, M2TS, WMV, (H.264,H.263,WMV9/VC-1,MPEG1/2/4),Not support VPR files. Note: Please use our 4K player to play some videos taken with smart phones, ASIN: B07WPY8VKL
  • 【HDMI or AV Output】-- Supports 1080p HDMI output, allowing you to transmit crisp, clear video and audio in a pure digital format to an HDTV; it also supports composite AV output for use with analog TVs. An analog AV cable is included. While using HDMI video output, you can also connect external speakers via the AV output. However, video cannot be output via both AV and HDMI at the same time.
  • 【USB 2.0/3.0 Compability】-- Drive external USB 2.0/3.0 storage devices such as USB flash(up to 512G)/SD card(up to 128G) and hard drive(partition should be MBR, up to 8TB), you can also delete or copy files in the USB drive(FAT or FA32) directly, Also plays subtitle files as well as loop videos
  • 【Support Multiple Formats of Files and Playback Modes&Multi-functional Remote Control】-- Supports most video, audio, and image formats on the market, supports random playback of video and image modes, and supports loop playback. Supports repeat, zoom, fast forward, fast rewind, rotation, breakpoint playback method, start from scratch playback method and time selection playback method. It is also equipped with a convenient remote control for easy navigation of menu screens (ASIN: B0C9PZPFL8)
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose between the concat demuxer and filter

Approach Best fit Trade-off
Concat demuxer Inputs already have compatible streams and suitable duration information. Can avoid re-encoding, but does not reconcile incompatible streams; inaccurate durations can affect transitions.
Concat filter with re-encoding Inputs need normalization, resizing, frame-rate adjustment or filtering. Adds an encoding step and requires enough processing capacity; output quality depends on the chosen settings.

These are workflow trade-offs, not benchmark results. If stream copy or demuxing produces broken transitions, first inspect compatibility and duration metadata; if the sources genuinely differ, normalize them or move to the filter workflow.

Troubleshoot common failures

FFmpeg rejects a file or fails at a transition

  • Likely cause: The clips have different stream counts, codecs, time bases or layouts.
  • Fix: Compare their streams, standardize the inputs, or use the concat filter and re-encode instead of expecting the demuxer to normalize them.

The next clip starts early, late or with artifacts

  • Likely cause: A file’s duration metadata does not accurately represent its content.
  • Fix: Inspect the reported duration and use a concat-file duration directive only with a sound value. Test the transition again.

FFmpeg reports an unsafe path

  • Likely cause: A path is outside the demuxer’s default safe-path rules.
  • Fix: Prefer relative paths with portable characters. Use -safe 0 only for a playlist you control and genuinely need to allow.

YouTube does not receive a usable stream

  • Likely cause: The endpoint, key, output format, codecs, audio stream or other ingest parameters may not match the current stream setup.
  • Fix: Check the key and endpoint, inspect FFmpeg’s logs for output errors, verify that the output includes the expected audio and video, and consult the current YouTube live console and official guidance. This article does not establish a universal bitrate or codec recipe.

The stream stops when the computer or connection drops

  • Likely cause: This local FFmpeg workflow depends on the running process, host and network.
  • Fix: Keep those resources running and monitor the test, or use a cloud service designed to keep an uploaded-video stream running.

Or let it run in the cloud

If you do not want a computer and home connection to stay on, StreamNeo runs uploaded videos as a 24/7 YouTube stream from the cloud. Upload a recording or build a playlist, add your YouTube stream key once, then go live. It plays uploaded videos rather than going live from a camera, and it is for YouTube only.

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.
  • Nothing has to stay on at home.
  • Any uploaded quality up to 4K 60fps streams as made, at one flat price per slot with no re-encode or quality tiers.
  • Automatic recovery if YouTube drops the stream.
  • The first day is free with no card, one free day per account.
  • Monthly: $9.99 per month.

See StreamNeo for service details, or start the 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.