Skip to content
streamneo.
Setup Guides13 min read

How to Configure an FFmpeg Playlist for a Nonstop Indian Music YouTube Channel

Build and validate an FFmpeg concat playlist, check file compatibility, and test YouTube Live ingest before running a continuous music channel.

sn.
StreamNeoPublished 4 October 2026
Worth sharing?

A nonstop Indian music stream can use FFmpeg’s concat demuxer to read a text playlist and present compatible files as one continuous input. The playlist itself is simple; the important work is checking rights, matching the files’ streams and timing, and testing the outgoing YouTube signal before relying on it overnight.

There is no single command that suits every collection. Files may differ in codecs, stream layout, frame rate, or duration metadata, and YouTube’s ingest settings depend on the output profile you choose. Treat each example below as a starting point to validate against your own files and current YouTube guidance.

Check rights for music and visuals first

A playlist only determines what FFmpeg reads and in what order. It does not grant permission to broadcast the recordings, compositions, performances, album artwork, music videos, or any other visuals. Before building a long-running channel, check that your permissions cover live transmission on YouTube, the countries where you intend to make the stream available, and any replay or archive YouTube creates from the broadcast.

This matters for Indian music because a collection may include several different rights holders: a label or recording owner, composers and lyricists, performers, and a video producer. Permission to play a song privately or to upload a one-off video does not necessarily cover continuous livestreaming or a replay. Keep the relevant licence or written permission with the files, and confirm the permitted uses and territory with the rights holder rather than inferring them from the file source.

Check visuals separately. A static image, lyric video, album cover, or music video may have rights and conditions distinct from the audio. If a track is permitted but its accompanying video is not, use a visual you are authorised to broadcast. The technical sources explain how FFmpeg handles media; they do not establish the rights for any particular catalogue or Indian licence.

For a channel that uses rain or other background audio between songs, the separate question of permission still applies; the discussion of royalty-free rain sounds in a YouTube Live loop is a useful reminder to check the actual licence terms. Do not treat a “royalty-free” label as automatic permission for every platform, territory, or use.

Inspect the files before writing the playlist

Make a working folder for the media you have permission to use, then inspect each file rather than assuming that files with the same .mp4 extension are technically alike. A media probe can report the streams, codecs, dimensions, frame rate, sample rate, channel layout, time base, and duration. The FFmpeg project’s documentation for its media tools describes the relevant probing and concat-demuxer behaviour.

Record at least the following for every item you intend to concatenate:

Check What to note Why it matters
Stream layout Whether the file has audio, video, or both, and the number and order of streams The concat demuxer expects corresponding streams across files
Audio Codec, sample rate, channel layout, and time base Mismatched audio streams can prevent direct concatenation or cause problems downstream
Video Codec, dimensions, frame rate, and time base Different video properties can make packet-level concatenation unsuitable
Duration Reported duration and whether the file plays to the expected end Bad duration information can produce timestamp gaps or overlaps
Container The file format and any unusual metadata Similar extensions do not prove compatible streams

For example, two MP4 music videos may both contain H.264 video and AAC audio yet differ in frame rate, audio layout, or time base. A third file may be audio-only. The filenames do not expose those distinctions, and a playlist that combines them without testing can fail at a transition or produce an output YouTube cannot accept.

Listen and watch through the start and end of each item as well. Check that the file is not truncated, that the intended song ends where you expect, and that there is no long black frame or silent tail you did not plan for. A duration estimate can be misleading, particularly if the media is damaged or metadata is incomplete. Note any item that needs a duration override or a normalised copy before it joins the playlist.

If the channel is audio-led and all source files share a compatible audio layout, a dedicated audio workflow may be a better fit than carrying music videos through the pipeline. The guide to sending Liquidsoap audio to a YouTube radio livestream covers that adjacent approach; it does not remove the need to check stream output and rights.

Write a concat-demuxer text playlist

Create a plain text file, for example playlist.ffconcat, with one file directive for each item in the order you want it played. A minimal illustrative list looks like this:

file 'music/track-01.mp4'
file 'music/track-02.mp4'
file 'music/track-03.mp4'

These paths are examples, not a tested playlist for your machine or media. Paths are interpreted relative to the process’s working directory when relative paths are used, so check that FFmpeg will start from the directory you expect. If a filename contains spaces or special characters, quote or escape it according to the concat file syntax, then validate the list with your exact FFmpeg build.

You may include the automatic-detection header, but it must be exactly ffconcat version 1.0 on the first line, with no leading spaces or byte-order mark. If you save the file with an editor that silently adds a byte-order mark, automatic detection can fail. A plain-text editor and a quick inspection of the first bytes avoid an avoidable parsing problem.

