Skip to content
streamneo.
Troubleshooting11 min read

How to Make an FFmpeg Playlist Skip Videos That Fail to Open

FFmpeg concat has no documented skip-on-open option. Preflight paths and media, build a filtered playlist, then check stream compatibility.

sn.
StreamNeoPublished 4 October 2026
Worth sharing?

If an FFmpeg concat playlist contains a missing or unreadable video, the concat demuxer has no documented option to skip that entry automatically and continue. The practical approach is to check the files before starting FFmpeg, write a new playlist containing only usable entries, then separately confirm that the remaining files have compatible streams.

That distinction matters: filtering out a file FFmpeg cannot open does not fix a codec, time-base or stream-layout mismatch in the files left behind. Treat preflight filtering as a workflow you build around FFmpeg, not as a built-in skip switch.

Understand what the concat demuxer does

The concat demuxer takes a script that lists media files and reads their contents in sequence. To the next stage of an FFmpeg command, their packets can appear as though they came from one concatenated input. The demuxer also adjusts timestamps across entries, which is why it is useful for a playlist-style input rather than simply joining file bytes.

A basic script looks like this:

ffconcat version 1.0
file '/media/first.mp4'
file '/media/second.mp4'
file '/media/third.mp4'

You would give that script to FFmpeg using the concat demuxer, for example:

ffmpeg -f concat -i playlist.ffconcat -c copy output.mp4

This example copies the packets rather than re-encoding them. That can be efficient, but it does not make dissimilar inputs interchangeable. The FFmpeg documentation says that all files must have the same streams, including the same codecs and time base. Other details of the media and intended output can matter too, so a successful read of each path is only an early check.

The demuxer is one of three mechanisms often called “concat”. The concat protocol presents resources as a byte stream and is appropriate only for formats that support file-level concatenation. The concat filter joins decoded streams in a filter graph and may be the appropriate route when inputs need to be re-encoded. The FFmpeg FAQ on concatenation methods describes these choices; they are not interchangeable ways to skip a broken item.

Why it does not skip failed entries

The concat script is an ordered input description. The documented demuxer options cover such matters as path safety, automatic conversion of certain bitstreams, and segment-time metadata. The current documented option list does not provide a setting that says, “if opening this file fails, ignore it and try the next one”. Check the documentation matching the FFmpeg build you actually use, since rolling documentation can change.

That means a failure part-way through opening or reading an entry should not be treated as a request to resume at the next line. Depending on when the error occurs and the command, FFmpeg may stop processing or report an error. Do not plan a continuous channel around hoping that an input-open error will be skipped cleanly.

Two options are particularly easy to misunderstand. -safe 0 relaxes the concat demuxer’s checks on accepted paths and directives; it does not make a missing file exist, grant operating-system permission to read it, or repair corrupt media. auto_convert is also not a general recovery feature: the FFmpeg documentation describes a specific H.264 MP4-to-Annex-B bitstream-filter conversion, not a way to skip failures or make arbitrary inputs compatible. See the official concat demuxer documentation for the option descriptions and confirm details for your installed version.

For an overnight broadcast, the useful mental model is simple: make the input list trustworthy before launching the long-running process. If you already manage recurring files by hand, this is similar to checking the source folder before scheduling the next loop. For the wider operational context, see this guide to queueing new uploads into a 24/7 playlist.

Check playlist paths and readability first

Start with the environment where FFmpeg will run. A path visible in your desktop file manager may not exist on a VPS, Raspberry Pi, container, or scheduled job. Relative paths are resolved from a working directory, which can differ between an interactive shell and a service. Prefer explicit paths in a generated playlist unless you have deliberately controlled the working directory.

For each row in the source playlist, check three separate things:

Check What it tells you What it does not tell you
Path exists The named file is present at that location That FFmpeg can read or parse it
Read permission The process account can access the file That the contents are valid media
Media probe FFmpeg can identify the media streams That streams are compatible with the other entries

