Skip to content
streamneo.
Tools12 min read

How to Build an FFmpeg Playlist for a 24/7 YouTube Stream of Animated Fairy Tales

Build a sequential FFmpeg playlist for YouTube Live, then check file compatibility, encoder settings, continuity, archives and rights.

sn.
StreamNeoPublished 4 October 2026
Worth sharing?

An FFmpeg concat playlist can play a prepared sequence of animated fairy-tale videos and repeat it as input to a YouTube Live encoder. It does not keep a broadcast uninterrupted by itself: the files, FFmpeg process, host, upload connection, YouTube ingest, archive plan and content rights all need separate attention.

The practical approach is to inspect and, where necessary, standardise the videos; write a concat demuxer script; test the full path in YouTube Studio; and decide how you will handle interruptions and replays before calling the channel always-on. Treat the command below as a pattern to adapt, not as a verified universal preset.

Prepare the videos and clear their rights

Start with a folder containing only the episodes you intend to show. Give each file a stable, descriptive name and decide the order deliberately. For example, you might place a short opening story first, then longer episodes, and reserve a closing card for a scheduled transition. A playlist plays the order you give it; it does not choose an order based on title, freshness or audience response.

Keep an untouched copy of the source files. Work on copies when you normalise formats or trim material, and check that each output plays from beginning to end before adding it to the playlist. A file that is corrupt, incomplete or has a surprising ending can disrupt a sequence even if the other episodes are sound. Record a simple inventory with filename, duration, video dimensions, frame rate, audio presence and rights status. This makes later diagnosis more specific than “the playlist stopped”.

Rights need to be checked for the actual adaptation, animation, narration, music and artwork, not just the underlying story. A fairy tale may be old while a particular recording, translation, character design or soundtrack is protected. Confirm that your permission covers public live streaming and any replay you plan to keep. YouTube says it scans live streams for third-party matches; a match can cause replacement with a placeholder, interruption or termination. If you use licensed third-party material, check whether the owner must add your channel to a Content ID allowlist. A licence alone may not prevent an automated interruption where allowlisting is needed. See YouTube’s live-stream copyright guidance.

Because these are animated fairy tales, consider who the intended audience is and set the audience designation and other content settings accurately for the material. Do not infer a classification merely from the genre. Review YouTube’s current policies for the channel and each programme, particularly if stories contain frightening scenes or material not intended for young children.

Write a concat demuxer list

The concat demuxer reads a text file containing a sequence of media files and presents them to FFmpeg one after another. Create a UTF-8 or plain-text file named playlist.ffconcat in the same working folder as the videos. Put the format header on the very first line, exactly as shown, followed by one file line per episode:

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

The header must be on the first line for FFmpeg to recognise the format automatically. Relative paths such as these are convenient when the script and videos live together; you can instead use absolute paths if the process will start from another working directory. Keep filenames simple where possible. If names contain apostrophes or other special characters, use FFmpeg’s documented quoting and escaping rules rather than assuming that shell quoting rules apply to the list file. The FFmpeg concat demuxer documentation describes the file syntax and options.

Each entry means “read this file at this point in the sequence”. When FFmpeg reaches the end of the list, the list has ended; it does not repeat itself unless you request a loop. A command-line pattern for a compatible set of files is:

ffmpeg -re -stream_loop -1 -f concat -i playlist.ffconcat \\
  -c:v libx264 -preset veryfast -b:v 5000k -maxrate 5000k -bufsize 10000k \\
  -pix_fmt yuv420p -g 60 -c:a aac -b:a 128k -ar 44100 \\
  -f flv 'rtmps://YOUTUBE_INGEST_URL/YOUR_STREAM_KEY'

This is illustrative, not a tested command or a promise that these settings fit your files, computer or connection. Replace the ingest URL and key with the values shown in YouTube Studio. Do not put a real key in a public script, shared screenshot, source repository or log. Treat it as a credential and rotate it if it is exposed.

-stream_loop -1 tells FFmpeg to repeat the input indefinitely. -re paces file input at its normal rate; without real-time pacing, FFmpeg can read a file input faster than a live service can consume it. Neither option makes the broadcast continuous if FFmpeg exits, the host goes offline, the upload fails or YouTube stops accepting the stream. For Linux setup details, the Ubuntu FFmpeg playlist guide covers the installation side; the list syntax and file checks remain relevant regardless of operating system.