By default, the concat demuxer applies a safe-path check. It rejects certain paths it considers unsafe, including absolute paths and protocol-like paths. Disabling that check with -safe 0 broadens the accepted paths, but it also means the playlist can refer to any filename the process can access. Do not add that option reflexively: prefer simple relative paths in a controlled media directory, and only loosen the check when you understand and trust every entry.

The demuxer adjusts timestamps so the first file starts at zero and subsequent files follow the preceding file’s duration. If a file reports a duration that is wrong or unavailable, the calculated transition can be wrong too. The documented per-file duration directive can override a duration when you have verified the correct value; it is not a substitute for checking the media. The FFmpeg concat-demuxer documentation describes the list syntax, safe-path behaviour, and timing caveats.

Before adding the full collection, make a short playlist with a few representative tracks: one typical file, one file with a different source or encoding, and any item you already suspect has an unusual duration. This lets you catch path errors and incompatible streams without waiting through a large list.

Choose packet copy or re-encoding

The concat demuxer joins packets; it does not make unlike inputs alike. FFmpeg expects files to expose the same streams with matching codecs and time bases. If your files meet those requirements, stream copy can avoid decoding and re-encoding the media. That is less processing, but it leaves the incoming properties as they are, so it does not correct an unsuitable output profile or repair mismatched timing.

When the files differ in stream layout or properties, normalise them first or use an approach that re-encodes during concatenation. FFmpeg’s FAQ on concatenating media distinguishes the concat demuxer from the concat filter: the filter is the relevant route when re-encoding is needed, while the demuxer can be used to avoid re-encoding when the files are compatible. The two methods are not interchangeable shortcuts.

Choice Use it when Trade-off to consider
Concat demuxer with stream copy Inputs have compatible corresponding streams, codecs, and time bases, and you do not need to alter them Low processing overhead, but no normalisation; source timing and codec details remain significant
Concat filter with re-encoding Inputs need to be brought to common stream properties as they are joined More processing and a new encode, but you can define a consistent output profile
Normalise files first, then use the demuxer You want a repeatable compatible set for a long playlist Requires a preparation step and storage for the normalised copies, but makes later playlist checks more predictable

For a mixed folder of music videos gathered over time, normalising to a common profile is often easier to reason about than hoping every boundary behaves. Convert or filter only after deciding what audio and visual quality you need, and retain originals so you can revisit the process if an encode is unsatisfactory. If there are audio-only tracks among videos, decide whether to add a consistent visual track or build an audio-focused stream; do not assume a video playlist can switch stream layout partway through.

A community discussion of a mixed video playlist also points to changing stream properties as a source of trouble, but that is practical experience rather than an official guarantee. The reliable check is still to probe your files and test the exact sequence you plan to broadcast. A tutorial command that worked with someone else’s set cannot establish that your codecs, paths, FFmpeg version, or timestamps will behave the same way.

Set the outgoing profile for YouTube Live

Separate the source-file format from the outgoing stream. Your playlist may contain compatible files, but the stream sent to YouTube still needs an encoder, transport, resolution, frame rate, bitrate, keyframe interval, and audio format. Check YouTube Help’s current page for live encoder settings, bitrates, and resolutions before settling on those values, as guidance and interface options can change.

YouTube’s published guidance lists RTMP and RTMPS ingest and supports H.264, H.265/HEVC, or AV1 video, along with AAC or MP3 audio, constant-bitrate encoding, and up to 60 fps. It recommends a two-second keyframe interval and says not to exceed four seconds. YouTube recommends RTMPS. These are ingest recommendations, not a promise that a particular command or connection will stay healthy.

The bitrate should follow the selected codec, resolution, and frame rate, as well as the connection available for upload. For example, YouTube’s table lists H.264 1080p30 with a minimum of 5 Mbps and a recommended 14 Mbps; for H.264 720p30, it lists 3 Mbps minimum and 8 Mbps recommended. These are YouTube’s published encoder recommendations, not universal settings or a guarantee of stability. A smaller profile can be a sensible choice when the available upload connection is limited or shared. Run a speed test and leave headroom for variation rather than setting the stream at the full measured upload rate.

For stereo audio, YouTube lists 44.1 kHz and 128 kbps as advanced settings. For 5.1 audio it lists 48 kHz and 384 kbps, and says AAC is required for 5.1 over RTMP/RTMPS. Choose stereo unless you have a genuine multichannel programme and have checked the complete path. Many Indian music collections contain stereo tracks, and a stereo output avoids pretending that two-channel source audio contains a surround mix.