A file can disappear between checking it and starting FFmpeg, especially if another process moves or replaces files. For a more reliable workflow, run the checks close to the time you generate the filtered playlist, and avoid changing the source folder until FFmpeg has opened its input. If your files are managed by a script, have that script record which rows it omitted and why, so you can find a mistaken path or permissions issue without inspecting a long log from the stream process.

“Readable” also depends on the account. If FFmpeg runs as a service user, checking the file as your personal login does not prove the service can read it. Check ownership and permissions for the account that launches FFmpeg, and check that it can traverse each parent directory. On removable or network-mounted storage, confirm that the mount is present before creating the playlist; a path can be syntactically correct while the expected volume is absent.

Keep the original playlist unchanged. Generate a separate output list so that a temporary outage, a moved file, or a permission fix does not erase the source order. A useful log line identifies the original entry and the reason it was excluded: “not found”, “not readable”, or “probe failed”. This gives you a clear distinction between a deliberate omission and a content-management mistake.

Probe media when parseability matters

A path check is cheap, but it only answers whether a file is there and accessible. A zero-byte file, truncated download, damaged container, or unsupported format can still exist and pass a basic filesystem check. If “skip videos that fail to open” means “skip any file FFmpeg cannot parse”, add a probe step before writing the final concat script.

FFprobe is distributed with FFmpeg and can report media streams and format information. A simple check can be run per file, such as:

ffprobe -v error -show_streams -show_format -of json "input.mp4"

A non-zero exit status or diagnostic output at error level is a reason to review or omit that entry, depending on your policy. This is a practical preflight convention, not a concat demuxer feature. Also decide what counts as acceptable: a file with video but no audio may be valid for a silent ambience channel, while a devotional loop expected to carry music may need an audio stream as well. Parsing alone cannot know your editorial intent.

For a reusable checker, avoid treating any successful probe as proof that the entire file will play from beginning to end. Probing is primarily a way to inspect the input and catch many opening or parsing problems; a late read error can still happen during a full run. If a file is important or has recently been copied, consider a separate validation pass that reads more of its contents, balanced against the extra time and disk activity. Do not invent a guarantee from a probe result.

Store the probe output or a short summary with the generated playlist. In a channel with mixed material, this helps you notice that an entry has an unexpected stream layout before you are troubleshooting a live output. If you convert variable-frame-rate material or otherwise prepare clips before looping, this guide to converting variable-frame-rate videos covers a related preparation stage; it does not replace checking paths or compatibility.

Build a filtered playlist

Generate the concat script from the source list instead of passing every original row straight through. Conceptually, the script should iterate in the intended order, test each path in the FFmpeg runtime environment, optionally run a probe, then write a file line only when the chosen checks pass. The exact implementation depends on your operating system and playlist format, but the policy should be explicit and repeatable.

Be careful with filenames containing apostrophes, newlines or other special characters. Concat scripts have their own quoting rules; writing a path by merely surrounding it with single quotes can produce a malformed script. Use the escaping rules in the FFmpeg documentation, or constrain and validate filenames in your content workflow. Do not “solve” a quoting problem by blindly enabling -safe 0: that option changes path acceptance, not escaping, media validity or stream compatibility.

It is useful to preserve the association between each source row and its output line. If a check fails, write the filename and reason to a separate report. Then review the report for patterns: a whole directory may have been mounted under a new path, or every file may have become unreadable after a permission change. If you silently remove every failed row, a stream may start with only one clip or an empty playlist, which is not necessarily a sensible recovery.

Choose what to do when no entries pass. In most cases, fail the playlist-generation step and alert whoever maintains the channel rather than launching FFmpeg with an empty or unexpectedly small input. Likewise, decide whether one failed probe should stop the whole preparation job or merely omit that file. Omitting is appropriate when continuity matters and the remaining approved clips make a coherent loop; stopping is safer when a missing file represents required news, a daily announcement, or another time-sensitive item.

