October 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 ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
DocumentaryTube
24/7 streaming

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

Use FFmpeg’s concat demuxer and an infinite input loop to send a prerecorded story playlist to YouTube Live. Learn the compatibility checks, settings, launch steps, and failure points.

By DocumentaryTube Team 8 min read
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To run a prerecorded story playlist continuously on YouTube Live with FFmpeg, put compatible clips in a concat-demuxer playlist, loop that playlist with -stream_loop -1, pace file reading with -re, and send the output to the YouTube ingest URL and stream key from Live Control Room. The loop only repeats the input: your computer or server, network, FFmpeg process, and YouTube ingest still need monitoring and recovery planning.

What you need before building the stream

  • An activated YouTube channel with live streaming enabled. First-time live activation may take up to 24 hours; after that, a configured stream can go live promptly. YouTube’s live-stream setup guidance describes setup and activation.
  • FFmpeg installed with the required input, encoder, and RTMPS protocol support. Check your build if an encoder or protocol is unavailable.
  • A set of prerecorded story videos you have the rights to use, stored where the machine running FFmpeg can read them.
  • A stable, always-on host and internet connection with enough upload capacity for the selected video and audio bitrate.
  • The server URL and stream key for the YouTube event. Keep the key private; anyone who obtains it may be able to send video to your stream.

This method is for prerecorded video, not a live camera feed. FFmpeg’s concat demuxer joins compatible media packets in sequence; it does not make incompatible clips identical automatically.

Prepare a compatible story playlist

Create the concat file

Save a plain-text file such as stories.ffconcat. If you use the optional signature, it must be the exact first line, with no byte-order mark:

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

Each file directive names the next clip. Relative paths are more portable and work with the demuxer’s default safe-path setting when they use accepted path forms. Paths containing spaces or special characters must be quoted or escaped correctly. Absolute paths and other unsafe forms may be rejected by default.

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.

Check every clip before using stream copy

The concat demuxer expects the files to have the same streams, codecs, and time bases. In practice, compare their video and audio stream layouts, codecs, dimensions, frame rates, and audio properties before attempting a no-reencode pipeline. The demuxer concatenates packets and adjusts timestamps; it does not re-encode clips to reconcile differences.

Different stream properties can make stream copy fail or produce playback problems. Unequal stream durations can also create gaps because timestamp adjustment is global. Incorrect or estimated durations may cause artifacts. If a duration is known accurately and needs correction, FFmpeg’s concat format supports a duration directive for a file.

If the clips are not compatible, pre-transcode them to a common format or use a filter-based concat-and-encode workflow. FFmpeg distinguishes the concat demuxer, useful where packet streams can be joined without re-encoding, from the concat filter, generally appropriate when the inputs need filtering or re-encoding. See the FFmpeg concat FAQ and concat demuxer documentation.

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.

Configure YouTube Live and protect the stream key

  1. In YouTube Studio, create or schedule the live stream and open its Live Control Room settings.
  2. Copy the server URL and stream key shown for that stream. If using encrypted ingest, expose and copy the RTMPS URL in Stream settings.
  3. Use the URL and key for the specific event in FFmpeg’s output destination. Do not publish a real key in a command shared publicly, a screenshot, or a code repository.
  4. Start the encoder after configuring the event, then wait for YouTube’s preview and check Live Control Room’s stream-health messages before relying on the feed.

RTMPS is RTMP over TLS/SSL. YouTube’s documentation describes RTMPS ingest, while its Live API documents a primary RTMPS ingest address and stream name; some encoders expect those combined as STREAM_URL/STREAM_NAME. Use the exact endpoint and key format supplied for your stream. See YouTube’s encoder setup help and the YouTube Live API getting-started documentation.

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.

Run the playlist in a loop with FFmpeg

Re-encode for predictable output

For clips that need a consistent YouTube-ready output, use an encoding template like this. Replace every placeholder with a suitable value and the ingest URL/key from Live Control Room:

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'
  • -re reads file input at its native rate instead of sending it as fast as the machine can process it.
  • -stream_loop -1 loops the input indefinitely. It is an input option and must appear before the relevant -i.
  • -f concat selects the concat demuxer. -safe 0 permits paths the default safe-path check may reject, such as absolute paths. Use it only for a playlist you trust; relative paths are preferable where possible.
  • -c:v libx264 and -c:a aac encode video and audio. The bitrate, buffer, and GOP placeholders must be set for the chosen resolution, frame rate, and connection; do not paste the placeholders literally.
  • The destination shown is illustrative. Substitute the actual RTMPS URL and key, and confirm your FFmpeg build supports the requested encoder and protocol.

This is a command template, not a reported test. FFmpeg options and output behavior can depend on your build and media. Consult the FFmpeg command-line documentation when adapting it.

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.

Use stream copy only when the inputs and output are compatible

If all playlist files already have compatible packet streams, timestamps, and output-container characteristics, stream copy can avoid the CPU cost of 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'

Do not assume that arbitrary MP4 files can be concatenated and copied cleanly. If FFmpeg errors, or YouTube’s preview reports codec, timestamp, resolution, or audio problems, normalize the files or re-encode instead.

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

Choose bitrate and keyframe settings

