Skip to content
streamneo.
Tools12 min read

How to Use a Playlist File to Rotate Aarti Videos in FFmpeg

Build an ordered FFmpeg concat playlist for aarti videos, understand its finite output, and check compatibility before joining clips.

sn.
StreamNeoPublished 4 October 2026
Worth sharing?

“Rotate” can mean joining aarti videos into one file, repeating a fixed sequence, or changing what plays while a stream is already running. FFmpeg’s concat demuxer handles the first task: it reads an ordered playlist and produces a finite sequence; the basic command below does not loop forever or manage a live-changing playlist.

For compatible files, create a text playlist, then run FFmpeg with the concat demuxer and an output container that supports the streams. The important distinction is between listing clips in order and creating a repeating broadcast: those are different jobs, and this guide does not present concatenation as a 24/7 streaming recipe.

Decide what “rotate” means

Before writing a playlist, decide what result you want. If you want one file that plays a morning aarti, an evening aarti, then a special programme, the concat demuxer is a useful fit when the files have compatible streams. If you mean “play the same set repeatedly”, a finite concat command is not enough by itself. If you mean “edit the list while playback continues”, that is another requirement, and the documented sequential playlist mechanism should not be treated as proof that a running process will notice changes.

This distinction matters because the word “playlist” covers several behaviours in media software. Here it means an FFmpeg concat script: a text file whose entries name source files in the order they should be read. The demuxer presents their packets as one sequence. Its scope is joining the listed material, not scheduling a live channel, choosing the next item dynamically, or repeating a list indefinitely.

For a one-time combined file, think in terms of a finite programme. If your list contains three clips, the output represents those clips in sequence, subject to their media durations and compatibility. A separate player or broadcast workflow would be needed to repeat or transmit that result, and the exact design depends on how you intend to run the channel.

This is similar to the distinction between preparing a playlist and operating a live stream. If you are deciding whether a laptop is a suitable host for continuous playback, the guide to streaming podcast episodes from a laptop in India deals with a different part of that workflow. For the concat task here, first make sure the sequence itself is sound.

Create an ordered concat playlist file

Make a plain text file, for example playlist.txt, in the directory where you plan to run FFmpeg. Put one file directive on each line, with the path to an input clip after it. The order of those lines is the playback order in the resulting finite sequence.

file 'aarti-morning.mp4'
file 'aarti-evening.mp4'
file 'aarti-special.mp4'

Use names that actually match the files on your system. The example assumes the files and playlist are in the same directory. You can use relative paths from the working directory, or path names appropriate to your setup; the key is that FFmpeg must be able to open every referenced file. Keep a copy of the playlist with the source videos if you will move the job to another computer, because relative names are resolved in relation to where FFmpeg is run.

The concat script format also permits an optional first-line marker, ffconcat version 1.0. If you use it, the marker must begin the first line exactly, with no leading whitespace or byte-order mark. The marker is not required for the example above because -f concat explicitly tells FFmpeg which demuxer to use. For a simple playlist, fewer moving parts can make path errors easier to spot.

Paths containing spaces or special characters need care. Quoting a path in the playlist is not a universal shell-quoting exercise: the playlist is interpreted by FFmpeg’s concat script parser, not by the command shell. Follow the concat-demuxer path escaping rules in the FFmpeg manual, and test with a small list before preparing a long sequence. Simple file names such as aarti-morning.mp4 reduce avoidable quoting mistakes.

The demuxer’s safe setting defaults to 1. In broad terms, that accepts straightforward relative paths made from portable characters, while rejecting unsafe path forms and directives. An absolute path or a path with unusual characters may therefore fail under the default. The option -safe 0 relaxes that check and permits any file name, so use it only with a playlist you trust and understand; it is not a general fix for a misspelt path or missing file.

Run a basic finite concat command

With compatible inputs, a basic command is:

ffmpeg -f concat -i playlist.txt -c copy output.mp4

