DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
Mountain View desk5 min

Fix FFmpeg Playlist File Paths for a YouTube Live Shop Promo on Ubuntu

Fix FFmpeg playlist errors on Ubuntu by resolving paths from the playlist’s location, using safe relative entries or trusted absolute paths with -safe 0, then checking media compatibility and YouTube’s ingest protocol.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If FFmpeg reports Unsafe file name, its concat demuxer is rejecting a playlist entry under its default path-safety rules. If it reports No such file or directory, the entry is not resolving to a readable file from the playlist’s effective location. Use safe relative paths where possible; for trusted absolute paths, put -safe 0 before -i. Then check media compatibility and YouTube’s ingest protocol separately: a path fix does not solve either one.

First identify which path problem you have

  • Unsafe file name: the concat demuxer’s default safe=1 validation is rejecting an entry. Absolute paths, protocol-like entries, or path components outside its permitted portable-character rules can trigger this.
  • No such file or directory: FFmpeg cannot find the file at the location implied by the playlist entry, or the name differs. The path may be relative to a different directory than you expect.
  • A different read or decode error: the path may resolve, but the file could be unreadable, damaged, or incompatible with the other clips. Diagnose those only after path resolution succeeds.

Make the playlist paths resolve

1. Put the playlist beside the promo clips

A persistent playlist stored beside its media makes safe relative paths straightforward. For example, if playlist.ffconcat, promo-01.mp4, and promo-02.mp4 are in /home/ubuntu/shop-promo/, the playlist can be:

As an Amazon Associate I earn from qualifying purchases.

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

Keep ffconcat version 1.0 as the first line when using this header. Each file directive names one input. With the default safety check enabled, use relative paths whose components meet FFmpeg’s safe-name rules: no protocol specification, no leading period in a component, and only the permitted portable characters. Simple names using letters, digits, underscores, and hyphens avoid many portability problems.

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

2. If the media is elsewhere, choose a deliberate path strategy

Either store the playlist where its relative entries make sense, or use absolute entries for files in another directory. For example:

ffconcat version 1.0
file '/home/ubuntu/shop-promo/promo-01.mp4'
file '/home/ubuntu/shop-promo/promo-02.mp4'

Absolute paths are rejected by the default safety check. For a playlist you created and trust, disable that check with -safe 0 as an input option before -i. This bypasses path screening; do not use it casually with a playlist whose contents come from an untrusted source.

3. Handle spaces and special characters using concat-script syntax

Quote or escape whitespace and special characters according to FFmpeg’s concat-script rules. The quotes in file 'promo-01.mp4' are part of that script syntax, not shell quoting. If a filename contains an embedded single quote, escape it using the concat demuxer’s quoting rules rather than assuming ordinary shell escaping will work. Renaming promo files to simple names can be the clearest way to avoid mistakes.

4. Check every entry and its permissions

  • Confirm each playlist name exactly matches a file, including capitalization and extension.
  • Confirm the files are in the directory implied by the paths.
  • Run FFmpeg as a Ubuntu user that can read both the playlist and every listed clip.
  • Use a persistent playlist file while diagnosing. Process substitution can give the playlist a temporary effective location, changing the base for relative paths; a path that worked beside a saved playlist may then fail.

Use the matching FFmpeg command

For a persistent playlist beside the clips with safe relative entries, an illustrative RTMP-shaped command is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ffmpeg -re -stream_loop -1 -f concat -i playlist.ffconcat -c copy -f flv "$YOUTUBE_RTMP_URL"

For a trusted playlist with absolute entries, use:

ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.ffconcat -c copy -f flv "$YOUTUBE_RTMP_URL"

-safe 0 must precede -i because it is an input option. These examples illustrate path handling and an RTMP-shaped output, not a tested, complete YouTube encoder configuration. Set the output URL and encoding to match the actual YouTube ingest method and source media. Keep the stream key private: do not paste it into public scripts, logs, or support posts.

Check media compatibility after paths work

The concat demuxer joins files by reading their streams; a valid path does not guarantee that the streams can be concatenated with -c copy. Inspect the clips’ stream layouts and codecs if FFmpeg errors after opening them. Stream-copy concat is suitable only when the streams are compatible. If they differ and need normalization or re-encoding, the concat filter is the more flexible route; it requires a filter-and-encoding workflow rather than simply changing the path or adding -safe 0.

Confirm whether YouTube ingest is RTMP or HLS

Do not apply HLS-specific output settings to an RTMP command just because both are YouTube ingest options. The examples above are RTMP-shaped. YouTube’s cited HLS requirements apply specifically when you select HLS ingestion: use TS segments, segment durations of 1–4 seconds, and a rolling playlist with no more than five outstanding segments. HLS also uses an HTTPS stream URL and has higher latency than continuous RTMP. Confirm the ingest protocol and configure its output accordingly; playlist path repair alone does not determine those settings.

Troubleshoot by symptom

Symptom Likely cause What to check or change
Unsafe file name An entry is outside the concat demuxer’s default safe-path rules. Prefer safe relative paths, or for a trusted playlist put -safe 0 before -i.
No such file or directory The entry does not resolve from the playlist’s effective location, or its name is wrong. Use a persistent playlist beside the clips, correct the relative path, or use the intended absolute path; check spelling and capitalization.
Paths work in a saved playlist but not with process substitution The playlist’s effective location changed, so its relative paths now have a different base. Use a persistent playlist file or rewrite entries for the effective playlist location.
FFmpeg opens files but fails while concatenating The media streams may not be compatible for stream-copy concat. Compare stream layouts and codecs; use the concat filter if re-encoding or normalization is required.
YouTube rejects the outgoing stream The output may not match the selected ingest protocol, or another ingest setting may be wrong. Check RTMP versus HLS before changing output settings. Apply the TS segment and rolling-playlist requirements only to HLS.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or let it run in the cloud

If the goal is to keep a pre-recorded shop promo looping on YouTube, StreamNeo is a cloud alternative to running FFmpeg on an Ubuntu machine: upload the video or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home; it plays uploaded videos, not a live camera feed. Every slot streams the upload as made, 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, once per account. The monthly option is $9.99 per month.

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

See StreamNeo or start the free first day.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.