Skip to content
streamneo.
Use Cases13 min read

How to Stream an FFmpeg Playlist to YouTube with a Static Image Between Videos

Build an FFmpeg playlist with timed still images, check media compatibility, and match the output to YouTube Live settings.

sn.
StreamNeoPublished 4 October 2026
Worth sharing?

The reliable way to stream an FFmpeg playlist with a static image between videos is to build the complete timeline first, then encode that timeline in a format YouTube Live accepts. The image must become a timed video segment, not merely a file that FFmpeg happens to read alongside the playlist.

There is no single universal command for every set of files. Your choice depends on whether the videos have compatible streams, whether you can re-encode, how long the image should remain, and which resolution, frame rate and codec you send to YouTube.

Plan the playlist and still-image timeline

Start with the programme, not the command. Write down the order of the video files and decide where the still image appears. If every clip should be followed by the same image, your timeline might be:

video 1 → still image → video 2 → still image → video 3

You still need to decide what happens after the final video. The image might follow the final item as well, or the playlist might return directly to the first video. That is an editorial choice, and it affects how you construct the last segment.

Choose the still duration before you test. A devotional channel might show a deity image while the next bhajan is prepared. A local news loop might use a short branded slate between reports. A study channel might use a longer break card. The correct duration is the one that suits the programme, rather than a value imposed by FFmpeg or YouTube.

It helps to sketch the timeline in a small table before touching the filter graph:

Position Segment Purpose Duration decision
1 Video file Main programme Use the file duration
2 Still image Transition or information card Choose explicitly
3 Video file Next programme item Use the file duration
4 Still image Repeat transition Use the same or a different duration

This separation prevents a common mistake: treating “playlist playback” and “image insertion” as one problem. The playlist determines sequence. The still image adds a new segment to that sequence. The output settings then determine whether YouTube can decode the resulting live feed.

Also decide whether the image needs audio. A silent visual segment can be given matching silent audio in the output, or the preceding audio can be allowed to continue if that suits the programme. Do not leave this accidental. Audio gaps, repeated music or a sudden format change are easier to spot when you define the intended behaviour first.

If your broader goal is a continuously repeating programme, the guidance in how to stream a playlist on YouTube Live 24/7 covers the operational shape of a long-running loop. This article concentrates on constructing the FFmpeg timeline and inserting the still.

Check whether playlist files are compatible

Before choosing a concat method, inspect every video. Compare the number of video and audio streams, codecs, frame sizes, frame rates, audio sample rates, channel layouts and time bases. Duration metadata matters as well.

FFmpeg’s concat demuxer documentation describes a file-list method that reads inputs in order. It expects the relevant streams to be compatible, including matching stream properties such as codecs and time bases. It also uses file duration information when adjusting timestamps, so incorrect duration metadata can lead to gaps, overlaps or other artefacts.

This means that two files both labelled “MP4” are not necessarily suitable for direct concatenation. The container is only one part of the file. One clip may be 1920×1080 H.264 with stereo AAC at one sample rate, while another may use a different frame rate, audio layout or time base. They may play normally by themselves and still be a poor match for stream copying.

Make an inventory with a probing tool such as ffprobe, or inspect the files in an editor that exposes media details. Record at least:

  • video codec and pixel dimensions
  • frame rate and whether it is constant or variable
  • audio codec, sample rate and channel layout
  • number of streams in each file
  • reported duration and whether any file has unusual timestamp behaviour

Do not assume that changing a filename or placing different files in one list makes them compatible. If the properties do not line up, the concat demuxer may not fit without normalising or re-encoding the material.

This is also where you should find missing audio. If some clips contain video only and others contain video plus audio, you need to decide whether to add silent audio to the video-only material or construct a filter graph that handles the difference. A continuous YouTube output is simpler when every timeline segment has a deliberate video and audio representation.

For a practical comparison of long-running input problems, see why does my 24/7 YouTube lofi stream keep stopping. The same principle applies here: a file that works during a short manual test is not necessarily a good unattended input.

Choose the concat demuxer or concat filter

The concat demuxer is attractive when the playlist files already have compatible streams and you want to avoid another encode. You provide a list of files in the required format, and FFmpeg reads them sequentially. In that situation, the demuxer can be efficient because it is joining compatible media rather than transforming every frame.

