Skip to content
streamneo.
Setup Guides11 min read

How to Use a Playlist File to Schedule Videos in an FFmpeg YouTube Stream

Build an ordered FFmpeg playlist, repeat it if needed, and schedule and monitor the YouTube broadcast separately.

sn.
StreamNeoPublished 4 October 2026
Worth sharing?

An FFmpeg playlist file can set the order in which videos play in a YouTube live stream. It cannot set a calendar start time: you create or schedule the broadcast separately in YouTube Live Control Room, then send FFmpeg’s output to it.

The practical job is more than writing three filenames into a text file. You also need to check that the media can be read in sequence, that the encoder settings suit your connection and YouTube’s current guidance, and that you can see whether the stream is healthy after it starts.

Playlist order is not broadcast scheduling

FFmpeg’s concat demuxer reads a text script and presents the listed files as one input in the order they appear. If your file names morning-prayer.mp4, bhajan-set.mp4, and closing-mantra.mp4 in that order, FFmpeg processes them in that order. The list does not tell YouTube what date or time to go live, nor does it create the event metadata viewers see.

Keep three separate jobs in mind:

Job What controls it What it means
Playback order The concat playlist file Which file FFmpeg reads first, second, and next
Repetition FFmpeg’s input loop option Whether the ordered list starts again after it finishes
Broadcast scheduling YouTube Live Control Room The YouTube event, its planned start, and the go-live flow

This distinction matters when you are preparing a devotional channel for a morning programme, or a study stream for a long session. An ordered playlist can give you a dependable sequence to test; it does not guarantee that YouTube will start the broadcast at the intended time. Use the scheduled-stream controls in YouTube Studio for that part, and check their current flow before relying on it for an event.

If your goal is specifically to run a repeating Hindi playlist, the guide to keeping a Hindi playlist looping on YouTube offers another workflow to consider. The relevant question is not which approach sounds simpler, but which one you can prepare and monitor reliably with your files and equipment.

Prepare the ordered concat file

Create a plain text file in the same working folder as the video files, or use paths that point to where the files actually live. For automatic recognition, the first line must be exactly ffconcat version 1.0; do not put a blank line, comment, or byte-order mark before it. Save the file with a name such as playlist.ffconcat.

A basic example looks like this:

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

Each file line is an entry, and their position sets playback order. You can make the names more descriptive, such as opening.mp4, talk.mp4, and chanting.mp4; what matters is that each entry resolves to the intended file. If you edit the order, save the text file and verify it again before you start FFmpeg.

Paths with spaces or special characters deserve extra care. Quoting with single quotes works for common names, but a literal apostrophe in a filename needs escaping according to FFmpeg’s file-list syntax. A path like morning set.mp4 should not be pasted unquoted as if the space were harmless. When possible, use simple filenames without punctuation, which makes the playlist easier to inspect and reduces avoidable quoting errors.

By default the concat demuxer restricts paths to a safe form. That can reject absolute paths or paths that move outside the expected directory. Do not disable that restriction just to make an error disappear. If you use -safe 0, use it only with a playlist you have created and trust; it permits path forms the default safety check would reject. Keep the playlist and its media in a controlled folder, especially on a shared computer.

Check paths and media compatibility

Before connecting to YouTube, check every listed path and test that each file opens. A typo in the fourth line may not appear until FFmpeg reaches that entry, long after the stream has begun. A short local test, reading the list from top to bottom, is a better way to discover a missing file than waiting for a live audience to encounter it.

The concat demuxer is for inputs with compatible stream properties. FFmpeg’s documentation says the files need the same streams, including matching codecs and time bases. In practical terms, compare video and audio stream layout, codec, dimensions, frame rate, and timing rather than assuming that files ending in .mp4 are alike. Differences can cause a failure, a gap, or an audible or visible change at a transition. Do not treat the demuxer as a tool that automatically repairs inconsistent media.

You can inspect files with FFmpeg’s ffprobe utility if it is available in your installation. Compare the stream details from each file, then play the transitions locally. If one clip has no audio while another has stereo audio, or the files were exported with different properties, decide how you want to handle that before going live. Exact commands for inspecting media vary by platform and build, so check the documentation for the tools installed on your computer.

When clips do not match, normalising them to a common format before building the playlist is often the simpler operational choice. If you need different processing for each input or must re-encode them as part of assembly, FFmpeg’s concat filter is more appropriate, though it adds encoding configuration and processing load. The FFmpeg concat documentation describes the demuxer’s requirements and the filter approach. Accurate duration information matters too: timestamp adjustment can leave gaps when durations are inaccurate. Test the actual files and transitions; no playlist format guarantees seamless playback.

Run the list through FFmpeg

Once paths and media are checked, the basic idea is to give FFmpeg the concat demuxer input and an output destination that YouTube has provided for your stream. The command below is a template, not a universal copy-and-paste recipe:

ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.ffconcat \
  -c:v libx264 -preset veryfast -b:v <video-bitrate> -maxrate <video-bitrate> \
  -bufsize <buffer-size> -g <keyframe-interval> \
  -c:a aac -b:a 128k -ar 44100 \
  -f flv 'rtmps://<youtube-ingest>/<stream-key>'

Replace the placeholders with settings appropriate to your media, FFmpeg build, and YouTube stream. Check that your build includes the selected encoders; available names and capabilities vary. The ingest destination and stream key come from Live Control Room and are specific to your stream. Treat the key like a password: do not post it, include it in a screenshot, or leave it in a script that others can read.

The -re option reads the input at its intended rate rather than consuming prerecorded files as fast as the computer can process them. The concat options describe the input, and -stream_loop -1 is placed before that input so the list repeats. Video and audio codec options describe the encoded output, while -f flv is used for the ingest output in this template. Option placement matters in FFmpeg because options generally apply to the next input or output they precede; consult the FFmpeg command-line documentation if adapting the structure.