Check stream compatibility and durations

The concat demuxer is most useful when every source presents compatible streams. Before relying on it, inspect each file with a media probe such as ffprobe. Compare the number and type of streams, video and audio codecs, time bases, dimensions, frame rates, sample rates and channel layouts. A collection of MP4 files is not necessarily a compatible collection: one might have stereo AAC, another no audio, and a third a different video time base or frame size.

The demuxer joins timelines based on timestamps and duration information. If a file reports an incorrect duration, the next file can begin at the wrong point, producing a gap, overlap or timestamp artefact. Confirm that the reported duration makes sense against playback. Pay attention to variable frame rate sources, unusual edit lists, silent tracks and files with multiple audio or subtitle streams. Do not assume that a player’s ability to open each file proves the files will concatenate cleanly.

When streams differ, there are two broad options. Normalise the files to a common profile first, then use the demuxer; or use the concat filter to assemble and re-encode the sequence. The demuxer may avoid re-encoding when stream parameters match, reducing processing work and avoiding another quality-generation step. The filter is more adaptable when files need conversion, but asks the encoder to process the video and requires enough host capacity for that work. FFmpeg’s concat FAQ explains the distinction. A practical companion is the guide to converting videos to a consistent format for an FFmpeg playlist.

A mismatch is not only a codec problem. If an episode has no audio stream while the others do, a command expecting audio can fail or behave differently than intended. If a story has a different resolution, scaling it may introduce black bars or crop artwork unless you choose the framing deliberately. Decide whether every video should fill the frame, preserve its original aspect ratio or use a background. Then verify the result visually instead of trusting a successful exit code.

Choose encoding and YouTube ingest settings

The command’s encoding options convert or package the sequence for YouTube’s live ingest. libx264 selects H.264 video encoding, aac selects AAC audio encoding, and yuv420p is a broadly compatible pixel format. The bitrate, maximum rate, buffer size and GOP size shown are examples only. Select them for your chosen resolution and frame rate, your host’s encoding capability, and the current guidance in YouTube’s live encoder table.

YouTube’s current guidance recommends constant bitrate (CBR), a two-second keyframe interval, and RTMPS for encrypted ingest. The table varies by resolution, frame rate and codec, so look it up when configuring the stream rather than copying a number from an old command. For example, YouTube’s page lists a 1080p, 30 fps H.264 minimum of 5 Mbps and a recommended 14 Mbps; these are platform recommendations, not a guarantee that your particular connection can sustain that bitrate. The sample 5000k therefore should not be treated as a general 1080p recommendation. Check YouTube’s encoder settings and bitrate guidance before selecting a target.

The -g 60 setting means a GOP of 60 frames. At 30 frames per second, that corresponds to two seconds; if you use another frame rate, change the frame count to match the interval you intend. YouTube recommends a two-second interval and says not to exceed four seconds. If your animation has rapid movement, representative testing matters: bitrate demands vary with motion and detail. A still title card is not a useful test for a busy chase scene or detailed backgrounds.

Create or schedule the live event in YouTube Studio’s Live Control Room, then copy the current server URL and stream key into your local configuration. Use the stream key only for the intended channel and event. Confirm the format expected by the configuration and test that the encoder is actually sending to the correct event before sharing the watch page.

Your upload connection must have room for the encoder’s sustained output and ordinary variation. YouTube recommends testing upload bitrate against the intended setting. A speed test is a useful preliminary check, but does not prove that a particular host and route will stay healthy overnight. For practical deployment trade-offs, see YouTube’s 24/7 setup options for India: a local machine gives direct control over files, while a rented machine shifts the work to maintaining a remote host and transferring the media.

Test the complete playlist output

Test the actual playlist, not just a short sample file. Start with the opening, watch across at least one file boundary, and confirm that the sequence returns to its first episode as expected. Check picture, sound, transitions, duration behaviour and whether the audio remains in sync. Include representative high-motion scenes and quiet scenes with dialogue or music. A clean first minute does not establish that every episode has compatible streams or correct duration metadata.

Use YouTube Studio’s preview and stream-health indicators while the encoder is running. Confirm that the event reports a healthy incoming signal, that the intended resolution and frame rate arrive, and that sound is present at an appropriate level. If Studio reports an issue, change one variable at a time and retest. For example, first confirm the target bitrate against the official chart, then check the host’s encoding load, then investigate the network path. Changing several settings at once makes it harder to identify what helped.

