Skip to content
streamneo.
Streaming Settings11 min read

How to Keep Product Demo Videos in the Right Order on an FFmpeg YouTube Live Stream

Use an FFconcat playlist and FFmpeg’s concat demuxer to preserve a fixed product-demo sequence on YouTube Live.

sn.
StreamNeoPublished 7 October 2026
Worth sharing?

For a fixed sequence of prerecorded product demos, put one file directive per video in an FFconcat list, in the order you want viewers to see them. Feed that list to FFmpeg’s concat demuxer, then send the resulting output to the stream URL and key shown in YouTube Live Control Room.

The list records the intended order; it does not make unlike files interchangeable or guarantee seamless transitions. You need to check that the source streams are compatible and that their duration information is sound. The guidance below describes configuration, not a hands-on test.

Decide on the sequence before configuring FFmpeg

Write down the viewer journey first: perhaps an introduction, a demonstration of the main feature, a comparison, and a closing summary. Give each source file a clear name that makes its position apparent, such as 01-introduction.mp4 and 02-feature-demo.mp4. The number prefix is not what controls playback; the order of the lines in the playlist does. Clear names simply make it easier for you to review the sequence later.

A fixed sequence is useful when a product presentation depends on context. A viewer should see the setup before the feature, and the feature before the closing call to action. If the same stream will run repeatedly, the sequence in the list becomes the repeated sequence. This method does not choose videos at random or rearrange them automatically. To change what plays next, edit the list and use the revised list in the FFmpeg process.

Keep a simple source-of-truth copy of the list with the videos. If another person may maintain the channel, include a short note about the intended order and any file that should not be moved or renamed. A filename change can make a playlist entry point to a missing file, even if the visible sequence still looks correct.

For multiple programmes or audiences, separate streams may be easier to maintain than one list that changes often. The practical considerations are discussed in creating separate YouTube Live streams for multiple podcasts. For this article’s configuration, assume one chosen demo sequence is meant to play in a known order.

Write the FFconcat playlist

Create a plain-text playlist, for example playlist.ffconcat, with the version header on the first line and one file directive for each source. Put the directives in the desired playback order:

ffconcat version 1.0
file '01-introduction.mp4'
file '02-feature-demo.mp4'
file '03-wrap-up.mp4'

The first file line is the first input; the next line follows it, and so on. Keep the playlist and videos in a location where the FFmpeg process can read them. Relative paths are often easier to maintain when you keep the list alongside the source videos and run FFmpeg with a predictable working directory. If you use relative paths, confirm what directory the process will treat as its starting point rather than assuming it is the folder containing the playlist.

Paths containing spaces should be quoted as shown. If a filename contains characters that need special handling, make sure the playlist syntax represents them correctly. Avoid renaming a source after creating the list unless you also update its matching file line. A list can be ordered perfectly and still fail at playback because an entry no longer resolves to a readable file.

FFmpeg’s concat demuxer documentation describes the list format and its directives. The documentation for the FFmpeg build you actually use is the relevant reference: options and behaviour should be checked against that version rather than assumed from an example written for a different build.

Feed the list to the concat demuxer

The concat demuxer reads the ordered entries as a single input sequence. In an FFmpeg command, identify the input format and playlist before specifying output options. A configuration pattern is:

ffmpeg -f concat -i playlist.ffconcat [output options] OUTPUT

Here, OUTPUT stands for the destination and output settings you configure for your stream, not a literal YouTube address. The example shows where the playlist belongs in the command; it is not a tested, ready-to-run command for arbitrary files or every FFmpeg build. The actual output options must match the encoder and YouTube’s current requirements.

The -safe 0 option is sometimes shown in concat examples, but it is not a general compatibility switch. Use it only when the list needs paths or syntax that FFmpeg considers unsafe. Prefer ordinary safe relative paths where they work. If you do need -safe 0, understand that it relaxes path restrictions; it does not repair a missing file, make incompatible streams compatible, or validate the source content.

Keep input options with the input they apply to, and output options after the input declaration. If the playlist is not found, inspect both the path to playlist.ffconcat and the process’s working directory. If FFmpeg opens the playlist but cannot open a listed video, verify that exact path, spelling, and read access before changing output settings.

The concat demuxer is most suitable when the inputs have matching stream layouts, codecs, and time bases. FFmpeg’s project documentation explains those compatibility expectations. If the demo videos were exported with different properties, do not assume that a single list will smooth over the differences. For a related case, see whether FFmpeg can stream a playlist with mixed video resolutions.

Understand how timestamps move between files

The demuxer’s job is not only to read one file after another. It also adjusts timestamps so that each subsequent input follows the preceding one in the combined output timeline. In broad terms, it calculates the next file’s start from the duration of the previous file. That is why duration information matters to the sequence even when the file lines are correctly ordered.

If a source reports an inaccurate duration, the demuxer can calculate a start time that does not match the media’s actual end. A transition may then jump, leave an unexpected gap, or otherwise show timestamp-related artefacts. The presence of the correct next filename does not rule out a duration problem. Check the source’s reported duration and compare it with the actual intended end of the clip.

The FFconcat format includes a duration directive that can override duration information for an entry. It is a configuration tool, not a value to add by guesswork. If you use it, base the value on a reliable inspection of the source and the timeline you want. Incorrect overrides can create their own discontinuities, so record why a value was supplied and re-check it when a clip is replaced.

There is a trade-off between relying on the files’ duration metadata and maintaining explicit overrides. Metadata avoids extra playlist maintenance, but poor or inconsistent metadata can affect the calculated boundary. Overrides make the intended duration explicit, but they add another value that must stay correct when an edit changes. For a frequently revised product demo, a repeatable export and review process can be more dependable than hand-maintaining stale duration values.

