8000
Skip to content

Video title field name may cause a mismatch in exec commands on Windows #16412

@uruiamme

Description

@uruiamme

Checklist

Provide a description that is worded well enough to be understood

While I was working on an -exec command and finishing up, I discovered a bug in the handling of the filename, specifically the "Title" output template field name.

In most cases, ASCII text is used but should not be assumed. Somehow, I found a particular video title that breaks this convention by using a non-ASCII colon symbol. (:) instead of (:) - the latter one is the regular ASCII colon.

In %(title)s we would expect there to be an exact copy of whatever the Title of the video is, but this was not the case, and I can prove it.

So I was using an --exec command to match a filename, but it said "file not found." To report this bug, I replaced my --exec command with the dir /b command for simplicity, as it shows the failure to match.

So, apparently there has already been a replacement for the non-ASCII filename by the time the --exec runs, but since I need to utilize the files before they are deleted, I need their exact name on disk of course.

Look at the output of the first exec (which is the bug) and notice it is not the same as the second one and the third one that simply lists the 3 filenames on disk... and then it repeats the 3rd filename because yt-dlp appends the real filename to my CMD. The dir command is fine with this, hence the duplicated file.

The files on disk are actually using the non-ASCII colon. Final note: there is no difference with or without --windows-filenames

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

[debug] Command-line config: ['--windows-filenames', '-k', '-f', 'bv[height<=1080]+ba', '--exec', 'echo "%(title)s [%(id)s].%(ext)s"', '--exec', 'dir /b {}', '--exec', 'dir /b "Real Man*.*"', '-vU', '-i', '--', 'JyESBb0jMNo']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version master@2026.03.29.164733 from yt-dlp/yt-dlp-master-builds [2d7b27866] (win_exe)
[debug] Python 3.10.11 (CPython AMD64 64bit) - Windows-10-10.0.26200-SP0 (OpenSSL 1.1.1t  7 Feb 2023)
[debug] exe versions: ffmpeg N-123175-gcebe0b577e-20260305 (setts), ffprobe N-123175-gcebe0b577e-20260305, phantomjs 2.1.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.23.0, brotli-1.2.0, certifi-2026.02.25, curl_cffi-0.14.0, mutagen-1.47.0, requests-2.33.0, sqlite3-3.40.1, urllib3-2.6.3, websockets-16.0, yt_dlp_ejs-0.8.0
[debug] JS runtimes: deno-2.5.4
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Plugin directories: none
[debug] Loaded 1864 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-master-builds/releases/latest
Latest version: master@2026.03.29.164733 from yt-dlp/yt-dlp-master-builds
yt-dlp is up to date (master@2026.03.29.164733 from yt-dlp/yt-dlp-master-builds)
[debug] [youtube] [pot] PO Token Providers: none
[debug] [youtube] [pot] PO Token Cache Providers: memory
[debug] [youtube] [pot] PO Token Cache Spec Providers: webpo
[debug] [youtube] [jsc] JS Challenge Providers: bun (unavailable), deno, node (unavailable), quickjs (unavailable)
[youtube] Extracting URL: JyESBb0jMNo
[youtube] JyESBb0jMNo: Downloading webpage
[debug] [youtube] Forcing "main" player JS variant for player 4a6035e3
        original url = /s/player/4a6035e3/player_es6.vflset/en_US/base.js