A sensible rehearsal includes intentionally stopping and restarting the FFmpeg process so you learn what the audience sees and what Studio shows when the encoder disconnects. Do not test with a production stream if an interruption would be costly; use an unlisted or otherwise appropriate test event. Make a note of the exact command and file list used. If you later change an episode, encoding profile or host, treat that as a change worth testing rather than assuming the old result still applies.

When audio is absent or unexpectedly quiet, trace it through the source file, the selected audio stream, the encoder output and YouTube’s preview. A playlist can expose problems at transitions that are not audible when files play separately. The troubleshooting checklist in why there is no sound on a Gurbani YouTube live stream offers a useful way to isolate the audio path.

Plan for host and upload interruptions

An infinite input loop is an instruction to repeat media, not a reliability plan. FFmpeg can crash or be stopped; the host can reboot, lose power or run short of disk space; the network can fail; an ISP route can deteriorate; and YouTube’s ingest can report problems. The playlist cannot repair any of those conditions. A live stream is only being sent while the encoder process and its path to the platform are functioning.

Decide who or what will notice a failure. Check FFmpeg’s logs for exits and errors, and check YouTube Studio’s live stream health rather than relying solely on a process that appears to be running. For a dedicated computer, plan for operating system updates, power protection where appropriate, automatic startup after a reboot and a way to alert you if the process stops. For a remote host, account for access, storage, transfer of source files and the steps needed to restart the process. These are operational responsibilities, not settings that the concat script can solve.

A restart strategy can reduce the time you spend diagnosing a stopped process, but test it. If a supervisor restarts FFmpeg immediately after failure, check that repeated failures do not create a rapid restart loop or expose the stream key in logs. Decide whether resuming at the beginning of the playlist is acceptable or whether you need a record of the last episode. A loop command does not create a persistent bookmark across a process restart.

For some creators, a computer that already holds the videos is easier to understand and maintain. Others may prefer a managed approach that avoids keeping their own computer running. StreamNeo removes the specific burden of leaving your computer on to keep an uploaded file playing, while the creator still needs to prepare the material, connect the YouTube channel and decide how to handle rights and archives. Whichever arrangement you choose, verify how failures are surfaced and what recovery looks like before treating it as unattended.

Account for archive duration limits

A repeating playlist can keep supplying a live input, but it does not turn a long broadcast into a complete replay. YouTube states that streams under 12 hours are automatically archived. Do not rely on that automatic archive behaviour to preserve a 24/7 stream as one complete recording. Check YouTube’s current live stream archive guidance before planning how viewers will watch episodes later.

If a complete replay matters, make a separate recording plan and test it. A local recording consumes storage and needs monitoring; it can also stop if the same host or disk fails. Another approach is to schedule shorter sessions and plan transitions, so each stream fits the archive behaviour you intend to use. That involves more operational work and may interrupt the continuous audience experience. Compare those trade-offs before announcing that viewers can return to watch any episode.

For a fairy-tale channel, a long unbroken stream may suit background viewing, while individual episode replays make it easier to find a story. The right choice depends on how viewers use the channel, not on the playlist format. If you choose separate sessions, make clear where one ends and the next begins, and check that the transition does not leave an unwanted gap or accidental duplicate broadcast. If you record locally, verify the recording after a test rather than assuming that a live output is also being saved.

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 -stream_loop -1 make the broadcast uninterrupted?

No. It asks FFmpeg to repeat its input indefinitely, but the process, host, upload connection and YouTube ingest still have to remain available. Monitor the stream and decide how you will detect and recover from a failure.

Can I put any MP4 files in the concat list?

Not safely by assumption. Check that the files have compatible stream layouts and parameters, and that their duration information is accurate. Normalise mismatched files or use a concat-filter workflow that re-encodes them, then test the output.

Will YouTube automatically save a complete replay of a 24/7 stream?

Do not rely on that. YouTube says streams under 12 hours are automatically archived, so plan separate recording or shorter scheduled sessions if a complete replay matters, and confirm the current archive guidance.

Does an old fairy tale mean the animation and music are free to stream?

No. Rights can differ between the underlying story and its adaptation, narration, artwork or soundtrack. Confirm permission for live streaming and any replay, and check whether the rights holder needs to allowlist your channel for Content ID.

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 ↗