Also distinguish a timestamp issue from a file-compatibility issue. A clip can have the expected duration yet contain a different stream layout, codec, or time base from the others. Conversely, compatible streams can still have misleading duration information. Diagnose the cause before choosing a remedy rather than changing several options at once.

Choose between the demuxer and the concat filter

The concat demuxer is the direct fit when your clips are already compatible and you want to preserve their encoded streams through a sequential input. It avoids making re-encoding the defining step of the workflow. Its constraint is that the inputs need to meet the demuxer’s stream compatibility requirements; it is not a universal playlist tool for any collection of media.

When inputs differ and you need to bring them to common output properties, the concat filter may be more appropriate because it operates on decoded media and can be used in a filter-and-encode workflow. That means more configuration and an encoding step, with its associated processing and quality choices. FFmpeg’s FAQ on concatenating media distinguishes the approaches and notes that the filter is recommended when re-encoding is needed.

Situation More suitable direction Trade-off to consider
Inputs have matching stream layout, codecs, and time bases Concat demuxer with an ordered FFconcat list Less transformation, but duration metadata and compatibility still matter
Inputs differ and need common output properties Concat filter and an encoding configuration More control over the output, with the cost and decisions of re-encoding
One or more source durations are unreliable Inspect duration data; consider a justified duration directive Overrides add maintenance and must reflect the current edit

Standardising the source exports before the playlist is another option. It moves work earlier: clips can be converted to matching properties before the live process reads them. That may make the live configuration easier to reason about, but it requires time and a consistent conversion policy. For files exported from a different editing format, the FFmpeg settings guide for converting MOV files to playlist videos can help you consider the conversion step. It is still necessary to decide what properties your own output needs.

Configure the YouTube Live destination

YouTube’s encoder setup uses the server URL and stream key supplied in Live Control Room. Enter those values in the output configuration for the encoder you are using. Treat the stream key as a credential: do not put it in a public script, screenshot, shared document, or support post. If it has been exposed, consult YouTube’s current instructions for managing the stream key and replace it as appropriate.

YouTube’s encoder setup instructions explain where to find the stream URL and key. The available interface and guidance can change, so use the current Live Control Room details rather than copying a destination from an old command or a different channel. Confirm that the selected stream is the one you intend to broadcast to before starting the encoder.

The output must also fit YouTube’s supported encoder settings. YouTube’s live encoder settings cover supported codecs and protocol-specific guidance, including keyframe interval and bitrate recommendations that vary with codec, resolution, and frame rate. Configure those values for the output you have chosen; do not copy a bitrate in isolation from a table without matching its conditions. YouTube recommends RTMPS for encrypted transport, so check the current official guidance when selecting the destination protocol.

The input playlist and output configuration solve different problems. The playlist controls the order of the recorded demos. The output configuration determines how the resulting video reaches YouTube and whether the encoded stream fits the selected settings. If the sequence is correct but the stream does not appear, verify the current URL and key, then review YouTube’s encoder settings and stream health rather than rearranging the playlist.

Check order and playback before broadcasting

Before using the sequence for a live channel, review the playlist as text and trace it against the intended viewer journey. Check every file line for spelling, extension, and path. Then confirm that the FFmpeg process is pointed at that exact playlist, not an older copy in another directory. These checks catch a common class of wrong-order problems: the planned list is correct, but the running process reads another file.

Review the source properties as a set. The concat demuxer expects matching stream layouts, codecs, and time bases. If a clip has an extra audio stream, different encoding properties, or a time base that does not align with the others, investigate before relying on the demuxer. Decide whether to standardise the files, use a concat filter with re-encoding, or revise the source exports. The choice depends on whether you can accept the additional conversion work and what output properties you need.

Pay particular attention to clip boundaries. Confirm that the recorded duration information reflects the source edits, and inspect any explicit duration directives. A wrong first clip is usually a list order or path issue; a transition that lands at an unexpected time may point to duration or timestamp handling. Keeping those symptoms separate makes troubleshooting more focused.

Finally, check the stream in YouTube’s Live Control Room and review the current health and encoder feedback. Verify the selected destination and private key, and confirm that the output settings match the current official recommendations for your chosen codec and resolution. YouTube states that streams under 12 hours are automatically archived; do not assume the same archive outcome for a longer broadcast, and check current Help guidance for your situation.

If keeping a local FFmpeg process running continuously is itself the fragile part of the workflow, that is a separate operational decision from ordering files. StreamNeo removes the need to leave your own computer on for this particular always-on file-to-YouTube workflow, while the playlist and content decisions remain yours. For a local setup, consider how the computer, source storage, and process will be supervised overnight; the mini PC cost discussion for a 24/7 YouTube channel covers one hardware-based operating choice.

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 order of file lines determine playback order?

Yes. The concat demuxer processes the entries in the order they appear in the FFconcat list. Review the exact playlist file used by the running FFmpeg process, since another copy of the list may have a different order.

Will the concat demuxer work with any product-demo videos?

No. The inputs need compatible stream layouts, codecs, and time bases for the demuxer to be suitable. If the sources differ, consider standardising them or using the concat filter when re-encoding is needed.

Why might a transition jump even when the list is ordered correctly?

The demuxer calculates the next file’s start from the preceding file’s duration, so inaccurate duration information can affect the boundary. Check the source duration and any duration directive, as well as stream compatibility.

Does the FFconcat list configure YouTube credentials?

No. It determines the input sequence, while the output configuration uses the server URL and stream key from YouTube Live Control Room. Keep the key private and consult YouTube’s current encoder guidance for output settings.

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