FFmpeg’s concat demuxer can read a text file of compatible gaming VODs and send them in sequence as one output stream. That is a finite playlist: it does not, by itself, guarantee that playback starts again after the last file.
The reliable workflow is to check the media, build and test the sequence, then encode its output to the YouTube event’s ingest URL with the event’s stream key. Treat any repeat behaviour as a separate feature to verify with your FFmpeg build and actual files before relying on it overnight.
Prepare gaming VODs that can be joined
The concat demuxer is not a video editor. It reads packets from listed files in order and presents them as a combined input to FFmpeg; it does not automatically make unlike files identical. The safest starting point is a set of VODs with matching stream layout and compatible codecs and time bases. For example, if each recording has one H.264 video stream and one AAC audio stream at the same frame rate and matching timing characteristics, they are a more plausible concat set than recordings with different layouts or formats.
Inspect every file before creating the playlist. Record its video and audio codecs, dimensions, frame rate, time base, and whether audio is present. FFmpeg’s own concat demuxer documentation describes the requirement for files to have the same streams and compatible codecs and time bases. If one VOD is variable frame rate, another has no audio, or a third uses a different video codec, do not assume direct packet-level concatenation will produce a clean result.
When inputs differ, a normalising or transcoding stage may be needed. The right conversion depends on the files and the output you want, so there is no safe universal filter chain to paste in without inspecting them. Make a separate test output first and check for the expected streams, dimensions, audio and continuity rather than discovering an incompatibility during a scheduled live event.
Use stable file paths and avoid moving or renaming inputs after writing the script. If a path contains spaces or special characters, it needs correct concat-script escaping; that rule is separate from how you quote a command in your shell. Keep a copy of the original recordings and test with representative files, including a transition where movement and audio are present.
A playlist can change what viewers experience at each transition. Check whether one VOD ends with a menu, a long pause, an abrupt audio cut or a different level of game audio before the next begins. If you are considering how playback behaves across multiple clips, the article on continuous music-video playback offers a related planning perspective, though gaming files still need their own technical checks.
Write the concat demuxer script
Create a plain-text file with one file directive for each input, in the order you want viewers to see them. The optional format marker can help FFmpeg recognise the script automatically, but it must be the exact first line, with no leading spaces or byte-order mark:
ffconcat version 1.0
file '/media/game-one.mp4'
file '/media/game-two.mp4'
file '/media/game-three.mp4'
These paths are examples, not tested media. Replace them with paths that exist on the machine running FFmpeg. In this illustration the quoted paths show the intended handling of spaces; consult the FFmpeg formats documentation and its syntax notes when a path includes a quote, backslash or other special character. Test the script with your own filenames before using it for a live event.
Save the file with a clear name such as vods.ffconcat and keep it alongside, or otherwise clearly associated with, the media it references. Relative paths are interpreted in relation to the script’s location, so moving the script can change what those paths point to. Absolute paths avoid that particular ambiguity, but they tie the script to that machine’s directory layout.
The marker is optional, but if you include it, spelling and placement matter: the first line must be exactly ffconcat version 1.0. A text editor that silently adds a byte-order mark or blank line can interfere with automatic recognition. If FFmpeg rejects the file, check this line, the file encoding and each path before changing the stream settings.
Keep the playlist finite while you validate it. A three-file test is easier to inspect than a long schedule: confirm the first file starts, the second follows, and the final file reaches its end. A valid script is a sequence description, not proof that every transition will look or sound seamless.
What sequential concatenation does
The concat demuxer reads the listed files one after another as if their packets had been muxed together. That makes a single input from a finite, ordered list. It does not render transitions, crossfade audio, or restart the list when it reaches the end.
This is the key distinction behind “playlist” in this workflow. If the script contains three VODs, it describes those three VODs in that order. Once the final input is exhausted, the demuxer has no fourth entry to read. FFmpeg may continue encoding for a short time while flushing output, but that is not another pass through the list.
Timing deserves particular care. The concat demuxer uses duration information to determine timestamps for subsequent files. The FFmpeg documentation warns that inaccurate duration information can cause artifacts, including gaps or other timestamp problems. Where a duration is wrong, the documented duration directive can override it, but only use an override after establishing the correct duration for that file. Guessing can replace one timing problem with another.
Listen and watch at every boundary in a local test. Check whether the next clip starts promptly, whether audio continues or drops, and whether video timing jumps. A file that plays on its own may still behave poorly after another file because stream properties or metadata differ. When you need to diagnose a difficult transition, consult the FFmpeg FAQ and keep the test small enough to reproduce.
A finite playlist is appropriate for a planned broadcast with a known end, a one-time event, or a test feed. It is not enough for an unattended channel whose stated requirement is continuous repetition. Readers weighing how a playlist differs from keeping a local machine on can also see the practical trade-offs in using a spare PC for an always-on gaming stream.
Encode the output for the YouTube event
Create or select the live event in YouTube Studio’s Live Control Room. Copy the event’s stream URL and stream key into the FFmpeg output configuration. YouTube treats the key as a credential: do not put it in a public tutorial, screenshot, shared log or repository, and reset it if you believe it has been exposed. Follow YouTube’s stream key guidance for the current event workflow.
At a high level, the command needs to open the concat script as an input, encode that input into settings accepted for the event, and send the encoded output to the ingest address with the key. The exact command depends on your FFmpeg build, the input media, the selected protocol and the event settings. Avoid copying a command that embeds a real key; use a placeholder while drafting, then supply the secret carefully in your own environment.
YouTube’s live encoder settings describe supported codecs and ingest guidance. For RTMP/RTMPS, YouTube supports H.264, H.265 or AV1 video and AAC or MP3 audio; its settings recommend constant bitrate (CBR) and a two-second keyframe interval, not exceeding four seconds. YouTube recommends RTMPS. Choose a codec, resolution, frame rate, audio format and bitrate that match the applicable row in the current official table rather than treating one bitrate as universal.
As listed on YouTube’s live encoder settings page on 3 October 2026, the H.264 1080p60 row gives 17 Mbps as the recommended bitrate and 6 Mbps as the minimum; the H.264 1080p30 row gives 14 Mbps recommended and 5 Mbps minimum. These are YouTube’s published guidance, not a guarantee of stable ingest or a claim about what your connection can sustain. If your upload capacity is limited, test an appropriate lower output profile and check the event’s stream health rather than assuming the highest resolution is best.
The ingest handoff is distinct from the concat script. The playlist supplies media to FFmpeg; the encoder turns it into a live-compatible feed; the output connection delivers it to the event. A playlist can work locally while the YouTube event remains unconfigured, or the event can be configured while the input media fails at a boundary. Test both sides together before announcing the broadcast.
Separate a finite playlist from endless rotation
A list of file entries is finite. It can sequence VODs, but that alone does not establish endless rotation. FFmpeg’s documentation on the concat demuxer describes sequential reading; it does not prove that a finite script will restart automatically on reaching its end. Do not assume an option or command copied from another version will create a dependable all-night loop.
If you need continuous repetition, treat that as a separate design and verification task. First determine the FFmpeg version and build you will actually use. Then test the proposed repeat mechanism with the same script and representative files, including the final-to-first boundary, and observe the process for the full intended period. Check that timestamps remain acceptable, audio does not drift or disappear, the feed continues to reach YouTube, and the event does not encounter a reconnect or end-of-input condition.
Do not label a workflow “endless” based on a short test that only reaches the second file. Your test needs to cross the playlist’s end and verify what happens next. If the current build and media have not been tested, describe the result as a finite sequence and plan an operator handoff or a different, verified arrangement instead of promising automatic rotation.
This distinction also matters when choosing between tools. FFmpeg offers a scriptable workflow and is useful when you need control over encoding, but you are responsible for validating the input sequence and repeat behaviour. A graphical playlist tool may make scheduling and transitions easier to operate, while still requiring its own test. For a different FFmpeg workflow that explicitly considers list order, see shuffling videos in an FFmpeg YouTube Live playlist; shuffling a list and repeating it are separate behaviours.
Test with the intended build and media
Run a local test before connecting to a public event. Use the same FFmpeg executable and media files planned for the broadcast; a test on a different computer or build may not reproduce a codec, path or timing issue. Confirm that FFmpeg reads every listed file, that the expected video and audio streams are present, and that the output reaches the end of the finite list without errors.
Then run an unlisted or otherwise appropriate YouTube test event and check the Live Control Room preview and stream health. YouTube advises testing and monitoring the live encoder feed. Watch for missing audio, a frozen image, unstable ingest warnings, unexpected scaling, or a delay before the first frame. Let the test cross each VOD boundary and verify what viewers will hear and see, not only whether FFmpeg reports that it is running.
A useful test record includes the FFmpeg version, the input filenames, the script, output profile, event protocol and observed results. Keep the stream key out of that record. If you change codecs, rebuild the playlist, update FFmpeg or move the files, repeat the relevant test; each can alter the behaviour you previously checked.
For a long-running channel, decide what happens when the process ends or the network drops. A local process needs someone or something responsible for noticing and responding; restarting the same finite input may simply play the list again only if the chosen restart arrangement is specifically designed and tested to do that. StreamNeo can remove the need to leave your own computer running when the pain is operating the broadcast machine continuously: you upload the video, provide the YouTube key, and the channel feed is handled without installing software locally. It remains a YouTube-specific route, and you should still prepare suitable content and verify your event settings.
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 loop a playlist in FFmpeg?
A concat script establishes a finite sequence, not a guaranteed loop. To repeat it, verify a repeat method against the exact FFmpeg build and real media you intend to use, then test across the final-to-first boundary and for the intended run duration. Do not rely on an untested command for an unattended stream.
How do I stream pre-recorded gameplay as a YouTube Live stream?
Prepare compatible VODs, list them in a concat demuxer script, and configure FFmpeg to encode the sequence to the live event’s stream URL using its stream key. Match the output codec and settings to YouTube’s current encoder guidance, then verify the preview, sound and stream health in a test event.
Why does FFmpeg’s concat playlist stop after the last file?
Because the script lists a finite set of inputs, and the concat demuxer reads them in order. Reaching the final file’s end is the expected result unless a separately configured and tested arrangement supplies another pass.
What YouTube Live bitrate and keyframe interval should I use?
Use the applicable row in YouTube’s current encoder settings table for your codec, resolution and frame rate; bitrate is not one-size-fits-all. YouTube recommends a two-second keyframe interval and says it should not exceed four seconds. Test with your connection and monitor the event’s stream health before depending on the settings.