Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If FFmpeg reports Unsafe file name, the concat demuxer is rejecting a playlist entry under its default path-safety rules. If it reports No such file or directory, the entry probably does not resolve from the playlist’s effective location, or the filename is wrong. Keep the playlist beside the clips and use safe relative paths where possible; for intentional, trusted absolute paths, put -safe 0 before -i.

1. Identify which path problem FFmpeg reports

“Unsafe file name”

The concat demuxer defaults to safe=1. It rejects paths that are absolute, include a protocol specification, or contain components outside its portable-character rules (including components beginning with a period). This is a validation failure, not proof that the media file is missing.

“No such file or directory”

FFmpeg accepted the entry far enough to try opening it, but could not find the file at the path it resolved. Check the playlist’s location, spelling, capitalization, whitespace and permissions. On Ubuntu, filenames are case-sensitive.

2. Put the playlist and clips in a predictable layout

For a shop promo, a simple directory layout makes relative paths easy to reason about:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
/home/ubuntu/shop-promo/
├── playlist.ffconcat
├── promo-01.mp4
└── promo-02.mp4

Use a text playlist such as:

ffconcat version 1.0
file 'promo-01.mp4'
file 'promo-02.mp4'

The concat demuxer reads one file directive per input. With the playlist stored beside the clips, these entries are relative to that directory. If the clips are elsewhere, write paths relative to the playlist’s effective location, or use absolute paths with the safety option described below.

Check that each entry resolves

  1. Open the playlist and compare each filename character for character with the actual file, including capitalization and extension.
  2. Confirm every listed file exists and is readable by the same Ubuntu user who runs FFmpeg.
  3. Keep the playlist as a regular file in a known directory while diagnosing. Relative paths in a playlist delivered through process substitution may be based on a temporary path rather than the directory you expected.

3. Choose safe relative paths or trusted absolute paths

Approach Playlist entry What to do Trade-off
Relative paths file 'promo-01.mp4' Place the playlist beside the files, use permitted portable characters in every path component, and leave the default safety check enabled. More portable and keeps path screening on; the playlist location must remain predictable.
Absolute paths file '/home/ubuntu/shop-promo/promo-01.mp4' Add -safe 0 before the input option. Clear when clips live elsewhere, but disables concat path screening. Use only when you trust the playlist contents.

For relative paths, a complete illustrative command is:

ffmpeg -re -stream_loop -1 -f concat -i /home/ubuntu/shop-promo/playlist.ffconcat -c copy -f flv "$YOUTUBE_RTMP_URL"

For absolute entries, use the input option before -i:

ffmpeg -re -stream_loop -1 -f concat -safe 0 -i /home/ubuntu/shop-promo/playlist.ffconcat -c copy -f flv "$YOUTUBE_RTMP_URL"

These are illustrative RTMP-shaped command patterns, not tested commands or complete YouTube encoder configurations. The output format and codec settings must match your actual media and selected ingest protocol. Keep the ingest URL and stream key private; do not paste a real key into a public post or log.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quote names with spaces or special characters correctly

Concat playlists have their own quoting and escaping rules. Quote filenames containing spaces, and escape embedded single quotes according to FFmpeg’s concat-script syntax; do not assume shell quoting rules apply to the playlist text. If possible, renaming promo files to simple names using portable characters avoids unnecessary quoting errors.

4. Confirm the clips can be concatenated

Fixing a path only makes the input file reachable. It does not make the clips’ media streams compatible. The concat demuxer expects compatible streams; stream-copying with -c copy is appropriate only when their stream layouts and relevant media properties align.

If the clips do not align and need normalization or re-encoding, FFmpeg’s FAQ points to the concat filter. That is a different workflow from the concat demuxer playlist shown here, and it requires appropriate filter and encoder settings for the media you have.

5. Match the output to YouTube’s ingest protocol

Do not treat RTMP and HLS as interchangeable command formats. The example above uses an RTMP-shaped FLV output, but the title alone does not establish which protocol your YouTube Live setup uses. Check the ingest option selected for the broadcast and configure FFmpeg for that protocol.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If you selected YouTube HLS ingestion

YouTube’s HLS setup requirements are specific to HLS: use an HTTPS stream URL, TS segments lasting 1–4 seconds, a rolling playlist with no more than five outstanding segments, no byte ranges, HTTPS POST/PUT, and no encryption beyond HTTPS. YouTube says HLS has higher latency than continuous RTMP. These requirements do not establish settings for RTMP.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

6. Troubleshoot the remaining errors

Symptom Likely cause Fix
Unsafe file name An entry violates the default safe=1 path validation. Prefer safe relative paths. If absolute or otherwise unsafe paths are intentional and the playlist is trusted, use -safe 0 before -i.
No such file or directory The path is resolved from a different directory than expected, or the name does not match. Keep the playlist beside the clips or correct the entry for the playlist’s effective location; verify spelling and capitalization.
Permission denied or an unreadable input The Ubuntu account running FFmpeg cannot read the playlist or media file. Check file and directory read/traverse permissions for that same account.
The first clip opens, but concatenation fails later A later file may be missing, unreadable, or have incompatible streams. Check every playlist entry in order, then compare the clips’ stream layouts. Use a concat-filter workflow if re-encoding is needed.
Input works, but YouTube does not ingest it The output may not match the selected ingest protocol or its requirements. Confirm whether the broadcast is configured for RTMP or HLS; apply the HLS-specific requirements only when using HLS.

7. Run a YouTube Live shop promo with FFmpeg—or let it run in the cloud

For a local FFmpeg workflow, resolve the playlist path first, confirm the clips are compatible for stream copy (or adapt them with a filter and encoding workflow), then use output settings for the actual YouTube ingest protocol. The playlist-path fix does not replace YouTube’s copyright or monetization rules: use video and audio you have rights to stream, and do not assume that repeatedly playing promotional footage qualifies a channel for monetization.

Or let it run in the cloud

With StreamNeo, upload a recording or build a playlist, add your YouTube stream key once, and go live. StreamNeo loops uploaded videos from the cloud, so nothing has to stay on at home. Every slot streams the uploaded quality up to 4K 60fps at one flat price per slot, with no re-encode or quality tiers; it can automatically recover if YouTube drops the stream. The first day is free with no card. Monthly service is $9.99 per month. Start your free day with StreamNeo.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.