Use FFmpeg’s concat demuxer to play compatible prerecorded files in sequence through one encoder output to YouTube Live. The script sets file order and stream-relative timing; it does not schedule blocks for particular clock times or manage YouTube broadcast events. You’ll need to prepare compatible media, create an ffconcat text file, send it to YouTube with your stream URL and key, and manage preview, publication, monitoring, and archiving separately.
What an FFmpeg concat file does—and what it does not do
The concat demuxer reads a text script and processes its listed files one after another. FFmpeg adjusts timestamps so each file starts where the previous one ends. If streams inside the files have different lengths, gaps may occur. The script describes a sequence, not a wall-clock timetable: it does not say “start block two at 9 p.m.” or schedule a YouTube broadcast event.
YouTube treats the broadcast event and the incoming stream as separate resources. The encoder sends media to YouTube using a stream URL and key; Live Control Room preview and the Go live action are part of YouTube’s broadcast workflow. Changing the files in an FFmpeg sequence is not the same as creating or scheduling a YouTube event.
Check whether the files are compatible
Before building the script, inspect every block. FFmpeg’s concat demuxer documentation says: “All files must have the same streams (same codecs, same time base, etc.).” In practice, check that the files have matching stream layouts and compatible codecs and time bases. The demuxer is not a general-purpose converter for arbitrary MP4 files.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- HD streaming made simple: With America’s number 1 TV streaming platform,* exploring popular apps—plus tons of free movies, shows, and live TV—is as easy as it is fun. *Based on hours streamed—Hypothesis Group
- Compact without compromises: The sleek design of Roku Streaming Stick won’t block neighboring HDMI ports, and it even powers from your TV alone, plugging into the back and staying out of sight. No wall outlet, no extra cords, no clutter.
- No more juggling remotes: Power up your TV, adjust the volume, and control your Roku device with one remote. Use your voice to quickly search, play entertainment, and more.
- Shows on the go: Take your TV to-go when traveling—without needing to log into someone else’s device.
- TV, simplified: With setup that only takes minutes, a simple-to-navigate Home Screen, and an uncluttered remote control that does all you need—Roku makes it easier to watch the TV you love.
- If the inputs meet the demuxer’s compatibility requirements and you want to avoid re-encoding, the concat demuxer may be suitable.
- If the inputs differ and need to be reconciled through re-encoding, FFmpeg’s FAQ points to the concat filter instead.
- Do not assume that adding
-c copymakes incompatible inputs work. Verify the files and test the resulting transitions before a live broadcast.
Duration metadata matters too. FFmpeg uses a file’s duration to position the next file, so inaccurate duration information can produce timestamp artifacts. If streams within a file do not have matching lengths, the transition may also leave a gap.
Create the ffconcat script
1. Put the blocks in playback order
Create a plain-text file, for example schedule.ffconcat, with one file directive for each block. The first line must be exactly ffconcat version 1.0—with no leading spaces or byte-order mark—if you want FFmpeg to recognize the format automatically.
Rank #2
- Ultra-speedy streaming: Roku Ultra is 30% faster than any other Roku player, delivering a lightning-fast interface and apps that launch in a snap.
- Cinematic streaming: This TV streaming device brings the movie theater to your living room with spectacular 4K, HDR10+, and Dolby Vision picture alongside immersive Dolby Atmos audio.
- The ultimate Roku remote: The rechargeable Roku Voice Remote Pro offers backlit buttons, hands-free voice controls, and a lost remote finder.
- No more fumbling in the dark: See what you’re pressing with backlit buttons.
- Say goodbye to batteries: Keep your remote powered for months on a single charge.
ffconcat version 1.0
file 'block-01.mp4'
file 'block-02.mp4'
file 'block-03.mp4'
Save the script where FFmpeg can read it, and use paths that resolve from the process’s working directory. Follow FFmpeg’s concat-demuxer escaping rules for spaces and special characters in paths; do not assume ordinary shell quoting alone handles every path in the script.
2. Add duration only when needed
A duration directive can override duration information stored in a file. Use it when the reported duration is missing or inaccurate, and verify the intended cut point against the actual media. The value affects where FFmpeg positions the next file; it is not a clock time at which YouTube will switch content.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
- Stunning 4K and Dolby Vision streaming made simple: With America’s number 1 TV streaming platform,* exploring popular apps—plus tons of free movies, shows, and live TV—is as easy as it is fun. *Based on hours streamed—Hypothesis Group
- Breathtaking picture quality: Stunningly sharp 4K picture brings out rich detail in your entertainment with four times the resolution of HD. Watch as colors pop off your screen and enjoy lifelike clarity with Dolby Vision and HDR10+.
- Seamless streaming for any room: With Roku Streaming Stick 4K, watch your favorite entertainment on any TV in the house, even in rooms farther from your router thanks to the long-range Wi-Fi receiver.
- Shows on the go: Take your TV to-go when traveling—without needing to log into someone else’s device.
- Compact without compromises: Our sleek design won’t block neighboring HDMI ports, so you can switch from streaming to gaming with ease. Plus, it’s designed to stay hidden behind your TV, keeping wires neatly out of sight
ffconcat version 1.0
file 'block-01.mp4'
duration 600
file 'block-02.mp4'
Here, 600 is an example duration in seconds, not a measured length of your file. Do not copy it unless it matches the section you intend to use. The inpoint and outpoint directives can select a portion of a file; confirm the resulting boundaries with a test run, particularly if the files are being concatenated without re-encoding.
Send the sequence to YouTube Live
- Get the ingest details from YouTube Studio. In YouTube Studio’s Live Control Room, set up or select the broadcast and obtain the stream URL and stream key for the encoder workflow. Treat the key as a secret. Never publish it in a command, screenshot, script, or support post.
- Start FFmpeg with the concat input. Point the input at your script and configure the output for the YouTube ingest details and the encoding settings appropriate to your stream. A generic command shape is shown below; replace every placeholder with your own values and options. It is not a complete, universally suitable encoding preset.
- Check the preview. Once FFmpeg is sending media, inspect the Live Control Room preview for picture, sound, and timing issues.
- Publish the event when ready. Use YouTube’s Go live action when appropriate for the broadcast. This is a platform action, separate from the order of files in the concat script.
- Monitor the process and connection. The concat demuxer documents sequential playback, not guaranteed indefinite operation, unattended recovery, or a calendar-based block scheduler. Plan separately for process supervision, network failures, content changes, and recovery.
ffmpeg -f concat -safe 0 -i schedule.ffconcat [input/output options] -f flv 'YOUTUBE_INGEST_URL/YOUR_STREAM_KEY'
This is a command template, not a recommendation to copy its placeholders literally. Replace YOUTUBE_INGEST_URL and YOUR_STREAM_KEY with the private ingest details YouTube provides, and supply output options appropriate to your chosen codecs and stream. The example uses -safe 0 to allow paths that may not meet the concat demuxer’s default safe-path rules; use it only when you understand and trust the script’s file paths. Never expose a real stream key.
Rank #4
- Advanced 4K streaming - Elevate your entertainment with the next generation of our best-selling 4K stick, with improved streaming performance optimized for 4K TVs.
- The newest Fire TV experience (2026) – Our biggest update to Fire TV has a new, modern design that gets you to your entertainment fast. Browse dedicated content categories, pin more of your favorite apps, and get personalized recommendations from Alexa+. Spend less time scrolling, and more time watching.
- Cloud gaming, no console required – Stream Call of Duty: Black Ops 7, Hogwarts Legacy, Outer Worlds 2, Ninja Gaiden 4, and hundreds of games on your Fire TV Stick 4K Select with Xbox Game Pass and Luna via cloud gaming. Xbox Game Pass subscription and compatible controller required. Each sold separately.
- Smarter picks with Alexa+ – Getting to what you love has never been easier. Press the voice remote button and talk naturally to find what to watch across your apps, manage your smart home, or dive into virtually any topic.
- Wi-Fi 6 support - Enjoy smooth 4K streaming, even when other devices are connected to your router.
Plan block changes, continuous operation, and archives separately
A concat script determines which file follows which, using stream-relative timestamps and duration information. It does not provide a recurring daily timetable, trigger a switch at a specified local time, or itself restart a failed FFmpeg process. Those are operational concerns beyond the sequence file.
Plan replay expectations separately as well. YouTube Help says streams under 12 hours are automatically archived. That statement does not establish that an uninterrupted 24/7 feed will be archived as one video, so do not rely on a single continuous archive outcome for a longer run.
Best Value
- Essential 4K streaming – Get everything you need to stream in brilliant 4K Ultra HD with High Dynamic Range 10+ (HDR10+).
- The newest Fire TV experience (2026) – Our biggest update to Fire TV has a new, modern design that gets you to your entertainment fast. Browse dedicated content categories, pin more of your favorite apps, and get personalized recommendations from Alexa+. Spend less time scrolling, and more time watching.
- Make your TV even smarter – Fire TV gives you instant access to a world of content, tailor-made recommendations, and Alexa, all backed by fast performance.
- All your favorite apps in one place – Experience endless entertainment with access to Prime Video, Netflix, YouTube, Disney+, Apple TV+, HBO Max, Hulu, Peacock, Paramount+, and thousands more. Easily discover what to watch from hundreds of thousands of movies and TV episodes (subscription fees may apply), including free, ad-supported content.
- Getting set up is easy – Plug in and connect to Wi-Fi for smooth streaming.
Troubleshoot common concat-stream problems
- FFmpeg does not recognize the script automatically: Confirm that the very first line is exactly
ffconcat version 1.0, with no extra spaces or byte-order mark. Check that the file is plain text and the path passed to FFmpeg is correct. - A file fails to open: Check the script path, each media path, permissions, and the working directory. Apply FFmpeg’s escaping rules to spaces and special characters. If you use
-safe 0, verify that every referenced path is trusted. - Playback breaks or produces artifacts at a join: Check that the files have the same streams, codecs, and time base. Review duration metadata and any
duration,inpoint, oroutpointdirectives. If the inputs require conversion to match, use the concat filter and re-encode rather than expecting the demuxer to reconcile them. - There is a gap between blocks: Compare the lengths of streams inside the files and verify the duration used for the preceding file. FFmpeg notes that mismatched stream lengths can leave gaps.
- YouTube does not show the expected live picture: Confirm the private stream URL and key, verify FFmpeg is still sending, and inspect the Live Control Room preview. The concat script cannot correct an incorrect ingest configuration or publish the event for you.
- The stream stops and does not resume: The concat demuxer does not promise process supervision or automatic recovery after a process or network failure. Arrange monitoring and a recovery plan outside the script.
- No single archive appears for a long continuous run: YouTube Help’s automatic-archive statement applies to streams under 12 hours; it is not a promise of one archive for an uninterrupted 24/7 stream.
Or let it run in the cloud
If you want prerecorded videos to keep a YouTube channel live without keeping a computer or home connection running, StreamNeo is a cloud option. 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 sends to YouTube only.
There is nothing to leave running at home. Every slot streams uploaded material at its original quality up to 4K 60fps at one flat price per slot, with automatic recovery if YouTube drops the stream. The first day is free with no card. Monthly billing is $9.99 per month.
Quick Recap
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.

