To loop prerecorded stories on YouTube Live with FFmpeg, list compatible clips in a concat file, loop that file with -stream_loop -1, read it in real time with -re, and send the output to YouTube’s RTMPS ingest URL using the stream key from Live Control Room. This keeps the playlist repeating only while the host, network and FFmpeg process remain available; it does not guarantee an uninterrupted broadcast.
What you need before starting
- A working FFmpeg build with the encoders and network protocol support your chosen command needs.
- Story video files you have the rights to stream, stored where the host can read them.
- A YouTube channel with live streaming enabled. YouTube says first-time activation can take up to 24 hours.
- A stable internet connection with enough upload capacity for the selected bitrate, plus an always-on computer or server.
YouTube Live does not require FFmpeg specifically, but this method requires the FFmpeg process and its host to keep running. YouTube’s current encoder guidance covers RTMP/RTMPS ingest, supported codecs, frame rates, bitrate and keyframes: YouTube Help: encoder settings.
Prepare a compatible concat playlist
Create a plain-text UTF-8 file such as stories.ffconcat in the same directory as the clips. Put this exact signature on the first line if you want FFmpeg to recognize the format automatically; do not add a byte-order mark before it.
ffconcat version 1.0
file 'story-01.mp4'
file 'story-02.mp4'
file 'story-03.mp4'
Each file line names the next clip. Relative paths are easier to move between systems and work with the demuxer’s default safe-path setting. Paths containing spaces or special characters need appropriate quoting or escaping. Absolute paths and other unsafe forms may be rejected by default.
#1 Best Overall
- 【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
Check the clips before relying on stream copy
The concat demuxer joins packets sequentially and adjusts timestamps. FFmpeg requires the listed files to have the same streams, codecs and time bases; in practice, inspect the audio and video streams as well as dimensions, frame rates and audio layout. If they differ, use a normalized set of files or a filter-based concat workflow that re-encodes to a shared format. The concat filter is the appropriate alternative when re-encoding is needed; the demuxer is useful when compatible packet streams can be joined without re-encoding. See the FFmpeg concat demuxer documentation and FFmpeg FAQ on concatenating files.
Unequal audio and video durations can create gaps or artifacts because timestamp adjustment is global. The demuxer accepts a duration directive to override a file’s duration, but use it only when you know the accurate duration. Estimated or incorrect values can make timing problems worse.
Use safe paths deliberately
The command below uses -safe 0 to allow absolute paths, which some playlists need. Use it only with a playlist you trust. If you use portable relative paths instead, omit -safe 0 and retain the default safety checks.
Get YouTube’s ingest URL and stream key
- In YouTube Studio, create or schedule the live stream and open its Live Control Room.
- In the stream settings, copy the server URL and stream key for the event. To use encrypted ingest, expose and copy the RTMPS URL as directed in YouTube’s encoder setup help.
- Keep the stream key private. Do not publish it in a command, screenshot, repository or shared log. Treat it like a password; if exposed, replace or reset it in YouTube Studio.
- Use the URL and key YouTube supplies for that stream. Depending on the encoder and endpoint, the ingest address may be entered as a URL with the key appended, or as a server URL plus a separate stream name. YouTube’s Live API documentation describes the primary RTMPS ingestion address and stream name.
The examples use a single RTMPS URL with the key in the path. Replace the placeholder with the exact value for your event; never paste a real key into an article or public terminal capture.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
- Office Gaming Mini PC - UPGRADED GMKtec Nucbox M5 Ultra Series is equipped with the powerful AMD Ryzen 7 7730U processor, 8 Cores/16 Threads, Base 2.00GHz (Power Saving Quiet Mode) with Turbo Boost up to 4.50GHz (Performance Mode) in BIOS settings, Based on the ZEN 3+ architecture, this small but powerful mini pc delivers satisfying results in productivity, office work, and gaming. 35% Performance increase over AMD Ryzen 5 7430U/ Ryzen 7 5700U, 5600U, 5560U, 5500U.
- 16GB DDR4 RAM & 256GB PCIe SSD - Installed with DDR4 16GB RAM (1x16GB), the Nucbox M5 Ultra mini pc support expansion to 64GB RAM. Featured with 256GB M.2 2280 PCIe 3.0 SSD, support dual slot expansion to 4TB SSD. (Upgrades not included)
- DUAL NIC LAN 2.5G RJ45 - Fast Network Speeds: Enjoy up to 2500Mbps data transmission speed without worrying about lagging. Ideal for working, gaming, and surfing the internet. Great for Untangle, Pfsense or as a server office PC.
- Mini Desktop Computer with 4K Triple Screen Display - Nucbox M5 Ultra integrates AMD Radeon Graphics 8 Cores 2000 MHz GPU to deliver powerful graphics processing power to easily handle the demands of complex design software, 4K@60Hz UHD video editing, and playback. It can connect to 3 display screens simultaneously.
- Fast Internet WiFi 6E + BT5.2 Connection - GMKtec Mini PC with WiFi-6E Wireless, have 2.5G/5G/6G triple band, more faster and lower latency. Bluetooth 5.2 allowing you more quickly to connect other wireless devices (headset, mouse, keyboard, etc.) Interface features 2*USB3.2 ports, 2*USB2.0 ports, 1*HDMI 2.0 port(4K@60Hz), 1*USB-C port(PD/DP/DATA), 1*DP Port, 1*Audio 3.5mm (HP&MIC), 1*DC Power Port.
Choose whether to re-encode
Reliable starting point: encode to H.264 and AAC
This template re-encodes the input to H.264 video and AAC audio. Replace each uppercase placeholder with a suitable value and your actual RTMPS ingest URL. It is an explanatory template, not a tested command.
ffmpeg -re -stream_loop -1 -f concat -safe 0 -i stories.ffconcat
-c:v libx264 -preset veryfast -pix_fmt yuv420p
-b:v VIDEO_BITRATE -maxrate VIDEO_BITRATE -bufsize VIDEO_BUFFER
-g KEYFRAME_INTERVAL_FRAMES -keyint_min KEYFRAME_INTERVAL_FRAMES
-sc_threshold 0 -c:a aac -b:a 128k -ar 44100
-f flv 'rtmps://YOUTUBE_INGEST_URL/YOUR_STREAM_KEY'
-stream_loop -1 loops the input indefinitely, and -re reads file input at its native rate so it is paced like a live feed. Both are input-related options, so they appear before -i. The video bitrate, maximum rate, buffer size and keyframe interval are placeholders, not literal settings. Select them for the resolution, frame rate, codec and upload capacity you intend to use.
Lower-CPU option: copy compatible streams
If every clip has compatible packet streams and the output container and protocol accept them, try stream copy to avoid re-encoding:
ffmpeg -re -stream_loop -1 -f concat -safe 0 -i stories.ffconcat
-c copy -f flv 'rtmps://YOUTUBE_INGEST_URL/YOUR_STREAM_KEY'
Stream copy is not a universal shortcut for arbitrary MP4 files. If YouTube’s preview or stream health reports codec, timestamp, resolution or audio problems, normalize the clips or use the re-encoding route. For either command, omit -safe 0 when relative paths let you use the default safe-path checks.
Rank #3
- 【AMD Ryzen 3 5300U CPU: Outperforms N150 & 3500U】 BOSGAME E5 mini PC is powered by the TSMC 7nm FinFET architecture AMD Ryzen 3 5300U processor (4 Cores, 8 Threads, up to 3.8GHz boost, 6MB total cache). Compared to low-end Intel N150 or 3500U chips which only have 4 single threads and throttle under load, the 5300U delivers over 30% faster multi-core speed. Run 30+ browser tabs, large Excel sheets, and Zoom meetings simultaneously without system lag.
- 【8GB DDR4 RAM & 256GB NVMe SSD Storage】 Installed with high-speed 8GB DDR4 dual-channel memory and a fast 256GB M.2 2280 SSD, eliminating slow boot times and application loading delays. To accommodate growing data requirements, the upgradeable hardware design features dual SODIMM slots that allow you to expand memory up to 64GB RAM, ensuring smooth operation during heavy multitasking.
- 【High-Capacity Dual M.2 SSD Storage Expansion】 Never worry about running out of space for your business files. In addition to the pre-installed 256GB system drive, the motherboard houses an extra empty internal M.2 2280 NVMe PCIe 3.0 slot. This allows you to easily add a second solid-state drive for up to an additional 2TB of storage capacity (upgrades not included) without needing to remove or reinstall the original operating system.
- 【Radeon 6-Core Graphics & Triple 4K Displays】 Integrated with official AMD Radeon Graphics (6 Graphics Cores, 1500 MHz frequency) for casual gaming, photo editing, and crisp 4K media decoding. Featuring 1x HDMI 2.0 port, 1x DisplayPort, and 1x Full-Function Type-C port, the E5 outputs true 4K@60Hz resolution to three monitors at once. This multi-screen setup eliminates constant window-switching for traders, programmers, and office workers.
- 【Dual 2.5GbE LAN Ports for Advanced Networking】 Experience fast wired network transmission speeds up to 2500Mbps without lagging or buffering. The integration of dual 2.5 Gigabit Ethernet ports (powered by Realtek RTL8125 controller) makes this compact computer an exceptional hardware choice for tech enthusiasts. Easily configure it into software routers, hardware firewalls (pfSense, OpnSense), home NAS servers, or local homelabs.
Set bitrate, keyframes and audio for YouTube
YouTube’s published encoder recommendations include the following H.264 video rates. These are YouTube’s recommendations, not independently measured results; its help page does not show a publication year for the figures.
| Output | H.264 minimum bitrate | H.264 recommended bitrate |
|---|---|---|
| 720p30 or 720p60 | 3 Mbps | 8 Mbps |
| 1080p30 | 5 Mbps | 14 Mbps |
| 1080p60 | 6 Mbps | 17 Mbps |
Do not select a bitrate by resolution alone. Match it to the actual frame rate and codec, and make sure the available upload capacity can sustain it. YouTube recommends a speed test and a representative pre-stream test with audio and motion similar to the planned broadcast. Use constant bitrate (CBR) encoding and a two-second keyframe interval; YouTube says not to exceed four seconds. In the command, -g and -keyint_min set the interval in frames, so for a two-second interval use twice the frame rate (for example, 60 frames at 30 fps or 120 at 60 fps).
YouTube lists H.264, H.265/HEVC and AV1 video, up to 60 fps, and AAC or MP3 audio for encoder ingest. The example uses H.264, stereo AAC at 44.1 kHz and 128 kbps, matching YouTube’s listed stereo-audio recommendation. For 5.1 AAC, YouTube recommends 48 kHz and 384 kbps. For SDR, it lists Rec. 709. Consult the current YouTube encoder settings when choosing a different codec, format or channel layout.
Start the broadcast and monitor it
- Configure the YouTube event first, then start FFmpeg with the playlist and the event’s RTMPS URL and key.
- Wait for the incoming preview in Live Control Room. Check that both video and audio appear as expected before relying on the broadcast.
- Monitor stream health and any messages in Live Control Room. YouTube says it can detect encoder settings automatically, while custom stream keys can be used to select resolution manually.
- Run a representative test before the planned 24/7 schedule, including audio and motion like the story stream itself.
A concat loop solves playlist repetition; it does not restart FFmpeg after a process crash or fix a failed host, disk, network or ingest connection. For a long-running setup, use operating-system-appropriate process supervision, logs, disk-space checks and alerting. Choose restart behavior deliberately and validate it under failure conditions. The official FFmpeg and YouTube guidance does not prescribe one universal supervisor configuration or guarantee uninterrupted service.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsRank #4
- 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.
Plan separately for recordings and archives
YouTube’s setup guidance says streams under 12 hours are automatically archived. A continuous 24/7 broadcast is longer than that documented window, so do not assume the entire feed will become one normal archived video. Decide separately how to retain the story files or capture recordings, and check YouTube’s current handling before depending on an archive. The cited guidance does not establish an automatic-archive guarantee for streams that run longer than 12 hours: YouTube Help: live stream setup.
Copyright and reused-content checks
Only stream stories, music, images and other material you own or are licensed to use for this purpose. A live stream is still subject to YouTube’s copyright and policy systems; a loop does not make unlicensed material permissible. Also consider whether the channel’s overall programming adds meaningful value rather than merely repeating material. Before scheduling a long-running feed, review YouTube’s applicable rules and keep documentation for any licenses you rely on. StreamNeo provides a free copyright safety checklist, but the checklist is not a substitute for permission or legal advice.
Troubleshoot common failures
FFmpeg rejects a path or cannot open a clip
- Likely cause: a typo, working-directory mismatch, special character, or unsafe absolute path.
- Fix: verify each file exists and that the FFmpeg process can read it. Use quoted paths; prefer relative paths. Use
-safe 0only for a trusted playlist that needs unsafe path forms.
The stream has gaps, glitches or stops at a clip boundary
- Likely cause: mismatched streams, codecs, time bases or durations in the concat-demuxer inputs.
- Fix: inspect the clips, normalize them to a common set of stream properties, or switch to a filter-based concat workflow with re-encoding. Do not assume stream copy will repair mismatches.
YouTube preview shows no video or audio, or reports an ingest problem
- Likely cause: an unsupported or mismatched stream format, a wrong server URL or key, or packet and timestamp incompatibility.
- Fix: compare the output to YouTube’s current encoder recommendations, verify the event URL and key, and test the re-encoding command if stream copy was used. Check preview and health messages in Live Control Room.
The feed is buffering or stream health degrades
- Likely cause: the chosen bitrate exceeds sustainable upload capacity, or the network or host is unstable.
- Fix: test the connection, lower the bitrate to a suitable value, and observe the preview and health indicators during a representative test.
The stream ends when the computer or process stops
- Likely cause: the FFmpeg process, host, storage or network is no longer available. Looping only controls input repetition.
- Fix: keep the host and process supervised, retain logs, and test the restart procedure. If you do not want a home computer or network to be part of the uptime chain, consider a cloud-based option below.
Or let it run in the cloud
For a YouTube story stream without an always-on home computer, StreamNeo runs uploaded videos from the cloud. Upload a recording or build a playlist, add your YouTube stream key once, and go live. It plays uploaded videos, not a live camera feed, and streams to YouTube.
Quick Recap
- Nothing has to stay on at home; the stream continues from the cloud.
- Any quality up to 4K 60fps as uploaded, at one 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 required.
- Monthly billing is $9.99 per month.
Start with the free StreamNeo trial.
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.
Free tools Windows power users keep installed
One-click scans. No signup required.

