DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon 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×
FREEDOM251

Freedom251 › Blog › Automation

How to Rotate YouTube Livestream Playlists by Day of the Week in FFmpeg

By Freedom251 Team · · 5 min read

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

Use seven FFconcat playlist files and a small wrapper or scheduler that selects the correct file for the intended weekday. FFmpeg plays the playlist it is given; it does not choose a playlist by day. YouTube Live schedules the event and receives the encoder feed, while your local script controls which videos go into that feed.

How the weekday rotation works

Keep one FFconcat text file per day, such as monday.ffconcat and tuesday.ffconcat. At stream start, a script checks the weekday in your chosen timezone, assigns the matching playlist path, and launches FFmpeg. To repeat that day’s sequence continuously, use FFmpeg’s input looping option, -stream_loop -1. The concat demuxer reads files sequentially and adjusts timestamps between them; it does not implement weekday selection. See the FFmpeg concat demuxer documentation and FFmpeg command documentation.

As an Amazon Associate I earn from qualifying purchases.

Prepare the daily playlists and media

Create one playlist file for each day

Each list must begin with the exact header ffconcat version 1.0. Add one file directive for each video, in playback order:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ffconcat version 1.0
file 'media/monday-01.mp4'
file 'media/monday-02.mp4'

Save equivalent files for the other six weekdays. Use paths that resolve from the FFmpeg process’s working directory, or use absolute paths. The concat demuxer rejects unsafe paths by default. The example command below uses -safe 0 to allow paths that would otherwise be rejected; only use that option with playlist files and paths you trust.

#1 Best Overall
Sale
Roku Streaming Stick HD with Voice Remote | Compact 4K Streaming Device for TV with Roku Voice Remote & Long-Range Wi-Fi - Free & Live Local News, Sports
  • 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.

Check that files are compatible

For clean concat-demuxer playback, files within a playlist need matching streams, codecs, and compatible time bases. FFmpeg warns that inaccurate or missing duration information can cause gaps or artifacts. If your videos differ in resolution, frame rate, codecs, audio layout, or other stream characteristics, make normalized copies or use an explicit filter-and-transcode workflow instead of assuming stream-copy concatenation will work correctly. Review the format documentation for the demuxer’s requirements.

Select the playlist for the intended weekday

Choose the timezone that defines your editorial day. A server running in UTC may consider the day to have changed before or after the local day you intend to follow. Make the timezone explicit in your wrapper or operating-system scheduler, and have it map each weekday to its playlist. Weekday selection is your scheduling logic, not an FFmpeg concat feature.

Rank #2
Roku Ultra, Ultimate Streaming Player - 4K Streaming Device for TV | HDR10+, Dolby Vision & Atmos - Bluetooth & Wi-Fi 6 - Rechargeable Voice Remote Pro with Backlit Buttons - Free & Live TV
  • 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.

There are two practical launch patterns:

  • Persistent wrapper: The process starts once, selects the playlist for that launch day, and runs until stopped. If it continues past midnight, it will keep playing the playlist it selected at startup. Restart it at the schedule boundary if the next day’s playlist should begin then.
  • Operating-system scheduler: A scheduler starts or restarts the wrapper at the chosen time each day. This makes the switch point explicit, but configure restart behavior and timezone carefully so a missed or failed start does not leave the channel without a feed.

Start FFmpeg and send the feed to YouTube

Illustrative command

This is a starting pattern, not a validated universal command. Adapt the video and audio settings, endpoint syntax, and options to your media, installed FFmpeg build, resolution and frame rate, and YouTube’s current encoder settings.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ffmpeg -re -stream_loop -1 -f concat -safe 0 -i "$PLAYLIST" 
  -c:v libx264 -preset veryfast -b:v 4500k -maxrate 4500k -bufsize 9000k 
  -g 60 -c:a aac -b:a 128k -f flv "$YOUTUBE_RTMPS_URL/$STREAM_KEY"

Here, $PLAYLIST is the path selected by your weekday logic. -re reads the input at its native rate, and -stream_loop -1 requests infinite looping of that input. The example encodes with H.264 video and AAC audio; its bitrate and GOP values are examples, not universal targets. Match settings to the media and the applicable guidance in YouTube’s encoder settings documentation. Confirm the behavior with your actual files and FFmpeg version.

