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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Use seven FFconcat playlist files and a small wrapper script that selects one according to the weekday in your chosen timezone. FFmpeg’s concat demuxer plays the selected list in order; it does not choose a playlist based on the day. YouTube Live schedules the event and receives the encoder feed, while your local script decides which files to send.

How the weekday rotation works

Keep one playlist text file for each day, such as monday.ffconcat through sunday.ffconcat. At stream launch, a script reads the current weekday in the timezone that governs your schedule, selects the matching file, and starts FFmpeg. To keep that day’s sequence repeating, pass -stream_loop -1 for the playlist input. The concat demuxer reads listed files sequentially; the weekday selection is your script’s job, not an FFmpeg playlist feature. See the FFmpeg concat demuxer documentation and the FFmpeg command documentation.

Prepare the seven playlists

Create a playlist for each weekday

Each file must begin with the exact header ffconcat version 1.0. Put one file directive on each following line, in the order you want clips to play:

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 lists for the other six days, changing the filenames and sequence. Relative paths are resolved from the process’s working directory, so make that directory predictable when running through a service or scheduler. Absolute paths can also be used, but the concat demuxer’s safe-path rules apply.

#1 Best Overall
Sale
Roku Streaming Stick HD with Voice Remote
  • 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 compatibility before relying on stream copy

For clean concatenation, files in a list need matching stream layouts and compatible codec and time-base characteristics. The demuxer adjusts timestamps between files; missing or inaccurate duration information can cause gaps or artifacts. If your clips differ materially, make normalized copies or use an explicit filter-and-transcode workflow rather than assuming they will join cleanly. The format documentation describes these constraints.

Select a playlist using the intended timezone

Decide which timezone defines your editorial day, then make the scheduler use that timezone explicitly. A server set to UTC may otherwise switch playlists at a different local time than expected. This weekday mapping is operating-system or wrapper-script logic, not a setting in the concat demuxer.

For example, in a POSIX shell environment where date accepts the TZ environment variable, a wrapper can select a playlist like this:

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.
Rank #2
Sale
Roku Ultra, Ultimate Streaming Player - 4K Streaming Device for 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.
#!/bin/sh
set -eu

# Use the timezone that defines your publishing schedule.
TZ=America/New_York
export TZ

day=$(date +%A | tr '[:upper:]' '[:lower:]')
PLAYLIST="/srv/channel/playlists/${day}.ffconcat"

if [ ! -f "$PLAYLIST" ]; then
  echo "Playlist not found: $PLAYLIST" >&2
  exit 1
fi

exec 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"

This is a pattern, not a universal, tested command. Confirm the syntax supported by your shell, operating system, FFmpeg build, media, and current YouTube settings. In particular, use the actual ingest URL format shown for your event; do not assume every account or endpoint uses identical URL syntax.

Understand the example output settings

The example encodes video with H.264 through libx264, uses a 4,500 kbit/s target and maximum rate, sets a 9,000 kbit buffer, uses AAC audio at 128 kbit/s, and sets -g 60 for the encoder’s GOP/keyframe interval. These are illustrative values only, not a claim that they fit every resolution, frame rate, connection, or event. Set output resolution, frame rate, bitrate, codec, and keyframe behavior to match your source and YouTube’s current encoder settings guidance. The command transcodes; it is not a stream-copy example.

-re reads input at native rate, which is appropriate for file-based live output in this pattern. -stream_loop -1 asks FFmpeg to repeat the input indefinitely. The options’ exact behavior and placement should be checked against the installed version’s documentation.

Rank #3
Sale
Roku Streaming Stick 4K with Voice Remote - HDR10+ & Dolby Vision
  • 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

Choose how the process starts and restarts

A persistent wrapper chooses the day when it launches and continues that playlist until stopped. If you need a switch at midnight, a scheduler must stop the current FFmpeg process and start it again after the day changes; the already-running concat input does not re-evaluate the weekday. Alternatively, schedule a daily restart at a chosen time and have the wrapper select the new playlist at each launch. In either design, define what should happen after a crash or machine reboot and monitor whether the process and YouTube event reconnect as intended.

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