The exact FFmpeg invocation depends on the input and the profile you select. Confirm how your version names the RTMP/RTMPS output, how it handles the audio and video streams, and whether your keyframe and constant-bitrate settings are applied as intended. Do not copy a command built for H.264 video into a workflow that selects a different codec, or assume that a bitrate figure applies to every resolution.

If your goal is to play existing files rather than operate an encoder on a local computer all night, the article on streaming MP4 files to YouTube Live from a Linux server in India gives context on that operating choice. For the narrower pain of keeping a personal computer available continuously, StreamNeo takes an uploaded video and runs it as a YouTube live stream with your computer switched off, so you do not have to keep a local machine running for that task.

Test a representative stream in Live Control Room

Do not make the first test the first public overnight run. YouTube Help says, “Make sure to test before you start your live stream.” Its encoder guidance advises testing with audio and video movement similar to the planned stream, then watching stream health and messages during the event. A still image and quiet test tone may not reveal the load or audio behaviour of a music-video playlist.

Set up a private or otherwise appropriate test in YouTube Live Control Room and send a representative section of the actual playlist. Include a transition between different files, a track with the longest or least certain duration, and a section with typical movement and sound. Check that the incoming preview appears, audio is present and not distorted, and the health panel does not report an ingest issue. Confirm the stream key and selected destination before sending a live signal; a valid encoder connection to the wrong event is still a mistake.

Test the duration you need to validate, not just the first few seconds. A short test can prove that the connection opens but cannot show whether a later file transition, repeated item, or long-running timestamp issue will occur. Observe more than one boundary and verify that the audio does not drift or suddenly disappear. If the playlist contains many file types, test one from each group rather than one convenient file.

Keep notes: FFmpeg version, source files tested, output codec and profile, chosen audio layout, and any messages in Live Control Room. When something fails, those notes help distinguish a bad path from an unsupported stream property or a connection problem. YouTube’s recommendations can guide configuration, but only a test of your own input, connection, account, and event can show how that setup behaves.

Monitor playback and plan recovery

A nonstop channel needs a response plan for errors, not just a playlist. Watch FFmpeg’s output for missing-file messages, decode errors, unexpected end-of-file reports, or reconnect attempts. In Live Control Room, keep an eye on stream health and messages. A green indication at the start does not prove that a later file is valid or that the network will remain stable overnight.

Make the playlist maintainable. Use stable filenames, keep a backup of the text file, and test changes in a copy before replacing the version in use. If a track is replaced, probe it and confirm its stream layout before adding it. If a duration is suspect, verify it with playback and metadata; use a duration override only when you have a trustworthy value. Avoid editing a live playlist casually, since the running process may have already read or buffered the relevant entries.

Plan what happens after an interruption. Know how you will restart the encoder, confirm the correct YouTube event and stream key, and check the preview and health messages before leaving it unattended again. If your setup does not automatically recover, decide who will notice the drop and how they will act. A local computer-based setup also depends on power, operating-system updates, storage, and network continuity, so budget-friendly setup guidance for a full-night test is relevant when planning the surrounding equipment and routine.

Recovery should not mean blindly replaying a broken file or repeatedly reconnecting without diagnosis. Stop and inspect the last useful log lines, check whether the source file plays independently, and verify that the outgoing settings still match the YouTube event. If the stream returns, watch the health state and a transition before considering the incident resolved. Keep a fallback visual and a rights-cleared backup item ready if the format permits, but do not assume a fallback removes the need to investigate the cause.

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 a concat playlist make different music videos compatible?

No. The demuxer expects corresponding streams with matching codecs and time bases; a text file does not normalise them. Probe the sources and either prepare compatible copies or use a re-encoding workflow when the properties differ.

Can I use -safe 0 to fix a playlist path error?

It may allow paths rejected by the default safe-path check, but it also permits any filename the process can access. Prefer a simple relative-path playlist where possible, and only disable the check when you trust the entries and understand the effect.

Why can a track transition have a gap or timestamp problem?

The demuxer bases later timestamps on the preceding file’s duration, so inaccurate or missing duration information can affect transitions. Check the file’s actual end and metadata; FFmpeg documents a per-file duration override for cases where you have verified a better value.

Does a working FFmpeg stream mean YouTube will keep it live all night?

No. A successful test confirms only that the tested files and connection worked under those conditions. Monitor Live Control Room health, watch the encoder output, and have a recovery plan for network, file, or process errors.

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 ↗