That efficiency has a boundary. It is not a way to join arbitrary files without re-encoding. If the streams differ, if the image needs to be converted to the same video properties, or if you need to adjust frame rates, dimensions or audio, stream copying may no longer be appropriate.

The concat filter is the route to consider when re-encoding is required. FFmpeg’s filter documentation describes a filter-based approach for joining streams in a filter graph. It gives you more control over normalising the inputs and placing a generated segment into the timeline, but it also means that the output must be encoded.

The trade-off is straightforward:

Method Best fit Main limitation What to validate
Concat demuxer Compatible files where avoiding re-encoding matters Strict stream compatibility Codecs, streams, time bases and duration metadata
Concat filter Inputs that need transformation or a constructed timeline Requires an encode and a carefully built graph Dimensions, frame rate, audio, segment lengths and timestamps
Intermediate normalised files A repeatable workflow with mixed source material Extra storage and a preparation step That every normalised file uses the same output properties

There is no need to force one method across every project. If your files already match, the demuxer may be the cleaner choice for the video-only portion. If the still image or mixed source properties make a common timeline necessary, the filter route or a set of normalised intermediate files may be easier to reason about.

The important distinction is that playlist construction and output compatibility are separate decisions. A playlist can be logically correct and still fail because its streams cannot be joined. Conversely, technically compatible clips can still produce an awkward programme if the still is not given a real duration.

Represent the still as a timed video segment

An ordinary image has no natural video duration. To place it between moving clips, treat it as a video segment with an explicit start and end in the timeline. FFmpeg documents image input and looping options in its image2 demuxer documentation, but looping an image alone does not define the complete playlist or interstitial arrangement.

In practice, the still segment needs properties that can join the surrounding timeline. That usually means deciding its dimensions, pixel format, frame rate and duration, then making sure its audio behaviour is also defined. If the image is smaller than the programme frame, you may need to scale or pad it. If it has a different aspect ratio, decide whether to crop, letterbox or use a designed image at the target dimensions.

A useful mental model is:

image input → repeated video frames → explicit duration → timeline segment

The segment can then be placed between the video segments using a compatible concat method. If the surrounding files need transformations, the concat filter is relevant because the filter graph can normalise the inputs and join the resulting segments before encoding.

The exact graph depends on your files. For example, a still may need a generated silent audio stream while a video clip already contains audio. Alternatively, you may want a short music bed under the image. Those choices change the inputs and labels in the graph. A command copied from an unrelated set of files may fail, produce a duration mismatch or create unwanted silence.

For that reason, do not present a fixed command as a universal recipe for inserting a timed still after every playlist item. The official FFmpeg pages explain the concat mechanisms and image input, but they do not provide one complete, tested recipe for every such playlist. Build and validate the timeline against your own stream layout.

Use a short representative set first: one video, one still, and a second video. Confirm that the image lasts for the intended period, that the second video starts afterwards, and that the audio does not drift. Once that small timeline behaves correctly, extend it to the full playlist.

Match the output to YouTube ingest requirements

After the timeline is correct, configure the output for YouTube Live rather than for ordinary file playback. YouTube’s current live encoder settings describe supported live protocols and codecs, frame-rate guidance, constant bitrate encoding and keyframe requirements. YouTube recommends RTMPS for encrypted ingest where available.

The page currently lists H.264, H.265 and AV1 video options, frame rates up to 60 fps, and AAC or MP3 audio. For a conventional SDR workflow, H.264 with AAC is a familiar choice, but the appropriate setting still depends on your target resolution, frame rate and available upload connection.

YouTube recommends a keyframe interval of 2 seconds and says it should not exceed 4 seconds. It also publishes bitrate guidance by codec, resolution and frame rate. Do not copy a number without its context. For example, the current live encoder table gives H.264 recommendations of 14 Mbps for 1080p at 30 fps and 17 Mbps for 1080p at 60 fps. Those are YouTube’s published recommendations for those combinations, not measurements of your FFmpeg process.

The same guidance gives 8 Mbps as an H.264 recommendation for both 720p at 30 fps and 720p at 60 fps in the relevant table. Check the live page again before publishing because help pages and recommendations can change. YouTube also lists 128 Kbps stereo AAC as advanced audio guidance.

You will need the stream URL and stream key from YouTube Live Control Room. Keep the key private and insert your own account-specific value into the output configuration. YouTube’s help for creating and managing live streams explains where these values are managed.

