Skip to content
streamneo.
Setup Guides12 min read

How to Create a Playlist Manifest for a 24/7 Indian Music FFmpeg Stream

Build a sequential FFconcat playlist, use safe paths, and understand what extra work a 24/7 YouTube stream requires.

sn.
StreamNeoPublished 5 October 2026
Worth sharing?

For a simple sequential music playlist, put one source file per line in an FFconcat manifest and read it with FFmpeg’s concat demuxer. That gives you an ordered, finite input; it does not by itself create a supervised 24/7 YouTube service.

The distinction matters if you are preparing a bhajan, devotional, lofi, or local radio channel. The manifest tells FFmpeg what to read and in what order. Streaming output, reconnect behaviour, monitoring, and recovery are separate decisions, and should be tested on the machine and FFmpeg build you intend to use.

Decide whether FFconcat fits the playlist

FFconcat is useful when you have a known sequence of separate media files and want FFmpeg to read them as one virtual input. For example, a morning bhajan set might play an opening track, a sequence of songs, and a closing instrumental. The manifest stores that order in a plain text file, which is easy to inspect and revise.

The concat demuxer joins packet streams virtually rather than physically joining the source files. This can avoid re-encoding when the inputs have compatible stream layouts, codecs, and time bases. It is not a general-purpose fix for files with different technical properties. If sources differ, transitions can fail or need conversion before they can be treated as a compatible sequence.

FFmpeg documents three distinct concatenation approaches: the concat demuxer, concat filter, and concat protocol. The demuxer reads a list of compatible inputs; the filter joins media streams in a filtergraph and is useful when re-encoding or stream adjustments are needed; the protocol concatenates at file level where the formats support that. The FFmpeg FAQ on concatenation explains these alternatives. Choose based on your actual source files and whether you accept re-encoding, rather than assuming every playlist should use the same method.

Method Useful when Main consideration
Concat demuxer Files are compatible and should play sequentially A mismatch in streams or timing can create failures or awkward transitions
Concat filter You need to re-encode or normalise streams as they are joined Requires a filtergraph and more deliberate media handling
Concat protocol The container format supports direct file-level concatenation It is not interchangeable with a playlist of arbitrary files

An M3U8 file is not the same thing as this source manifest. FFconcat is an input instruction list for FFmpeg. HLS is a separate output packaging method that can create media segments and a client-facing playlist. If you later choose HLS delivery, that output stage does not replace the source manifest. The FFmpeg HLS documentation describes the muxer and its output options.

Create the FFconcat manifest

Create a text file in a stable location, for example playlist.ffconcat. A minimal manifest has the format header on its first line, followed by one file directive for each track:

ffconcat version 1.0
file '/srv/music/track-001.flac'
file '/srv/music/track-002.flac'
file '/srv/music/track-003.flac'

The header must be exactly ffconcat version 1.0 on the very first line. Do not add a blank line, comment, leading spaces, or a byte-order mark before it if you expect automatic format recognition. Save the file as ordinary text in an encoding that does not insert a byte-order mark.

Each file directive names a source file. In the example, the order is track 001, then 002, then 003. FFmpeg does not infer a preferred running order from the music or from tags; the lines you provide determine the sequence. For a recurring station, make the order intentional: decide whether you want albums kept together, devotional segments interspersed, or a short station ident between blocks.

You can maintain a generated list by scanning a controlled music directory and sorting filenames, but do not treat alphabetical order as a programming detail only. If files are named inconsistently, the resulting order may differ from your intended schedule. Preview the generated manifest as text, verify the first and last entries, and check that the spelling and extension on each line match the files that actually exist.

The format also supports directives such as duration, inpoint, and outpoint. They can be useful for specialised edits, but a basic playlist is easier to reason about when it contains only the header and file entries. Add timing directives only after you know the source timing and have tested the resulting transition; a duration override is not a substitute for checking a damaged or truncated file.

Use controlled file paths safely

The concat demuxer uses safe mode by default. In that mode, FFmpeg rejects path forms it considers unsafe, including paths outside its documented safe naming rules. The FFmpeg formats documentation describes the concat demuxer, its safe-path behaviour, and the accepted directives.