For already matching files, stream-copy may avoid re-encoding, but it is not automatically suitable for a live ingest or a mixed set of media. Encoding gives you control over output properties, at the cost of CPU use and additional settings to check. Choose after checking what the files contain and what YouTube currently asks the encoder to send. For a small business or a home channel, a command that your installed build supports and that you have tested is more useful than a more elaborate command copied without verification.

Repeat the playlist without confusing it with a schedule

The -stream_loop -1 option tells FFmpeg to loop the input indefinitely. Put it before -i playlist.ffconcat, as in the template above. Once FFmpeg reaches the end of the ordered list, it starts the input again; that is repeat playback, not a YouTube broadcast schedule.

This is useful for a channel that wants the same collection to continue, such as an ambience station cycling through a prepared set. It also means the list will keep repeating until you stop the encoder or it fails. If the intended output is a finite event, an indefinite loop may be the wrong choice. Consider what should happen after the final file: should the broadcast end, should a holding image play, or should the sequence restart? Decide that operationally before starting.

A repeated list will only be as stable as its inputs and the process running it. Review the first-to-last transition as well as the transitions between files. If the last item has a different audio level or frame size from the first, the loop boundary can be more noticeable than an ordinary transition. For practical advice on diagnosing a stream that stalls or buffers, see what to check when a 24/7 ambient live stream keeps buffering.

Do not confuse changing the playlist with changing the broadcast. Editing a file while FFmpeg is already running does not necessarily replace the input sequence already being read. Plan a controlled stop and restart, or another tested handover method, if you need to update content. The clean-stop guide for replacing a YouTube loop playlist is relevant when the update itself needs to avoid a confusing on-air interruption.

Create or schedule the YouTube broadcast

In YouTube Studio, create a live stream or schedule one in Live Control Room. Follow the current interface to obtain the stream URL and key, then put the destination into your FFmpeg command without exposing the key. YouTube’s encoder setup guidance covers connecting an encoder; the precise control labels can change, so use the current page and dashboard rather than relying on an old screenshot.

For a scheduled event, the encoder feed and the YouTube event are distinct. Start FFmpeg so the incoming feed reaches the event, check that the preview shows the expected video and audio, and follow the Control Room’s go-live flow when you are ready. Starting the command does not by itself mean viewers can see a public live broadcast. Likewise, having a scheduled event on the calendar does not make an offline playlist start automatically.

Before the planned start, verify the event’s visibility, title, and intended audience settings in YouTube Studio. Confirm that you are using the correct key for that event, particularly if you manage more than one channel or stream. Keep a written, private record of which playlist and destination belong to which broadcast, but do not store the key in a place where a collaborator or public repository can expose it.

If your production depends on keeping the same programme running after a local computer is turned off, a hosted workflow can remove the burden of keeping that machine on and manually restarting a dropped feed. StreamNeo is designed for the specific case of sending an uploaded video as a YouTube live stream without keeping your own computer running; it does not replace the need to prepare the files and check the YouTube event.

Monitor playback and stream health

A command that starts without an immediate error is not proof that the stream will remain healthy overnight. Watch FFmpeg’s output for input errors, encoder failures, or a process that has stopped advancing. In Live Control Room, confirm that the incoming preview has both sound and picture, then check the stream-health indicators before the audience arrives. YouTube’s live encoder settings guidance recommends testing before a stream.

Test the whole sequence, not only the opening clip. A short run that reaches the second or third file can expose path, codec, or timing problems, while a longer rehearsal can show whether the loop boundary behaves as expected. Listen on headphones for missing audio and sudden level changes. Check that the intended order is visible in the actual output; a technically live feed can still be the wrong programme.

YouTube’s current guidance recommends constant bitrate and a two-second keyframe frequency, and says not to exceed four seconds. Select a bitrate for the resolution and frame rate you are sending and for a reliable upload connection, rather than the highest setting the encoder offers. YouTube also recommends upload bandwidth headroom of 20 per cent. These are YouTube’s recommendations, not a guarantee that a particular connection will be stable; test from the location and connection you plan to use and check the live guidance for current settings.

Have a response plan for a drop. Decide who will notice an alert, where the stream key can be retrieved securely, how to restart the encoder, and how to confirm that the feed returns to the right event. If you are streaming from a PC, prevent automatic sleep and account for power and network interruptions. If the goal is genuinely always-on, make sure your chosen operating arrangement includes a way to notice a failure rather than assuming a loop command will recover every problem.

Before committing, compare the operating options on the pricing page. When the file and channel are ready, start free — 24-hour trial, no card.

FAQ

Does the concat playlist schedule a YouTube livestream?

No. It defines the order in which FFmpeg reads files. Create or schedule the event in YouTube Live Control Room, then connect the encoder feed and use the dashboard’s go-live flow.

How do I make the playlist repeat indefinitely?

Place -stream_loop -1 before the playlist input, for example before -i playlist.ffconcat. This repeats the FFmpeg input; it does not schedule, start, or end the YouTube broadcast.

Can I use any MP4 files in the same concat list?

Not safely by extension alone. Check that the files have compatible stream properties, including codecs and timing, and test the transitions. If they need different processing, normalise them first or consider the concat filter with re-encoding.

Is the example command guaranteed to work on my computer?

No. The correct command depends on your FFmpeg build, file properties, operating system, encoder availability, and YouTube’s current ingest settings. Treat it as a structure to adapt, then test the complete stream and preview before relying on it.

YOU’VE REACHED THE END

Keep the ideas coming.

More guides, useful tools and a little help for your next broadcast.

Back to the journal ↗
YOUR NEXT READ

A little more to explore.

More Setup Guides guides ↗ · All topics ↗