YouTube also recommends leaving 20% upload bandwidth headroom above the stream bitrate. A home connection that is just sufficient on paper may become unreliable when another device uploads, when the connection changes route, or when the encoder briefly behaves differently. Measure the sustained connection that will carry the feed, not only a short speed-test result.

If the stream is running from a remote machine, check the process and display path as well as the network. A black output can come from an input or filter problem rather than from YouTube. The troubleshooting steps in how to fix a black screen on a YouTube stream running from a VPS are relevant when the encoded feed is not showing the expected picture.

Test transitions, duration and audio

YouTube’s own guidance says, “Make sure to test before you start your live stream.” Treat that as part of the build, not as an optional check after you have announced the broadcast.

Run a private or otherwise appropriate test with the same representative material and output settings you intend to use. Watch the actual YouTube preview and stream-health messages, not only FFmpeg’s local console. A local process can report that it is reading files while the destination receives an unsuitable or interrupted feed.

Check each transition closely. Confirm that the final frame of one video is followed by the still, that the still remains visible for the intended duration, and that the next video starts at the expected point. A one-second error may be easy to miss in a short test but noticeable when the same interstitial repeats throughout a devotional or music channel.

Listen for these audio problems:

  • a pause where you expected continuous audio
  • the previous clip’s audio continuing under the still unexpectedly
  • a sudden change in loudness between files
  • duplicated or missing audio at a boundary
  • a channel-layout change that causes one side to disappear

Also test a file with motion, a file with quiet audio and a file near the longest expected duration. Duration metadata errors can affect later timestamps, so do not test only with clips that all happen to have simple, similar lengths.

If the output is being re-encoded, watch CPU use, memory use and the rate at which frames are processed. A timeline that works for a brief sample may not remain stable for hours if the selected resolution, frame rate and encoder settings are too demanding for the machine. If you are using a VPS, also account for sustained network capacity and the provider’s terms rather than assuming a short trial proves long-run suitability.

Monitor the continuous feed

A playlist that reaches YouTube is not finished when the first video appears. Continuous channels need a way to detect a stalled process, a dropped connection, a failed input or a transition that produces no usable frames.

YouTube’s streaming tips recommend monitoring stream health and messages during the event. Keep the Live Control Room open during the initial run, especially when the first still image and the first return to video occur. Look for warnings about bitrate, connection quality, dropped frames or the incoming format.

On the encoding side, keep logs and record which input was playing when a problem occurred. If the process stops at one particular file, inspect that file rather than repeatedly restarting the whole playlist without evidence. If every transition fails, inspect the timeline construction and the audio/video stream mapping.

For a computer that must stay on and connected, the operational burden includes restarts, updates, power interruptions and accidental closure of the process. Why does OBS stop streaming to YouTube after a few hours discusses several failure patterns that also matter when the long-running encoder is FFmpeg rather than OBS.

If you do not want your own computer to remain on for the entire broadcast, StreamNeo removes the specific need to keep the playlist encoder running locally: upload the prepared file, provide your YouTube stream key, and let the cloud service run and restart the broadcast while your computer is switched off. It is still your responsibility to check the media rights, channel settings and YouTube’s current requirements.

Wherever the process runs, keep a copy of the source files and the timeline notes. If you replace one clip, you should know whether its streams still match the rest of the playlist and whether the revised duration changes the point at which the next still begins.

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

Can I use the concat demuxer with any MP4 files?

No. The container name does not prove that the streams are compatible. Check the codecs, stream layout, time bases, dimensions, frame rates, audio properties and duration metadata before relying on the demuxer.

Can I add a still image with a loop option alone?

A looped image input creates repeated image frames, but it does not by itself define where the still belongs in the playlist or how long it remains there. You need to represent it as a timed video segment and combine it with the other segments using a method suited to their stream properties.

Should I use the concat filter or demuxer?

Use the demuxer when compatible inputs can be joined and avoiding re-encoding is useful. Consider the concat filter when the files or still segment need scaling, frame-rate changes, audio construction or other transformations that require an encode.

What should I check before making the stream public?

Run a private or otherwise appropriate test and watch the YouTube preview, stream health and messages. Verify the still duration, transitions, audio continuity, keyframe interval, bitrate, sustained upload headroom and the behaviour of the process over the length of a representative run.

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 Use Cases guides ↗ · All topics ↗