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 DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
VGSources
Blog

How to Run a 24/7 YouTube Story Stream with FFmpeg Concat Files

Use an FFmpeg concat playlist and an indefinite input loop to send story videos to YouTube Live. Learn the file requirements, command options, encoder settings, monitoring steps, and 24/7 limitations.
Length6 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To loop a playlist of story videos into YouTube Live with FFmpeg, put the clips in a concat-demuxer text file, then run FFmpeg with -stream_loop -1 and YouTube’s server URL and stream key. Use -re to read the files at their normal playback rate. For a dependable 24/7 feed, the clips must be compatible, the host and network must stay available, and you must monitor YouTube’s Live Control Room; looping alone does not guarantee an uninterrupted broadcast.

1. Prepare a compatible playlist

Create the concat file

Place a plain-text file such as stories.ffconcat beside your video files. Use one file directive per clip:

ffconcat version 1.0
file 'story-01.mp4'
file 'story-02.mp4'
file 'story-03.mp4'

If you use the ffconcat version 1.0 signature, it must be the exact first line, with no byte-order mark, for automatic format recognition. Relative paths are easier to move between systems and work with the default safe-path setting. Quote or escape paths that contain spaces or special characters. Absolute paths and other unsafe paths may be rejected unless you change the safe-path option.

Check the files before choosing stream copy

The concat demuxer joins packets and adjusts timestamps so each file follows the previous one. It expects the files to have the same streams, codecs, and time bases. Differences in dimensions, frame rates, audio layouts, or other stream properties can make a no-reencode concat unreliable; mismatched stream durations can also create gaps or artifacts. Incorrect or estimated durations can make timestamp problems worse. A duration directive can override a file’s duration when you know the correct value.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
  • For stream copy, inspect every clip and confirm the streams are compatible with one another and with the output container.
  • If the clips differ, transcode them to a common format before using the concat demuxer with stream copy.
  • If you need to combine dissimilar clips while re-encoding, FFmpeg’s concat filter is the appropriate alternative to consider.

FFmpeg’s concat demuxer documentation describes these compatibility and timestamp constraints; its FAQ distinguishes the demuxer from the filter-based approach.

2. Get the YouTube ingest details

Create or schedule the live stream

  1. In YouTube Studio, create or schedule a live stream.
  2. Open Live Control Room and copy the server URL and stream key shown in the stream settings. Select and use the RTMPS URL when using encrypted ingest.
  3. Keep the stream key private. Do not publish it in a command, screenshot, repository, or log that other people can access.

YouTube describes RTMPS as RTMP over TLS/SSL. Its Live API documentation describes an RTMPS ingestion address and stream name; some encoders need them combined as STREAM_URL/STREAM_NAME. Use the exact URL and key for your event rather than assuming a fixed endpoint.

3. Choose an FFmpeg command

Re-encode for a consistent output

This template re-encodes the video as H.264 and audio as AAC. Replace every placeholder, including the ingest URL and key, with values appropriate to your stream. It is an explanatory template, not a tested command:

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
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 must appear before the relevant -i. -re reads file input at its native rate rather than sending it as quickly as the machine can process it. The example uses -safe 0 because playlists often contain absolute paths; omit it when relative paths suffice. Only disable safe-path checks for a playlist you trust. Confirm your FFmpeg build includes the encoders and protocol support you need.

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

Use stream copy only when the inputs are compatible

If all the clips’ packet streams, timestamps, and output format are compatible, stream copy avoids video and audio 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'

This is not a universal shortcut for arbitrary MP4 files. If the YouTube preview reports codec, timestamp, resolution, or audio problems, normalize the files or use a re-encoding approach.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

4. Set bitrate, keyframes, and audio

YouTube Help’s published encoder recommendations include the following H.264 video figures. The page does not state a publication year, so treat them as the figures shown in its current guidance rather than attaching an invented date.

Output H.264 minimum H.264 recommended
720p30 or 720p60 3 Mbps 8 Mbps
1080p30 5 Mbps 14 Mbps
1080p60 6 Mbps 17 Mbps