The filtered list is a snapshot. If files can be replaced while the stream is running, a preflight check cannot protect a later reopen of a changed path. Avoid editing the active set in place, and regenerate and restart deliberately when you need to change the playlist. If you need to add uploads without rebuilding manually, this playlist automation guide discusses the broader queueing problem.

Check that remaining files have compatible streams

After filtering missing, unreadable or unparseable entries, inspect what remains. The concat demuxer expects matching streams across files, not merely a collection of files that all open. Compare the number and types of streams, codecs, time bases, and relevant media properties before assuming packet copying will work. The FFmpeg documentation’s requirement that files have the same streams is the key boundary here.

For example, imagine that a playlist contains four H.264 video files with AAC audio, plus one file that is missing. Preflight filtering can remove the missing row. If one of the four remaining files has no audio, a different video codec, or a mismatched time base, the open-failure problem is gone but a compatibility problem remains. You may need to prepare the inputs to a consistent format or use a concat-filter workflow that decodes and re-encodes; that choice has processing and quality trade-offs and should be tested with representative material.

Do not assume that auto_convert normalises all such differences. The documented automatic conversion is narrow, and it does not mean that FFmpeg will make arbitrary resolution, codec, audio or timing differences safe for stream copy. Similarly, inaccurate duration metadata can cause timestamp problems or visible and audible artefacts even when each file opens. If errors appear at clip boundaries, inspect durations and timestamps as well as stream descriptions.

A useful diagnostic order is: confirm the exact path and permissions, run a probe, then compare stream details among surviving entries. If the command reaches later files but output fails at a transition, focus on compatibility and duration metadata rather than continuing to alter path safety settings. For continuous operation from a machine that may disconnect, this separate guide explains FFmpeg reconnect behaviour for YouTube Live; reconnecting a network output is not a substitute for validating local media inputs.

Run FFmpeg with the validated list

Once the report looks right, point FFmpeg at the generated concat script. Keep the original playlist, filtered playlist, probe summaries and FFmpeg log together for that run. If the command fails, you can then distinguish a source-list issue from an input-open failure, a media parsing error, an incompatibility or an output connection issue.

Test the process with a short representative set before replacing a known-good channel playlist. Include examples with the types of audio and video you actually use, and inspect transitions as well as the beginning. A command that opens the first clip successfully says little about later entries. For a long-running channel, keep an eye on the process logs and on the resulting YouTube stream; successful playlist generation is a preparation check, not a promise that no later storage, process or network issue can occur.

If your arrangement depends on your own computer staying on and running the process, it is worth deciding whether that is an acceptable operating burden. StreamNeo can remove that specific need to keep a personal computer running by taking an uploaded video and running it as a 24/7 YouTube live stream after you provide the file and stream key. It does not change the need to make sure your media and channel are ready, and it is YouTube-only. For a self-managed path, compare the practical implications of running FFmpeg from a remote server with your own power, monitoring and maintenance arrangements.

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 FFmpeg skip a missing file in a concat playlist?

There is no documented concat-demuxer option in the reviewed option list that skips an entry when opening it fails. Check the documentation for your installed build, but the dependable approach is to create a filtered playlist before the main FFmpeg command starts.

Does -safe 0 make FFmpeg ignore files it cannot open?

No. It relaxes restrictions on which paths and directives the concat demuxer accepts. A missing file, inaccessible file or invalid media remains a separate problem.

If every file passes a probe, will concat work?

Not necessarily. A probe can help establish that FFmpeg can parse a file, but the remaining files still need compatible streams for the concat demuxer’s requirements. A late read problem or inaccurate duration metadata may also need separate investigation.

Should I use the concat protocol instead?

Not as a general skip mechanism. The concat protocol joins resources as a byte stream and is intended for formats that support file-level concatenation; the demuxer and concat filter serve different use cases. Choose the method based on your inputs and whether re-encoding is acceptable.

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