October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
DocumentaryTube
Admit one · Blog

How to Set Up FFmpeg Concat for a Continuous YouTube Livestream of Story Videos

Use FFmpeg’s concat demuxer to play compatible story videos in order, loop them at real-time speed, and send the output to YouTube Live over RTMPS.
Opened Runtime6 min Written byDocumentaryTube Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To loop prerecorded story videos into a continuous YouTube livestream, put compatible files in a text playlist and feed it to FFmpeg’s concat demuxer with real-time pacing and infinite looping. Then encode the output to YouTube Live’s RTMPS ingest URL using the stream key from your Live Control Room. The setup depends on the files matching the concat demuxer’s requirements; if they do not, normalize them or use the concat filter and re-encode.

What you need before starting

  • An installed FFmpeg build with the concat demuxer and the encoders you intend to use. Encoder availability varies by platform and build; check your local build rather than assuming libx264 is present.
  • Local video files arranged in the order you want the stories to play.
  • A YouTube channel with access to Live Control Room, where you can obtain the account-specific RTMPS ingest URL and stream key.
  • An upload connection that can sustain the chosen video and audio bitrate with room for normal network variation.

The command below is an illustrative starting point for compatible H.264/AAC inputs, not a tested universal command. It assumes a 30 fps output for its 60-frame GOP and that the installed FFmpeg build includes the listed encoders.

Prepare and check the story files

Make the playlist

Create a plain text file named playlist.txt in the directory where you will run FFmpeg. Put one video entry per line, in playback order:

file 'story-01.mp4'
file 'story-02.mp4'
file 'story-03.mp4'

The concat script may also begin with the exact line ffconcat version 1.0 to identify its format. Keep paths simple where possible. Paths containing spaces or special characters need correct quoting or escaping.

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 compatibility and durations

The concat demuxer expects the files to have the same streams, codecs, and time base. Compare resolution, frame rate, audio sample rate and channel layout as well as stream count and codec. The files’ duration metadata also needs to be reliable: FFmpeg uses each file’s duration to calculate timestamps for the next one, so incorrect duration information can cause gaps or artifacts at boundaries.

If the inputs differ in stream layout, codec, time base, resolution, frame rate, or audio configuration, normalize or transcode them first, or use FFmpeg’s concat filter and re-encode. Stream copy is an option only when the sources are already compatible with one another and YouTube’s ingest expectations.

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.

Get YouTube’s ingest details

  1. Open YouTube Studio and go to Live Control Room for the stream you are setting up.
  2. Copy the RTMPS server URL and the stream key shown for that stream. Use those exact, account-specific values; do not substitute a URL or key from another setup.
  3. Keep the key secret. Avoid putting a command containing the key in screenshots, shared scripts, or logs. Use protected environment variables or another method appropriate to your system.

YouTube’s current encoder guidance lists H.264, H.265/HEVC, and AV1 video over RTMP/RTMPS, up to 60 fps; CBR video bitrate encoding; AAC or MP3 audio; and a recommended two-second keyframe interval, not exceeding four seconds. For H.264, YouTube recommends 10 Mbps at 1080p/30 fps and 17 Mbps at 1080p/60 fps. Its stereo audio recommendation is 128 Kbps at 44.1 kHz. These are YouTube’s recommendations, not a guarantee of picture quality or a substitute for checking your connection’s capacity. YouTube does not give a publication year for the guidance; these figures reflect the page as accessed in 2026.

Run FFmpeg with real-time pacing and looping

Example command for compatible H.264/AAC inputs

Replace the environment-variable values with the RTMPS URL and key from Live Control Room. The example uses a 5 Mbps video rate, which is a template value—not YouTube’s recommended H.264 rate for 1080p in the guidance above—and may not suit your resolution or motion. Choose settings for your target stream and the upload connection you can sustain.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.
ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.txt 
  -c:v libx264 -preset veryfast -b:v 5M -maxrate 5M -bufsize 10M 
  -g 60 -keyint_min 60 -sc_threshold 0 
  -c:a aac -b:a 128k -ar 44100 -ac 2 
  -f flv "$YOUTUBE_RTMPS_URL/$YOUTUBE_STREAM_KEY"