These are YouTube’s published recommendations, not independently measured results. Select a bitrate that fits your resolution, frame rate, codec, and sustained upload capacity. YouTube recommends CBR, a two-second keyframe interval (not over four seconds), and a connection speed test. The command’s KEYFRAME_INTERVAL_FRAMES must match the output frame rate and desired two-second interval—for example, 60 frames at 30 fps or 120 frames at 60 fps.

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.
  • For stereo audio, YouTube lists AAC or MP3 and recommends 44.1 kHz at 128 kbps.
  • For 5.1 AAC, it recommends 48 kHz at 384 kbps.
  • For SDR video, YouTube lists Rec. 709.

YouTube’s current encoder guidance lists RTMP/RTMPS, H.264, H.265 (HEVC), or AV1 video, up to 60 fps, and AAC or MP3 audio. The example above uses H.264 and AAC; do not assume a chosen codec is available in your FFmpeg build or accepted by every encoder configuration.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

5. Start the stream and keep it healthy

Test before relying on a continuous broadcast

  1. Configure the YouTube event and verify its ingest URL and key.
  2. Start FFmpeg and wait for the preview in Live Control Room.
  3. Check stream health and YouTube’s status messages. Test with audio and video motion similar to the intended broadcast.

YouTube says first-time live-stream activation can take up to 24 hours; once live streaming is enabled, a stream can go live instantly. Its encoder guidance says YouTube automatically detects selected encoder settings, while custom stream keys can be used to manually select resolution.

Plan for process, host, and network failures

A 24/7 setup depends on more than FFmpeg’s loop option. The host, storage, network connection, and FFmpeg process must remain available. Use a process supervisor suited to your operating system, retain logs, check disk space, and set restart behavior deliberately. Test the recovery behavior under failure conditions and arrange alerting so a stopped process or lost ingest does not go unnoticed. These are operational safeguards, not a universal supervision configuration prescribed by FFmpeg or YouTube; neither documentation guarantees uninterrupted service.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

6. Understand YouTube’s archive limit

YouTube Help states that streams under 12 hours are automatically archived. A continuous 24/7 broadcast exceeds that documented boundary, so do not assume the whole feed will be available as a normal archived video. Plan separately how to retain the story content, and verify YouTube’s current handling before depending on an archive.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

7. Troubleshoot common failures

Symptom Likely cause What to check
The concat input is rejected Malformed playlist, unescaped path, or unsafe absolute path under the default safe-path setting Check the exact first line, file paths, quoting, and whether you genuinely need -safe 0. Use it only for a trusted playlist.
Video or audio breaks at a clip boundary Different stream properties or durations across files Inspect the clips’ streams and time bases; normalize mismatched files, or use a re-encoding/filter workflow.
Audio gaps or timestamp artifacts occur Unequal stream durations or inaccurate duration information Check the media durations and timestamps. Use a duration directive only when you know the accurate duration.
YouTube preview reports an ingest or media problem Incompatible codec/container, timestamp issue, resolution mismatch, or incorrect ingest details Confirm the RTMPS URL and key from Live Control Room, check stream health, and try normalized inputs or re-encoding.
The stream stutters or drops Insufficient or unstable upload capacity, host load, or process/host failure Run a speed test, lower the bitrate if necessary, check host resources and logs, and validate supervisor restart and alerting behavior.
The live feed does not appear to start Live streaming may not yet be activated for a first-time stream Check YouTube Studio’s live-stream status; first-time activation may take up to 24 hours.

Or let it run in the cloud

If you do not want to maintain an always-on host and FFmpeg process yourself, StreamNeo is a cloud option for keeping an uploaded-video YouTube stream running. The steps are: upload a recording or build a playlist, add your YouTube stream key once, then go live. StreamNeo loops uploaded videos; it does not stream a camera feed.

  • Nothing has to stay on at home; the stream runs from the cloud.
  • Any uploaded quality up to 4K 60fps streams as made, at one flat price per slot, without re-encoding or quality tiers.
  • It attempts automatic recovery 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. StreamNeo is YouTube-only. See StreamNeo 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.

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 quests from Patch Notes

  1. How To Create Custom Stickers & Shoutouts In Monster Hunter WildsMonster Hunter WildsBlog20min
  2. How to Get XL Gogoat in Pokemon Legends Z-A (An Extra-Large Gogoat)Pokemon Legends Z-ABlog20min
  3. How to Get Rotting Lightbringer in Diablo 4Diablo 4Blog17min
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.