[youtube] JyESBb0jMNo: Downloading android vr player API JSON
[debug] [youtube] JyESBb0jMNo: Detected experiment to bind GVS PO Token to video ID for web_safari client
[debug] [youtube] JyESBb0jMNo: Some web_safari client https formats have been skipped as they are missing a URL. YouTube is forcing SABR streaming for this client. See  https://github.com/yt-dlp/yt-dlp/issues/12482  for more details
[debug] Loading youtube-sigfuncs.4a6035e3-main-106 from cache
[youtube] JyESBb0jMNo: Downloading player 4a6035e3-main
[youtube] [jsc:deno] Solving JS challenges using deno
[debug] [youtube] [jsc:deno] Using challenge solver lib script v0.8.0 (source: python package, variant: minified)
[debug] [youtube] [jsc:deno] Using challenge solver core script v0.8.0 (source: python package, variant: minified)
[debug] [youtube] [jsc:deno] Running deno: 'C:\Download\deno.EXE' run --ext=js --no-code-cache --no-prompt --no-remote --no-lock --node-modules-dir=none --no-config --no-npm --cached-only -
[youtube] JyESBb0jMNo: Downloading m3u8 information
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec, channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[info] JyESBb0jMNo: Downloading 1 format(s): 399+251
[debug] Invoking http downloader on "https://rr2---sn-ca0xcpgq-hjps.googlevideo.com/videoplayback?expire=1775138921&ei=CSTOaczAKIWilu8PvanqyAc&ip=67.224.120.191&id=o-AKv6hk3IC3vzt-TMRSPKcybD4n4WKWhaCdeJAvsfxW0S&itag=399&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&cps=725&met=1775117321%2C&mh=WH&mm=31%2C29&mn=sn-ca0xcpgq-hjps%2Csn-q4flrnee&ms=au%2Crdu&mv=m&mvi=2&pl=23&rms=au%2Cau&initcwndbps=2495000&bui=AUUZDGLvbpme0qU2dNHtH4a1Uh1db8A3gU3wiHrB2P6b_1fgMmEjrbFyzkkV5SKAsGEJoSEKLgioM7td&spc=jlWavQPieZlwFztwMivxnWTxGSiiy35jaB_-zw-Dy1n3&vprv=1&svpuc=1&mime=video%2Fmp4&rqh=1&gir=yes&clen=16927112&dur=150.692&lmt=1775091176670958&mt=1775117103&fvip=1&keepalive=yes&fexp=51565115%2C51565681&c=ANDROID_VR&txp=443G534&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AHEqNM4wRQIhAIaAd6igS3ha4KNpUdoIIhoJWUjj27WidQkTMJOK83xQAiBE5Wwt-EBaq5d3rohGRkBp3d_ewyjHvreOrRQWW9BZfQ%3D%3D&lsparams=cps%2Cmet%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=APaTxxMwRQIgYSlu_kuelPHAa4_XHvGcBRLRpbwrzjctefB5ig133-YCIQDdR_5lCchGpQ20Ne23Kd28NbMCHHIn-oazyGZpviZKAw%3D%3D"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: Real Man Therapy: Therapeutic Solutions For Men That Really Work [JyESBb0jMNo].f399.mp4
[download] 100% of   16.14MiB in 00:00:02 at 6.79MiB/s
[debug] Invoking http downloader on "https://rr2---sn-ca0xcpgq-hjps.googlevideo.com/videoplayback?expire=1775138921&ei=CSTOaczAKIWilu8PvanqyAc&ip=67.224.120.191&id=o-AKv6hk3IC3vzt-TMRSPKcybD4n4WKWhaCdeJAvsfxW0S&itag=251&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&cps=725&met=1775117321%2C&mh=WH&mm=31%2C29&mn=sn-ca0xcpgq-hjps%2Csn-q4flrnee&ms=au%2Crdu&mv=m&mvi=2&pl=23&rms=au%2Cau&initcwndbps=2495000&bui=AUUZDGLvbpme0qU2dNHtH4a1Uh1db8A3gU3wiHrB2P6b_1fgMmEjrbFyzkkV5SKAsGEJoSEKLgioM7td&spc=jlWavQPieZlwFztwMivxnWTxGSiiy35jaB_-zw-Dy1n3&vprv=1&svpuc=1&xtags=acont%3Doriginal%3Alang%3Den-US&mime=audio%2Fwebm&rqh=1&gir=yes&clen=2574776&dur=150.721&lmt=1775089203270369&mt=1775117103&fvip=1&keepalive=yes&fexp=51565115%2C51565681&c=ANDROID_VR&txp=3308224&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cxtags%2Cmime%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AHEqNM4wRQIhAPdlFg-tLS0aX_4q-Vt2kNsppA8ZgIJVOC1Zkb4IXTS4AiBqMgBcrr1oKSS2m-5CXgkgzkTDKOISftD0aYCAOo1ENg%3D%3D&lsparams=cps%2Cmet%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=APaTxxMwRQIgYSlu_kuelPHAa4_XHvGcBRLRpbwrzjctefB5ig133-YCIQDdR_5lCchGpQ20Ne23Kd28NbMCHHIn-oazyGZpviZKAw%3D%3D"
[download] Destination: Real Man Therapy: Therapeutic Solutions For Men That Really Work [JyESBb0jMNo].f251.webm
[download] 100% of    2.46MiB in 00:00:00 at 7.37MiB/s
[Merger] Merging formats into "Real Man Therapy: Therapeutic Solutions For Men That Really Work [JyESBb0jMNo].webm"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i "file:Real Man Therapy: Therapeutic Solutions For Men That Really Work [JyESBb0jMNo].f399.mp4" -i "file:Real Man Therapy: Therapeutic Solutions For Men That Really Work [JyESBb0jMNo].f251.webm" -c copy -map 0:v:0 -map 1:a:0 -movflags +faststart "file:Real Man Therapy: Therapeutic Solutions For Men That Really Work [JyESBb0jMNo].temp.webm"
[Exec] Executing command: echo "Real Man Therapy: Therapeutic Solutions For Men That Really Work [JyESBb0jMNo].webm"
"Real Man Therapy: Therapeutic Solutions For Men That Really Work [JyESBb0jMNo].webm"
[Exec] Executing command: dir /b "C:\Download\Real Man Therapy: Therapeutic Solutions For Men That Really Work [JyESBb0jMNo].webm"
Real Man Therapy: Therapeutic Solutions For Men That Really Work [JyESBb0jMNo].webm
[Exec] Executing command: dir /b "Real Man*.*" "C:\Download\Real Man Therapy: Therapeutic Solutions For Men That Really Work [JyESBb0jMNo].webm"
Real Man Therapy: Therapeutic Solutions For Men That Really Work [JyESBb0jMNo].f251.webm
Real Man Therapy: Therapeutic Solutions For Men That Really Work [JyESBb0jMNo].f399.mp4
Real Man Therapy: Therapeutic Solutions For Men That Really Work [JyESBb0jMNo].webm
Real Man Therapy: Therapeutic Solutions For Men That Really Work [JyESBb0jMNo].webm

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0