For a local playlist, the easiest safe approach is often to keep the manifest and tracks in a controlled directory and use relative paths with simple names, such as file 'track-001.flac'. Retain the default safe mode in that case. Avoid making the manifest depend on a particular mounted drive name or home-directory layout unless that is necessary for your deployment, since the same file may then fail on another host.

The illustrative command later in this article uses -safe 0 because its example contains absolute paths. That option allows paths that the default safe mode would reject. It is not a general remedy for a manifest loading problem, and it should not be applied to a manifest populated from uncontrolled filenames or user-supplied data. A line in the manifest is an instruction to open a path; if an attacker or an accidental import can influence those lines, FFmpeg may be directed to files you did not mean to include.

If you need absolute paths, build the manifest yourself from a known directory, validate each entry against that directory, and restrict who can change the manifest and source files. Review the final text before running it. Quoting and escaping also matter: filenames containing spaces or special characters must be represented correctly in FFconcat syntax. Prefer renaming a track to a predictable filename over improvising quoting rules on a production playlist.

Do not fix a rejected path by blindly adding -safe 0. First inspect the path and determine why the default rejects it. If the file is controlled and the path is necessary, make an explicit decision about whether to allow it. If the list can include arbitrary names or locations, keep safe mode and redesign how the list is generated.

Read the manifest with the concat demuxer

A basic invocation makes the input format explicit and maps the first audio stream:

ffmpeg -re -f concat -safe 0 -i playlist.ffconcat -map 0:a:0 -vn -c:a aac -b:a 128k output.aac

This is illustrative syntax, not a tested command or a complete streaming setup. It is included to show where the manifest is supplied: -f concat selects the concat demuxer, -i playlist.ffconcat names the input script, and -map 0:a:0 asks FFmpeg to use the first audio stream from that input. -vn excludes video, while the audio codec and bitrate options request an AAC audio output. The sample uses -safe 0 only to accommodate the absolute paths shown in the sample manifest; for relative paths that meet safe-mode rules, omit it.

The -re input option reads at a rate intended to approximate real time. It does not turn a finite manifest into an endless playlist, nor does it create a connection to YouTube. The output shown is a local file named output.aac. It will finish when the listed inputs finish, or fail sooner if an input cannot be read or decoded.

Before adapting the invocation, check the stream layout in your actual files. A music file may contain more than one stream, or may not contain the stream type the mapping requests. If the playlist includes video artwork or visualisers, this audio-only mapping deliberately leaves them out; a separate video source or generation stage would be needed for a visual live channel.

Understand what the sample command outputs

A manifest is finite because it contains a finite ordered list. FFmpeg reads the entries and moves on; it does not infer that the final track should be followed by the first. Reaching the end of the list is normal completion for the command, not a 24/7 fault that FFmpeg will automatically recover from.

There is also a timing dependency. The concat demuxer adjusts timestamps so later files follow earlier ones, relying on file durations. Incorrect duration metadata, truncated files, or inputs with unequal stream lengths can create gaps, overlaps, or transition artefacts. FFmpeg’s documentation notes that stream compatibility and duration information matter. If a transition is critical, listen to the hand-off in the actual local build rather than assuming that a successful start proves a clean overnight sequence.

For a short validation run, use a copied manifest with only a few tracks and write to a disposable output file. This checks whether FFmpeg can parse the header, open the paths, decode the inputs, and produce an output. It does not validate uninterrupted operation over a night, network delivery, YouTube ingest, or recovery after a process interruption.

A useful test set includes tracks with the same expected format, one track near a suspected boundary, and any file that previously caused a warning. Note the command line, FFmpeg version, and errors. If you change filenames, encoding, or the manifest generator later, repeat the test because a previously valid list may no longer describe the same inputs.

Add separate streaming output and supervision for 24/7 use

To make a 24/7 channel, you need more than a source list and local file output. You need a streaming output aimed at the platform’s ingest, plus a plan for what happens when the finite input reaches its end. One possible operational pattern is to have a scheduler start a new finite run from a regenerated list; another is to maintain an input-generation process that creates the next block. Neither pattern is supplied automatically by the manifest, and neither is universally preferable.