Connect FFmpeg to YouTube Live

  1. Create or schedule the event: In YouTube Studio, open Live Control Room and create or schedule the live stream. Scheduling can create an event page where viewers may request reminders; it does not choose your local playlist.
  2. Get the current encoder credentials: Copy the stream URL and stream key shown for the selected event. YouTube’s encoder workflow explains that the encoder needs these values.
  3. Prefer RTMPS where supported: Use the RTMPS URL supplied by YouTube if your FFmpeg build and connection support it. YouTube describes RTMPS as RTMP protected with TLS/SSL and provides instructions for encrypting the stream.
  4. Protect the key: Treat it as a password. Do not commit it to a public script, paste it into shared logs, or leave it in shell history. Supply it via a protected environment or secret store. If it is exposed, reset it in Live Control Room; YouTube’s stream settings guide explains stream-key management.
  5. Start and verify: Run the wrapper, confirm the expected playlist is selected, then check the event preview and follow Live Control Room’s start/go-live prompts. Reused event settings can carry metadata, settings, and a stream key, so verify the event and credential before launching.

Test the rotation before automating it

Use an unlisted or private event while validating your setup. Confirm the weekday-to-file mapping, clip order, audio/video continuity, and behavior at playlist boundaries. Let the stream run long enough to observe a loop, inspect YouTube’s preview and stream-health indicators, then test a deliberate process restart. YouTube recommends testing and monitoring stream quality in its live streaming tips.

  • Check that all seven filenames exist and are readable by the account running FFmpeg.
  • Verify the wrapper’s timezone and test near the intended day-change boundary.
  • Check for gaps, black frames, audio discontinuities, or timestamp problems where clips join.
  • Confirm the scheduler restarts the stream after a reboot or process failure if unattended operation is required.
  • Confirm the YouTube event is available and the right stream key is active before switching to a public event.

Common problems and fixes

The wrong day’s playlist starts

The host timezone may differ from the editorial timezone, or the wrapper may calculate the day only once at launch. Set the intended timezone explicitly and decide whether a midnight restart is required; an active FFmpeg process will not switch lists by itself.

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.

FFmpeg rejects paths in the playlist

Check that paths are valid relative to the process’s working directory and that the service account can read them. The concat demuxer rejects unsafe paths by default. The example uses -safe 0 to permit broader path forms; use it only when playlist contents are trusted, since it relaxes that restriction. See the concat demuxer path rules.

Clips do not join cleanly

Inspect the clips for differences in streams, codecs, time bases, or duration metadata. Matching files or normalized copies are safer for concat-demuxer playback; use a deliberate filter/transcode pipeline if the sources differ.

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

YouTube does not receive a stream

Confirm that the event is the one you intended, the current stream URL and key are correct, the key has not been reset, and the endpoint syntax matches YouTube’s displayed settings. Check that the FFmpeg build supports the selected transport, including RTMPS if used, and inspect FFmpeg’s error output without exposing the key.

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 feed drops or does not resume after a restart

Check network stability, process supervision, scheduler logs, and Live Control Room status. Test recovery rather than assuming an unattended process will restart correctly; YouTube recommends monitoring stream quality and event availability.

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

Or let it run in the cloud

If the goal is a 24/7 YouTube channel built from uploaded videos, StreamNeo is a managed alternative to keeping this FFmpeg setup running on your own machine. Upload a recording or build a playlist, add your YouTube stream key once, and go live; StreamNeo loops the uploaded video from the cloud, so nothing has to stay on at home. It streams your upload as made, up to 4K 60fps, at one 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. StreamNeo streams to YouTube only and plays uploaded videos rather than going live from a camera. See StreamNeo, then start the free first day.

Cost and operational trade-offs

The FFmpeg method uses software and infrastructure you arrange and operate; its costs depend on the machine, storage, power, network, and any hosting you choose. It gives you direct control over weekday selection and process behavior, but you are responsible for testing and recovery. YouTube says expensive equipment is not necessary to get started in its live streaming tips. A managed cloud service trades that hands-on control for a hosted workflow; compare the ongoing cost with the value of not keeping your own computer and connection running.

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

Quick Recap

SaleBestseller No. 1
SaleBestseller No. 2
Roku Ultra, Ultimate Streaming Player - 4K Streaming Device for TV
Roku Ultra, Ultimate Streaming Player - 4K Streaming Device for TV
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.
$99.00
Bestseller No. 5
Amazon Fire TV Stick 4K Select, start streaming in 4K, AI-powered search, and free & live TV, find shows faster with Alexa+
Amazon Fire TV Stick 4K Select, start streaming in 4K, AI-powered search, and free & live TV, find shows faster with Alexa+
Getting set up is easy – Plug in and connect to Wi-Fi for smooth streaming.
$49.99

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.