Read it from left to right. ffmpeg starts the program. -f concat selects the concat demuxer for the next input. -i playlist.txt identifies the playlist script as that input. -c copy asks FFmpeg to copy the selected streams rather than decode and re-encode them. output.mp4 is the destination file name and its extension indicates the intended container.

The output is finite. FFmpeg processes the entries in the script sequentially and then finishes the file. Nothing in this command says “repeat”, “keep watching for changes”, or “send this to YouTube”. If your use of “rotate” means a channel that returns to the first aarti after the last one, do not assume that this command accomplishes it. It produces a joined file for the specified sequence.

Choose an output name that does not accidentally overwrite a valuable source. If FFmpeg asks whether to overwrite an existing destination, consider whether you intend to replace it; you can choose a new name such as aarti-sequence-test.mp4 while checking the result. The command is a documentation-based example, not a report that it has been run against your files.

The -c copy choice is valuable when it works because it avoids a generation step that changes the encoded audio and video. It is also conditional: it does not reconcile different codecs, time bases, or stream layouts. If you are assembling a playlist for YouTube rather than simply preparing the media file, the Kannada bhajan OBS settings guide is about a separate broadcast configuration, not a substitute for validating the joined file.

Understand stream copying and compatible inputs

The concat demuxer does not behave like a full editor that normalises every clip. It treats the listed media packets as a virtual sequence, placing one file after another. For that to work as intended, the files need the same streams, including compatible codecs and time bases. Differences in resolution, frame rate, audio channel layout, or the presence of an audio stream in only some files are reasons to inspect the inputs rather than assume a stream copy will join cleanly.

A practical example: three MP4 files may all have the same extension while containing different video codecs or audio layouts. An extension describes the container, not the full set of encoded streams inside it. Two clips can both be called .mp4 and still be unsuitable for direct concat-demuxer stream copying. Conversely, matching extensions alone do not prove that the streams and timing parameters match.

Use ffprobe or FFmpeg’s input inspection output to compare each source before a larger job. Note whether each has video and audio, which codecs they use, and whether the stream time bases are compatible. You do not need to change anything merely because one file has a different name or duration; the compatibility question concerns the streams and how timestamps line up. If a clip does not open, resolve that separately before trying to concatenate it.

The choice between the demuxer and the concat filter is about how the inputs can be joined. The demuxer is appropriate for a script-based ordered list when its input stream requirements are met and you want to avoid re-encoding. FFmpeg’s concat FAQ points to the concat filter when re-encoding is needed. The filter is a different operation and should not be described as a setting that makes the demuxer repair arbitrary mismatches.

Approach Suitable when Re-encoding Main consideration
Concat demuxer Inputs have matching streams and you want an ordered text list Usually not requested with -c copy Check codecs, stream layout, time bases and durations
Concat filter The clips need processing to join correctly Often used when re-encoding is required Requires a filter-based command tailored to the inputs

A filter command is not included here because the right filter graph depends on the source clips and the intended output. If the demuxer rejects a set of aarti files, do not keep changing unrelated flags until it happens to run. First find what differs, then decide whether to prepare compatible source files or build a filter workflow that explicitly handles those differences.

Place input and output options correctly

FFmpeg command-line options generally apply to the next input or output. That makes option order meaningful. In the example, -f concat appears before -i playlist.txt because it describes how to read that input. The input is then followed by -c copy and the output name, so the codec choice applies to the output being written.

This is why moving -f concat after the input can change what it applies to rather than simply making the command look different. Likewise, a format or codec option placed before an input may be interpreted as an input option. When a command has several inputs and outputs, keep each option close to the file it is intended to govern. The FFmpeg command-line documentation explains this option scope and is the primary reference when a more complex invocation is needed.

For this basic job, the pattern is easy to remember: input-specific demuxer choice, then -i and the playlist, then output-specific codec handling, then the destination. If you add -safe 0 to handle trusted absolute paths, place it with the concat input options before the relevant -i, for example:

ffmpeg -f concat -safe 0 -i playlist.txt -c copy output.mp4

That example changes path acceptance only. It does not make incompatible streams compatible, correct duration metadata, or turn the finite output into a loop. It also relaxes a safety check, so do not paste the option into a command without understanding why the normal path form was rejected.

Check container compatibility and test the result

The destination extension is not cosmetic. A container packages encoded streams, and not every container can hold every possible stream combination. The example uses output.mp4 as a conventional target when the inputs’ streams are supported by MP4. If the sources contain streams the chosen container cannot carry, choose a suitable container or transcode to compatible codecs as part of a separately designed command.

Before processing the whole playlist, inspect the source properties and try a short representative sequence. Open the result in a player and check that each clip appears in the expected order, that the audio is present, and that transitions do not show an unexpected gap, freeze, or timestamp jump. A file that FFmpeg creates is not automatically a file that matches your intended presentation.

Duration metadata deserves particular attention. The demuxer uses each file’s duration to place the timestamps of the following file. If stored duration information is wrong, timestamps may be offset and the result can show artefacts. The concat script supports a duration directive to override the stored duration for a file. That is a targeted correction, not a value to guess: use a duration only when you have established what the relevant file duration should be.

If you provide durations for every file, the demuxer can support seeking across the concatenated output. For a straightforward sequential output, the first priority is reliable durations and correctly ordered entries. Do not add duration lines just because the files have different lengths; the demuxer already reads file durations, and manual values that do not match the media can make timing worse.

When something fails, narrow it down in a consistent order. Check that the playlist file is in the location named by -i; verify the spelling and quoting of each file path; then confirm that FFmpeg can open each source individually. Compare stream details and time bases next, and examine durations if the clips open but the sequence has timing artefacts. This is more useful than treating every error as a problem with the output extension.

If the playlist depends on absolute paths, special characters, or files on a removable drive, test from the actual working directory and account for the path-safety setting. The FFmpeg concat-demuxer documentation describes the script directives and safety rules. FFmpeg’s live manual is regenerated, and a locally installed version can differ from the current online manual, so check ffmpeg -version and its corresponding documentation when behaviour or accepted options do not match the example.

For a continuous YouTube channel, file preparation is only one piece of the operation. You still need a playback and broadcast process, a connection that can sustain it, and a plan for what happens if that process stops. The practical issues of unattended operation are different from whether a finite concat output is correct; the guide to diagnosing frame drops on an Indian broadband connection addresses one of those separate concerns.

When your requirement is specifically to avoid leaving a personal computer running just to keep an uploaded file broadcasting, StreamNeo removes that particular operational burden: after you upload the video and provide your YouTube stream key, your own computer can be switched off while the broadcast runs. It is YouTube-only and does not change what an FFmpeg concat playlist means or resolve media-compatibility issues in files you prepare.

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 repeat the aarti videos forever?

No. The command shown reads the listed files in order and writes a finite output. A repeatable or live-updating rotation is a different requirement; do not treat the concat demuxer example as an infinite-loop recipe.

Can I use videos with different codecs in the same playlist?

The concat demuxer expects matching streams, including codecs and time bases, so different codecs can prevent a clean stream-copy join. Inspect the files first; if joining requires re-encoding, FFmpeg’s FAQ describes the concat filter as the relevant alternative.

Why might a playlist with full paths be rejected?

The concat demuxer’s safe setting defaults to 1 and rejects some unsafe path forms. If the playlist is trusted and full or unusual paths are necessary, -safe 0 relaxes that check, but it should not be used as a blind fix for missing files or incorrect names.

What if the clips appear to skip, freeze or start at the wrong time?

Check the order and paths, then compare the stream layouts and time bases. Incorrect duration metadata can also affect timestamps for following files; use a duration directive only when you have established a correct value, and test the output rather than assuming the command worked on your material.

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 Tools guides ↗ · All topics ↗