A continuous service also needs supervision: detect whether the process exits or stops producing useful output, record logs, check free storage, and decide how an operator or process manager should recover it. If the playlist is regenerated, validate it before the next run and preserve enough state to avoid accidentally repeating or skipping tracks. Test these choices on the target machine and under the same network and storage conditions you expect to use.

Direct streaming and HLS are separate output choices. With direct output, FFmpeg sends a stream to a destination such as a platform ingest. With HLS output, FFmpeg packages media into segments and a playlist that a client or distribution layer can serve. The HLS muxer creates output assets; it does not turn an input FFconcat script into an endless source. Do not confuse a generated .m3u8 output playlist with the .ffconcat list that names your original music files.

If you are weighing a local machine against a cloud-run approach, consider who will notice and repair a stopped process, what happens if the computer sleeps or loses power, and how you will recover after a network interruption. For a fixed video loop rather than a changing music library, the distinction between a finite file and a continuously looped programme is covered in whether a single MP4 can run all day on YouTube. For an FFmpeg workflow, the practical question is not only how to begin a broadcast but how its process remains alive after you disconnect, as described in keeping an OBS YouTube stream running after closing SSH.

When the ongoing burden is restarting a dropped broadcast while your own computer is off, StreamNeo removes that specific operational task by running an uploaded video as a YouTube live stream and monitoring and restarting it. It does not remove the need to prepare an appropriate media file, decide what should play, or make sure you have permission for the music.

For an Indian music channel, FFmpeg capability and YouTube ingest are not music rights. The research available for this article did not establish a definitive Indian licensing checklist. Before launch, verify permissions for the particular sound recordings and underlying compositions, the intended territory, platform, and mode of communication with rights holders or qualified counsel. Do not assume a consumer subscription permits rebroadcast, and do not treat a successful technical test as evidence of permission.

If your problem is silence rather than manifest parsing, first separate a source-file issue from a stream-output issue; troubleshooting silence on a 24/7 YouTube radio station offers a useful operational checklist. Keep the checks distinct: a readable manifest can still produce silence if the chosen stream mapping or downstream output is wrong.

Test and troubleshoot manifest loading

Start with the simplest question: does FFmpeg recognise the script as an FFconcat file? Confirm the exact header is the first line, with no leading whitespace or byte-order mark. If the header is malformed, automatic recognition may not happen; specifying -f concat makes the intended input format explicit, but it does not excuse an invalid script.

Next, verify paths one at a time. Check spelling, capitalisation, extension, and the working directory from which the command runs. Relative paths are resolved in relation to the process context, so a command launched by a scheduler may not have the same working directory as one typed in an interactive shell. An absolute path can make location explicit, but consider the safe-mode implications and keep the list controlled.

Then inspect each source file independently if a particular entry fails. A missing, unreadable, truncated, or undecodable track can stop or disrupt the run. Compare the file’s streams and codec with the rest of the playlist; if they differ, decide whether to normalise the source or use a workflow that handles re-encoding. Do not treat a warning about timestamps as harmless without listening to the affected transition.

Finally, distinguish input diagnostics from output diagnostics. A demuxer error points to the manifest or source media; a failure to write or deliver output may arise later in the command. Keep a short test output, the exact command, and the relevant log lines together so you can reproduce the issue. Change one thing at a time: header, path, media file, or output configuration.

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

How do I make an FFmpeg playlist manifest?

Save a plain text file whose first line is exactly ffconcat version 1.0, then add one file directive per source file in playback order. Use simple, controlled relative paths where possible, and test the list with the FFmpeg build you plan to use.

How do I loop a playlist 24/7 with FFmpeg?

A finite FFconcat list ends when its last entry ends; the manifest alone does not loop or supervise the stream. A continuous design needs a separate repeat or regeneration strategy, streaming output, process supervision, and monitoring, all tested together on the target system.

Is an FFconcat file the same as an M3U8 playlist?

No. An FFconcat file tells FFmpeg which source files to read as input. An M3U8 playlist can be generated as part of HLS output and points clients to media segments.

Can I use -safe 0 to fix a rejected path?

Only consider it for a manifest whose entries you control and have inspected. It relaxes path restrictions, so it is not appropriate for an uncontrolled list; first prefer safe relative paths and determine why the default mode rejected the entry.

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 ↗