-re and -stream_loop -1 are input options, so keep them before the playlist’s -i. -re reads the file input at its native frame rate so it is paced like a live feed; -stream_loop -1 requests indefinite repetition. The concat demuxer reads the playlist sequentially, so its line order determines the story order.

The -g 60 and -keyint_min 60 values mean a 60-frame GOP; at 30 fps that is two seconds. If you change output frame rate, adjust the GOP to preserve the intended keyframe interval. Match bitrate, frame rate, resolution, and codec to the stream you configure in YouTube and to your sustained upstream capacity.

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

When stream copy may be appropriate

If all files have matching streams, codecs, time bases, and timestamps, and the resulting output is accepted by YouTube, stream copy with -c copy can reduce CPU use. It avoids re-encoding, so it cannot make incompatible inputs compatible. Confirm boundary behavior and ingest acceptance before relying on it for a long broadcast. When the inputs do not match, re-encoding is the more suitable route.

Test the stream and monitor it

  1. Start with a short test using representative story footage and audio, including a file boundary and the point where the playlist should repeat.
  2. Check YouTube’s stream health and preview before relying on the broadcast. Confirm that audio is present, motion is smooth, the picture is correctly sized, and the connection remains stable.
  3. Watch the FFmpeg output for errors and monitor the actual stream during the broadcast. A command starting successfully does not establish that every boundary, bitrate, or network condition will behave correctly over time.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common failures

Symptom Likely cause What to check or change
FFmpeg cannot find a playlist entry or stops at a file boundary Incorrect path, quoting, or playlist entry; mismatched streams or unreliable duration metadata can also break boundary timing. Check each path from the working directory, correct quoting, and inspect every input with FFprobe. Compare stream count, codec, time base, frame rate, resolution, audio sample rate and channel layout, and duration metadata.
FFmpeg reports an unsafe file path The concat demuxer’s safe-path checks reject an entry. Prefer safe relative paths. For a trusted local playlist only, -safe 0 relaxes the path restrictions; do not use it with untrusted paths.
Picture or sound jumps, gaps, or artifacts appear at transitions Inputs do not match the concat demuxer’s stream requirements, or duration metadata is wrong. Verify streams and durations. Normalize or transcode the files, or switch to the concat filter and re-encode.
YouTube does not accept the ingest connection The RTMPS URL or key may be wrong, or the output settings may not match the configured stream. Copy the URL and key again from Live Control Room. Check codec, bitrate, keyframe interval, and the stream’s configured settings. YouTube notes that RTMPS SSL errors can require the correct rtmps URL and, in some cases, port 443.
The stream buffers or drops despite valid settings The upload connection may not sustain the chosen bitrate reliably. Use a rate your upstream can maintain, allow connection headroom, and monitor YouTube’s stream health. Lowering the target bitrate may improve stability, at the cost of image quality.

RTMPS or HLS?

For a conventional H.264/AAC FFmpeg output, RTMPS is the straightforward ingest path. YouTube also describes HLS as an alternative for HDR or codecs unsupported by RTMP, but HLS uses segmented delivery and has greater latency. It also has playlist, segment-duration, format, and HTTPS method requirements, so it is not a drop-in replacement for the RTMPS command above.

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.

Or let it run in the cloud

If you would rather not keep a computer and home connection running, StreamNeo keeps an uploaded-video YouTube stream looping from the cloud. The setup is three steps: upload a recording or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home; every slot supports the uploaded quality up to 4K 60fps at one flat price per slot, without re-encoding, and StreamNeo automatically recovers if YouTube drops the stream.

The first day is free with no card. The same product is on every plan; only the billing length changes. Monthly is $9.99 per month. India-based customers can pay by UPI or card; card checkout is available worldwide. See StreamNeo or pricing for details. Start your free first day with StreamNeo.

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 *

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.

More from the Screening Room

  1. The Arrivals: Two Novels and a DocumentaryAdmit one · ReligionThe Arrivals: Two Novels and a DocumentaryOpened05 OCT 2026Runtime2 min
  2. The Mind Bending Story Of Quantum PhysicsAdmit one · ScienceThe Mind Bending Story Of Quantum PhysicsOpened05 OCT 2026Runtime3 min
  3. Dimensions: A Walk Through MathematicsAdmit one · ScienceDimensions: A Walk Through MathematicsOpened05 OCT 2026Runtime2 min
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

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.