YouTube’s current encoder-help recommendations call for CBR, a two-second keyframe interval (no more than four seconds), and a bitrate appropriate to codec, resolution, frame rate, and available upload capacity. For H.264, the published figures include:

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
Output Minimum bitrate Recommended bitrate
720p30 3 Mbps 8 Mbps
720p60 3 Mbps 8 Mbps
1080p30 5 Mbps 14 Mbps
1080p60 6 Mbps 17 Mbps

These are YouTube Help’s published recommendations, not independent measurements, and the page does not give them a publication year. Its current encoder guidance lists RTMP/RTMPS; H.264, H.265 (HEVC), or AV1 video; up to 60 fps; and AAC or MP3 audio. The command above uses H.264/AAC, so select its bitrate for the actual output you configure. YouTube recommends testing upload speed and leaving sufficient capacity rather than setting the encoder at the connection’s unstable maximum.

For stereo, YouTube recommends AAC or MP3 audio at 44.1 kHz and 128 kbps. For 5.1 AAC, it recommends 48 kHz and 384 kbps. It lists Rec. 709 for SDR. These recommendations and the bitrate table are on YouTube’s encoder settings page.

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

Start, monitor, and keep the feed available

  1. Run a representative test with both audio and moving video before scheduling a continuous broadcast.
  2. Start FFmpeg and confirm that YouTube receives the feed and presents a preview. Check Live Control Room’s health indicators and messages rather than assuming a running FFmpeg process means a healthy stream.
  3. Keep the host, media storage, and network available. Use operating-system-appropriate process supervision, logging, disk-space checks, and alerting. Set restart behavior deliberately and test recovery after failures.
  4. Track the machine’s CPU and upload connection if you are encoding locally. Re-encoding consumes more CPU than stream copy; stream copy reduces that load but is only appropriate for compatible inputs.
  5. Plan for failures of the host, network, encoder, or YouTube ingest. An infinite input loop handles none of those failures by itself, and the official documentation does not guarantee uninterrupted operation.

These operational safeguards are practical recommendations, not a universal supervisor configuration prescribed by FFmpeg or YouTube. Choose and validate them for the operating system and host you actually use.

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.

Plan separately for recordings and copyright

A 24-hour live stream is not necessarily a 24-hour archive

YouTube’s setup guidance says streams under 12 hours are automatically archived. A continuous 24/7 broadcast exceeds that documented window, so do not count on one complete 24-hour or longer VOD being automatically available. Keep separate copies of the source stories and verify YouTube’s current handling if you need a platform archive. The cited guidance establishes the under-12-hour rule, not a guarantee for longer streams. See YouTube’s live-stream archiving guidance.

Confirm rights and channel-policy fit

Use stories, footage, music, narration, and images that you own or are authorized to stream. A live stream is still subject to copyright and YouTube’s channel policies. Permission to use a clip does not automatically establish that a channel’s overall content meets every monetization or reused-content requirement; review the policies that apply to your channel and format before building a continuous feed.

Troubleshoot common failures

Symptom Likely cause What to check or change
FFmpeg rejects a playlist path Absolute or otherwise unsafe path with the default safe-path setting, or malformed quoting. Use relative paths where practical; check quoting and the playlist text. Only use -safe 0 with a trusted file list.
Concat fails or the join has glitches Clips have different streams, codecs, time bases, or incompatible packet properties; durations may be unequal or inaccurate. Inspect the files, normalize them to a common format, or use a filter-and-encode approach. Correct a duration only when its value is known accurately.
FFmpeg exits after a short run Invalid input, unsupported build feature, unreadable file, or output/connection error. The loop option cannot fix those failures. Read FFmpeg’s error output, verify every playlist path and installed encoder/protocol support, and check the RTMPS endpoint and key.
YouTube does not show a preview or reports stream health problems Wrong ingest URL/key, unsupported or unsuitable output settings, timestamp/codec issue, or insufficient upload stability. Re-copy the event’s URL and key, check the selected codec and bitrate, and test with representative audio and motion while monitoring Live Control Room.
Video stalls or disconnects during a long run Host, network, storage, FFmpeg process, or ingest interruption. Check logs, resource and disk availability, network stability, and alerting. Configure and test host-level restart/recovery rather than relying on -stream_loop alone.
The full broadcast is not available as one replay The stream exceeded the documented automatic-archive duration. Retain the source media separately and do not assume a continuous stream longer than 12 hours will be archived as a single VOD.

Cost and deployment trade-offs

FFmpeg itself does not require a paid hosting service. A local always-on computer avoids a separate host bill but depends on home power, equipment, and internet staying available. A cloud VPS or dedicated host can keep the process away from your home computer, but adds hosting cost and still requires you to configure FFmpeg, storage, network capacity, monitoring, and recovery. Re-encoding also uses host CPU; stream copy can reduce that load only when the files are compatible.

Or let it run in the cloud

StreamNeo is a cloud service for keeping a YouTube channel live from uploaded videos. Upload a recording or playlist, add your YouTube stream key, and go live; the cloud loops the video, so your computer and home connection do not need to stay on. It supports uploaded video up to 4K 60fps as uploaded, at one flat price per slot, and automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly pricing is $9.99 per month. Learn more at StreamNeo, then start your free day.

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

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 Screening Room

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.