Rank #3
Sale
Roku Streaming Stick 4K with Voice Remote - HDR10+ & Dolby Vision | Compact 4K Streaming Device for TV with Roku Voice Remote & Long-Range Wi-Fi - Free & Live Local News, Sports
  • 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

Keep the stream key out of public files

Create or schedule the event in YouTube Studio’s Live Control Room, then enter the current stream URL and key in your encoder configuration. YouTube’s encoder workflow describes connecting the encoder and following the Live Control Room preview and Go live steps. Prefer the RTMPS URL when your FFmpeg build and connection support it; YouTube describes RTMPS as RTMP protected by TLS/SSL in its RTMPS instructions.

Treat the stream key like a password. Do not publish it in a script repository, paste it into a public log, or leave it in shell history. Store it in a protected environment or secret store. YouTube explains stream-key management in its stream settings documentation; reset the key in Live Control Room if it is exposed.

Rank #4
Amazon Fire TV Stick 4K Plus with AI-powered Fire TV Search, Wi-Fi 6, stream hundreds of thousands of movies and shows, free & live TV, find shows faster with Alexa+
  • 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.

Schedule the YouTube event separately

YouTube event scheduling and local playlist rotation are separate jobs. Scheduling an event can create an event page and let viewers request reminders, but it does not tell FFmpeg which local file to play. Your weekday wrapper or scheduler selects the media; YouTube receives the encoder feed. At the event time, connect the encoder and follow the prompts in Live Control Room. If you reuse stream settings, verify the event, metadata, and stream key before starting. The YouTube encoder workflow and stream settings help describe these steps.

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

Test the rotation before leaving it unattended

  1. Start with an unlisted or private event and confirm that the intended weekday selects the expected playlist.
  2. Watch the Live Control Room preview for video, audio, and continuity across at least one file boundary.
  3. Check that the sequence loops as intended and that timestamps do not produce visible gaps or artifacts.
  4. Test a process restart and confirm that the wrapper selects the right playlist for the current timezone and schedule.
  5. Monitor network stability and the event while testing. YouTube recommends testing and monitoring stream quality in its live streaming tips.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting common failures

FFmpeg rejects a playlist path

Check that the playlist’s working directory and relative paths are correct. By default, the concat demuxer rejects unsafe paths; use safe paths where possible. If you choose -safe 0, limit playlist contents to files you trust.

Best Value
Amazon Fire TV Stick 4K Select, start streaming in 4K, AI-powered search, and free & live TV, find shows faster with Alexa+
  • 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.

The stream breaks or glitches at a file boundary

Check that the files have matching streams and compatible codec and time-base characteristics. Review duration information as well: inaccurate or missing durations can lead to timestamp problems, gaps, or artifacts. Normalize incompatible sources or use a deliberate filter/transcode workflow rather than relying on direct concat.

The wrong day’s videos play

Inspect the timezone used by the wrapper or scheduler and compare it with the timezone that defines your publishing schedule. Also check whether the process was launched before midnight and kept running; a playlist selected at process start will not change just because the calendar day changes.

YouTube does not receive the encoder feed

Verify the current stream URL and key in Live Control Room, confirm the selected event, and check that the endpoint syntax matches the value YouTube supplied. Make sure your FFmpeg build and connection support the chosen RTMPS endpoint. If the key may have been exposed, reset it before reconnecting.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

Or let it run in the cloud

If you want the stream to keep running without leaving a computer on at home, StreamNeo is a cloud service for keeping a YouTube channel live from uploaded videos. Upload a recording or build a playlist, add your YouTube stream key, and go live. It can loop uploaded videos and playlists, with automatic recovery if YouTube drops the stream. Each slot supports the uploaded quality up to 4K 60fps at one flat price per slot, with no re-encoding or quality tiers. The first day is free with no card; the monthly option is $9.99 per month. StreamNeo plays uploaded videos rather than broadcasting from a camera. For a weekday-specific sequence, prepare the appropriate playlist for the stream you want to run. Start your free 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.

AutomationFFmpeglivestreamingvideo playlistsYouTube Live

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.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
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.