Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

struggling to find the right stage for --print-to-file comments #6939

Closed
9 tasks done
chrizilla opened this issue Apr 28, 2023 · 19 comments
Closed
9 tasks done

struggling to find the right stage for --print-to-file comments #6939

chrizilla opened this issue Apr 28, 2023 · 19 comments
Labels
question Question

Comments

@chrizilla
Copy link

chrizilla commented Apr 28, 2023

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Please make sure the question is worded well enough to be understood

Could you please tell me what I am doing wrong? I'm trying different stages for --print-to-file but none of them work:

after_video

--parse-metadata "before_dl:filename:(?P<download_dir>.*\\\)"
--print-to-file "after_video:%(comments|)j" "%(download_dir)s\!nfo\%(comment_count|[aborted])s comments.json"

This
✔️ successfully creates a file with filename 84 comments.json with 84 comments but
❌ in the wrong place: C:\downloads\~~\!nfo instead of C:\downloads\2012-10-02 youtube-dl test video\!nfo

log
yt-dlp test:youtube
[debug] Command-line config: ['test:youtube']
[debug] Portable config "c:\hp\-\!portableapps\yt-dlp\yt-dlp.conf": ['--verbose', '--no-playlist', '--format-sort', 'hasvid,ie_pref,quality,res,hdr,codec,size,br,asr,ext,fps,hasaud,lang,source,proto,id', '-F', '-f', 'bestvideo*+bestaudio/best', '-f-', '--paths', 'c:\\hp\\-\\#YT', '--ffmpeg-location', '.\\helpertools\\FFmpeg\\bin', '--no-simulate', '--no-quiet', '--progress', '--parse-metadata', '%(is_live)s:(?P<islive>True)', '--parse-metadata', '%(was_live)s:(?P<waslive>True)', '--alias', 'set-output', '-o {}".\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\%(playlist_index|)02d%(playlist_index& = |)s%(release_timestamp>%Y-%m-%d,release_date>%Y-%m-%d,modified_date>%Y-%m-%d,modified_timestamp>%Y-%m-%d,upload_date>%Y-%m-%d,upload_timestamp>%Y-%m-%d,timestamp>%Y-%m-%d,release_year,epoch>DL %Y-%m-%d [%H.%M.%S])s %(alt_title,title).100B%(alt_title.101B,title.101B&…|)s\\\\"{}', '--set-output', '', '%(title).120B%(title.121B&…|)s [%(extractor)s.%(islive&live.|)s%(id)s] {%(format_id)s}.%(ext)s', '--set-output', 'subtitle:', 'subs\\%(title).120B%(title.121B&…|)s [%(extractor)s.%(islive&live.|)s%(id)s] {%(format_id)s}.%(ext)s', '--set-output', 'infojson:', 'tech\\metadata.%(ext)s', '--set-output', 'link:', 'tech\\link.%(ext)s', '--set-output', 'description:', '!nfo\\synopsis.%(ext)s', '--set-output', 'annotation:', '!nfo\\annotations.%(ext)s', '--set-output', 'thumbnail:', 'thumbs\\thumb.%(ext)s', '--alias', 'set-pl_output', '-o {}".\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\\\"{}', '--set-pl_output', 'pl_infojson:', 'playlist metadata.%(ext)s', '--set-pl_output', 'pl_description:', 'playlist description.%(ext)s', '--set-pl_output', 'pl_thumbnail:', 'folder.%(ext)s', '--set-pl_output', 'pl_video:', '%(playlist_title,playlist|).120B%(playlist_title.121,playlist.121&…|)s [%(extractor)s.%(islive&live.|)s%(id)s] {%(format_id)s}.%(ext)s', '--output-na-placeholder', '~~', '--write-info-json', '--write-description', '--write-annotations', '--write-playlist-metafiles', '--get-comments', '--write-link', '--write-url-link', '--write-desktop-link', '--no-overwrites', '--no-post-overwrites', '--merge-output-format', 'mkv', '--remux-video', 'mkv', '--list-subs', '--write-subs', '--write-auto-subs', '--all-subs', '--sub-langs', 'all', '--extractor-args', 'youtube:skip=translated_subs', '--sub-format', 'all/ttml/vtt/best', '--list-thumbnails', '--write-thumbnail', '--write-all-thumbnails', '--embed-metadata', '--embed-chapters', '--no-embed-info-json', '--no-check-certificate', '--retries', 'inf', '--file-access-retries', 'inf', '--fragment-retries', 'inf', '--retry-sleep', 'exp=1', '--retry-sleep', 'http,fragment,file_access,extractor:exp=1', '--no-skip-unavailable-fragments', '--geo-bypass', '--audio-multistreams', '--print', 'pre_process:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: pre_process ===================================================================\r\n', '--print', 'after_filter:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: after_filter ===================================================================\r\n', '--print', 'video:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: video ===================================================================\r\n', '--print', 'before_dl:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: before_dl ===================================================================\r\n', '--print', 'post_process:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: post_process ===================================================================\r\n', '--print', 'after_move:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: after_move ===================================================================\r\n', '--print', 'after_video:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: after_video ===================================================================\r\n', '--print', 'playlist:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: playlist ===================================================================\r\n', '--parse-metadata', 'video::(?P<comments>)', '--parse-metadata', 'video::(?P<formats>)', '--parse-metadata', 'video::(?P<thumbnails>)', '--parse-metadata', 'before_dl:filename:(?P<download_dir>.*\\\\)', '--print-to-file', 'after_video:%(comments|)j', '%(download_dir)s\\!nfo\\%(comment_count|[aborted])s comments.json', '--exec', 'pre_process:cd %(download_dir)q && IF EXIST !nfo ren !nfo !nfo.old & IF EXIST tech ren tech tech.old', '--alias', 'print-factsheet', '--print-to-file {} ".\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\%(playlist_index|)02d%(playlist_index& = |)s%(release_timestamp>%Y-%m-%d,release_date>%Y-%m-%d,modified_date>%Y-%m-%d,modified_timestamp>%Y-%m-%d,upload_date>%Y-%m-%d,upload_timestamp>%Y-%m-%d,timestamp>%Y-%m-%d,release_year,epoch>DL %Y-%m-%d [%H.%M.%S])s %(alt_title,title).100B%(alt_title.101B,title.101B&…|)s\\tech\\factsheet.nfo"', '--print-to-file', '%(requested_formats)j', '.\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\%(playlist_index|)02d%(playlist_index& = |)s%(release_timestamp>%Y-%m-%d,release_date>%Y-%m-%d,modified_date>%Y-%m-%d,modified_timestamp>%Y-%m-%d,upload_date>%Y-%m-%d,upload_timestamp>%Y-%m-%d,timestamp>%Y-%m-%d,release_year,epoch>DL %Y-%m-%d [%H.%M.%S])s %(alt_title,title).100B%(alt_title.101B,title.101B&…|)s\\tech\\AV info.json', '--print-to-file', '%(chapters|)j', '.\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\%(playlist_index|)02d%(playlist_index& = |)s%(release_timestamp>%Y-%m-%d,release_date>%Y-%m-%d,modified_date>%Y-%m-%d,modified_timestamp>%Y-%m-%d,upload_date>%Y-%m-%d,upload_timestamp>%Y-%m-%d,timestamp>%Y-%m-%d,release_year,epoch>DL %Y-%m-%d [%H.%M.%S])s %(alt_title,title).100B%(alt_title.101B,title.101B&…|)s\\!nfo\\chapters.json', '--exec', '..\\curl\\bin\\curl.exe --insecure "%(webpage_url,original_url)s" -o ".\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\%(playlist_index|)02d%(playlist_index& = |)s%(release_timestamp>%Y-%m-%d,release_date>%Y-%m-%d,modified_date>%Y-%m-%d,modified_timestamp>%Y-%m-%d,upload_date>%Y-%m-%d,upload_timestamp>%Y-%m-%d,timestamp>%Y-%m-%d,release_year,epoch>DL %Y-%m-%d [%H.%M.%S])s %(alt_title,title).100B%(alt_title.101B,title.101B&…|)s\\!nfo\\home.html"', '--exec', 'post_process:.\\helpertools\\FFmpeg\\bin\\ffprobe -show_entries stream=start_time %(filepath)q', '--print-factsheet', '%(playlist&--------------- PLAYLIST -------------------------------|)s%(playlist&\r\nplaylist_title:       |)s%(playlist_title|)s%(playlist&\r\nplaylist:             |)s%(playlist|)s%(playlist&\r\nplaylist_id:          |)s%(playlist_id|)s%(playlist&\r\nplaylist uploader:    |)s%(playlist_uploader|)s%(playlist&\r\nplaylist uploader id: |)s%(playlist_uploader_id|)s%(playlist&\r\nplaylist index:       |)s%(playlist_index&{} / |)s%(playlist_count|)s%(playlist&\r\nplaylist autonumber:  |)s%(playlist_autonumber&{} / |)s%(n_entries|)s%(playlist&\r\n---------------------------------------------------------|)sfilename:               %(filename|)s\r\n---------------- TITLE ----------------------------------\r\ntitle:                  %(title|)s\r\nfulltitle:              %(fulltitle|)s\r\nalt title:              %(alt_title|)s\r\ncategories:             %(categories|)l\r\ntags:                   %(tags|)l\r\n---------------- WWW ------------------------------------\r\nid:                     %(id|)s\r\ndisplay id:             %(display_id|)s\r\noriginal url:           %(original_url|)s\r\nwebpage url:            %(webpage_url|)s\r\nprotocol:               %(protocol|)s\r\nextractor:              %(extractor|)s\r\nextractor key:          %(extractor_key|)s\r\n---------------- TIME ----------------------------------\r\nlocation:               %(location|)s\r\nlive status:            %(live_status|)s (islive:%(islive&yes|no)s, waslive:%(waslive&yes|no)s)\r\nreleased:               %(release_timestamp>%Y-%m-%d %H:%M,release_date>%Y-%m-%d,release_year|)s\r\nlast modified:          %(modified_timestamp>%Y-%m-%d %H:%M,modified_date>%Y-%m-%d|)s\r\nuploaded:               %(upload_timestamp>%Y-%m-%d %H:%M,upload_date>%Y-%m-%d|)s\r\nbecame available:       %(timestamp>%Y-%m-%d %H:%M|)s\r\ndownload start:         %(epoch>%Y-%m-%d %H:%M:%S)s UTC\r\n   runtime:             %(duration>%H:%M:%S,duration_string|)19s\r\nstart time:             %(start_time>%H:%M:%S|)19s\r\n  end time:             %(end_time>%H:%M:%S|)19s\r\n---------------- A/V -----------------------------------\r\nformat id:              %(format_id|)s\r\nformat:                 %(format|)s\r\nformat note:            %(format_note|)s\r\nhas DRM:                %(has_drm,_has_drm|-)s / %(requested_formats.0.has_drm|)s / %(requested_formats.1.has_drm|)s\r\naudio bitrate:          %(abr|)4d KBit/s\r\nvideo bitrate:          %(vbr|)4d KBit/s\r\na/v bitrate:            %(tbr|)4d KBit/s\r\nfilesize:               %(filesize&{:,} bytes|)s%(filesize_approx&~{:,} bytes|)s\r\next:                    %(ext|)s%(container& / {}|)s\r\n--------------- VIDEO ----------------------------------\r\nvcodec:                 %(vcodec|)s\r\nresolution:             %(width|)s*%(height|)s\r\naspect ratio:           %(aspect_ratio|)s\r\nstretched ratio:        %(stretched_ratio|)s\r\nframe rate:             %(fps|)s fps\r\ndynamic range:          %(dynamic_range|)s\r\n--------------- AUDIO ----------------------------------\r\nacodec:                 %(acodec|)s\r\nasr:                    %(asr|)s Hz\r\naudio channels:         %(audio_channels|)s\r\nlanguage:               %(language&{} |)s%(requested_formats.0.language&{} |)s%(requested_formats.1.language&{} |)s%(requested_formats.2.language&{} |)s%(requested_formats.3.language&{} |)s%(requested_formats.4.language&{} |)s%(requested_formats.5.language&{} |)s\r\n-------------- web 2.0 ---------------------------------\r\naverage rating:         %(average_rating|)s\r\nage limit:              %(age_limit|)s\r\nviewcount:              %(view_count&{} views|)16s\r\nconcurrent views:       %(concurrent_view_count&{} views|)16s\r\nlikes:                  %(like_count&{} likes|)16s%(dislike_count& / {} dislikes|)s\r\nreposts:                %(repost_count&{} reposts|)18s\r\ncomments:               %(comment_count&{} comments|)19s\r\n-------------- source ----------------------------------\r\ncreator:                %(creator|)s\r\nuploader:               %(uploader|)s\r\nuploader id:            %(uploader_id|)s\r\nchannel:                %(channel|)s\r\nchannel id:             %(channel_id|)s\r\nchannel followers:      %(channel_follower_count&{} followers|)s\r\navailability:           %(availability|)s\r\nlicense:                %(license|)s\r\nURLs:\r\n%(urls,url|)s']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2023.04.28.193828 [f005a35aa] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-110185-gb564ad8eac-20230407 (setts), ffprobe N-110185-gb564ad8eac-20230407
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.2
[debug] Proxy map: {}
[debug] Loaded 1810 extractors
[TestURL] Extracting URL: test:youtube
[TestURL] Test URL: https://www.youtube.com/watch?v=BaW_jenozKc&t=1s&end=9
[youtube] Extracting URL: https://www.youtube.com/watch?v=BaW_jenozKc&t=1s&end=9
[youtube] BaW_jenozKc: Downloading webpage
[youtube] BaW_jenozKc: Downloading android player API JSON
[info] BaW_jenozKc: Downloading subtitles: en
[debug] Sort order given by user: hasvid, ie_pref, quality, res, hdr, codec, size, br, asr, ext, fps, hasaud, lang, source, proto, id
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, hdr, vcodec, acodec, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, fps, hasaud, lang, source, proto, id, channels
[debug] Searching for '(?P<islive>True)' in '%(is_live)s'
[MetadataParser] Could not interpret '%(is_live)s' as '(?P<islive>True)'
[debug] Searching for '(?P<waslive>True)' in '%(was_live)s'
[MetadataParser] Could not interpret '%(was_live)s' as '(?P<waslive>True)'
[Exec] Executing command: cd "~~" && IF EXIST !nfo ren !nfo !nfo.old & IF EXIST tech ren tech tech.old
Das System kann den angegebenen Pfad nicht finden.

========================================================= 2023-04-28 [20:09:19] ========== stage: pre_process ===================================================================

ERROR: Preprocessing: Command returned error code 1
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 3504, in pre_process
  File "yt_dlp\YoutubeDL.py", line 3494, in run_all_pps
  File "yt_dlp\YoutubeDL.py", line 3473, in run_pp
  File "yt_dlp\postprocessor\common.py", line 24, in run
  File "yt_dlp\postprocessor\exec.py", line 33, in run
yt_dlp.utils.PostProcessingError: Command returned error code 1

[youtube] Downloading comment section API JSON
[youtube] Downloading ~84 comments
[youtube] Sorting comments by newest first
[youtube] Downloading comment API JSON page 1 (0/84)
[youtube] Downloading comment API JSON page 2 (20/84)
[youtube]     Downloading comment API JSON reply thread 1 (25/84)
[youtube]     Downloading comment API JSON reply thread 2 (34/84)
[youtube]     Downloading comment API JSON reply thread 3 (37/84)
[youtube]     Downloading comment API JSON reply thread 4 (39/84)
[youtube] Downloading comment API JSON page 3 (51/84)
[youtube]     Downloading comment API JSON reply thread 1 (54/84)
[youtube]     Downloading comment API JSON reply thread 2 (57/84)
[youtube]     Downloading comment API JSON reply thread 3 (60/84)
[youtube]     Downloading comment API JSON reply thread 4 (68/84)
[youtube]        Downloading comment replies API JSON page 1 (78/84)
[youtube] Extracted 84 comments

========================================================= 2023-04-28 [20:09:19] ========== stage: after_filter ===================================================================

[info] Available thumbnails for BaW_jenozKc:
ID Width   Height  URL
0  unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/3.jpg
1  unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/3.webp
2  unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/2.jpg
3  unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/2.webp
4  unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/1.jpg
5  unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/1.webp
6  unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/mq3.jpg
7  unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/mq3.webp
8  unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/mq2.jpg
9  unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/mq2.webp
10 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/mq1.jpg
11 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/mq1.webp
12 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/hq3.jpg
13 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/hq3.webp
14 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/hq2.jpg
15 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/hq2.webp
16 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/hq1.jpg
17 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/hq1.webp
18 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/sd3.jpg
19 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/sd3.webp
20 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/sd2.jpg
21 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/sd2.webp
22 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/sd1.jpg
23 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/sd1.webp
24 120     90      https://i.ytimg.com/vi/BaW_jenozKc/default.jpg
25 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/default.webp
26 320     180     https://i.ytimg.com/vi/BaW_jenozKc/mqdefault.jpg
27 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/mqdefault.webp
28 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/0.jpg
29 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/0.webp
30 168     94      https://i.ytimg.com/vi/BaW_jenozKc/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBdrRddrIfyq2ucu8zSkKH8OBJx4w
31 196     110     https://i.ytimg.com/vi/BaW_jenozKc/hqdefault.jpg?sqp=-oaymwEbCMQBEG5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLDcIFxOnwfD_QElq-UjQhMWQ-dkDQ
32 246     138     https://i.ytimg.com/vi/BaW_jenozKc/hqdefault.jpg?sqp=-oaymwEcCPYBEIoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDFYc6hdanFAt6qWX8vwK3QXP8DMA
33 336     188     https://i.ytimg.com/vi/BaW_jenozKc/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBC_Tq_vrsdYkBc8A6EACttj-6ZZw
34 480     360     https://i.ytimg.com/vi/BaW_jenozKc/hqdefault.jpg
35 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/hqdefault.webp
36 640     480     https://i.ytimg.com/vi/BaW_jenozKc/sddefault.jpg
37 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/sddefault.webp
38 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/hq720.jpg
39 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/hq720.webp
40 1920    1080    https://i.ytimg.com/vi/BaW_jenozKc/maxresdefault.jpg
41 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/maxresdefault.webp
BaW_jenozKc has no automatic captions
[info] Available subtitles for BaW_jenozKc:
Language Name    Formats
en       English vtt, ttml, srv3, srv2, srv1, json3
[info] Available formats for BaW_jenozKc:
ID  EXT  RESOLUTION FPS CH │   FILESIZE   TBR PROTO │ VCODEC        VBR ACODEC      ABR ASR MORE INFO
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
139 m4a  audio only      258.59KiB   48k https │ audio only        mp4a.40.5   48k 22k low, ANDR, m4a_dash
249 webm audio only      258.17KiB   48k https │ audio only        opus        48k 48k low, ANDR, webm_dash
250 webm audio only      276.07KiB   63k https │ audio only        opus        63k 48k low, ANDR, webm_dash
140 m4a  audio only      2154.06KiB  128k https │ audio only        mp4a.40.2  128k 44k medium, ANDR, m4a_dash
251 webm audio only      2138.96KiB  116k https │ audio only        opus       116k 48k medium, ANDR, webm_dash
17  3gp  176x144     12  155.79KiB   45k https │ mp4v.20.3     45k mp4a.40.2    0k 22k 144p, ANDR
160 mp4  256x144     15135.08KiB  113k https │ avc1.4d400c  113k video only          144p, ANDR, mp4_dash
278 webm 256x144     3052.22KiB   44k https │ vp9           44k video only          144p, ANDR, webm_dash
133 mp4  426x240     30294.27KiB  246k https │ avc1.4d4015  246k video only          240p, ANDR, mp4_dash
242 webm 426x240     3033.27KiB   28k https │ vp9           28k video only          240p, ANDR, webm_dash
134 mp4  640x360     30349.59KiB  292k https │ avc1.4d401e  292k video only          360p, ANDR, mp4_dash
18  mp4  640x360     30  2 │ ~525.60KiB  420k https │ avc1.42001E  420k mp4a.40.2    0k 44k 360p, ANDR
243 webm 640x360     3075.55KiB   63k https │ vp9           63k video only          360p, ANDR, webm_dash
135 mp4  854x480     30849.41KiB  710k https │ avc1.4d401f  710k video only          480p, ANDR, mp4_dash
244 webm 854x480     30165.49KiB  138k https │ vp9          138k video only          480p, ANDR, webm_dash
136 mp4  1280x720    301.60MiB 1366k https │ avc1.4d401f 1366k video only          720p, ANDR, mp4_dash
22  mp4  1280x720    30  2 │ ~  1.82MiB 1493k https │ avc1.64001F 1493k mp4a.40.2    0k 44k 720p, ANDR
247 webm 1280x720    30504.68KiB  420k https │ vp9          420k video only          720p, ANDR, webm_dash
137 mp4  1920x1080   302.11MiB 1803k https │ avc1.640028 1803k video only          1080p, ANDR, mp4_dash
248 webm 1920x1080   30965.31KiB  804k https │ vp9          804k video only          1080p, ANDR, webm_dash

Enter format selector: w
[info] BaW_jenozKc: Downloading 1 format(s): 17
[debug] Searching for '(?P<comments>)' in ''
[MetadataParser] Parsed comments from '': ''
[debug] Searching for '(?P<formats>)' in ''
[MetadataParser] Parsed formats from '': ''
[debug] Searching for '(?P<thumbnails>)' in ''
[MetadataParser] Parsed thumbnails from '': ''

========================================================= 2023-04-28 [20:09:19] ========== stage: video ===================================================================

[info] Writing '%(requested_formats)j' to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\tec h\AV info.json
[info] Writing '%(chapters|)j' to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\!nfo\chapte rs.json
[info] Writing '%(playlist&--------------- PLAYLIST -------------------------------|)s%(playlist&\r\nplaylist_title:       |)s%(playlist_title|)s%(playlist&\r\nplaylist:             |)s%(playlist|)s%(playlist&\r\nplaylist_id:          |)s%(playlist_id|)s%(playlist&\r\nplaylist uploader:    |)s%(playlist_uploader|)s%(playlist&\r\nplaylist uploader id: |)s%(playlist_uploader_id|)s%(playlist&\r\nplaylist index:       |)s%(playlist_index&{} / |)s%(playlist_count|)s%(playlist&\r\nplaylist autonumber:  |)s%(playlist_autonumber&{} / |)s%(n_entries|)s%(playlist&\r\n---------------------------------------------------------|)sfilename:               %(filename|)s\r\n---------------- TITLE ----------------------------------\r\ntitle:                  %(title|)s\r\nfulltitle:              %(fulltitle|)s\r\nalt title:              %(alt_title|)s\r\ncategories:             %(categories|)l\r\ntags:                   %(tags|)l\r\n---------------- WWW ------------------------------------\r\nid:                     %(id|)s\r\ndisplay id:             %(display_id|)s\r\noriginal url:           %(original_url|)s\r\nwebpage url:            %(webpage_url|)s\r\nprotocol:               %(protocol|)s\r\nextractor:              %(extractor|)s\r\nextractor key:          %(extractor_key|)s\r\n---------------- TIME ----------------------------------\r\nlocation:               %(location|)s\r\nlive status:            %(live_status|)s (islive:%(islive&yes|no)s, waslive:%(waslive&yes|no)s)\r\nreleased:               %(release_timestamp>%Y-%m-%d %H:%M,release_date>%Y-%m-%d,release_year|)s\r\nlast modified:          %(modified_timestamp>%Y-%m-%d %H:%M,modified_date>%Y-%m-%d|)s\r\nuploaded:               %(upload_timestamp>%Y-%m-%d %H:%M,upload_date>%Y-%m-%d|)s\r\nbecame available:       %(timestamp>%Y-%m-%d %H:%M|)s\r\ndownload start:         %(epoch>%Y-%m-%d %H:%M:%S)s UTC\r\n   runtime:             %(duration>%H:%M:%S,duration_string|)19s\r\nstart time:             %(start_time>%H:%M:%S|)19s\r\n  end time:             %(end_time>%H:%M:%S|)19s\r\n---------------- A/V -----------------------------------\r\nformat id:              %(format_id|)s\r\nformat:                 %(format|)s\r\nformat note:            %(format_note|)s\r\nhas DRM:                %(has_drm,_has_drm|-)s / %(requested_formats.0.has_drm|)s / %(requested_formats.1.has_drm|)s\r\naudio bitrate:          %(abr|)4d KBit/s\r\nvideo bitrate:          %(vbr|)4d KBit/s\r\na/v bitrate:            %(tbr|)4d KBit/s\r\nfilesize:               %(filesize&{:,} bytes|)s%(filesize_approx&~{:,} bytes|)s\r\next:                    %(ext|)s%(container& / {}|)s\r\n--------------- VIDEO ----------------------------------\r\nvcodec:                 %(vcodec|)s\r\nresolution:             %(width|)s*%(height|)s\r\naspect ratio:           %(aspect_ratio|)s\r\nstretched ratio:        %(stretched_ratio|)s\r\nframe rate:             %(fps|)s fps\r\ndynamic range:          %(dynamic_range|)s\r\n--------------- AUDIO ----------------------------------\r\nacodec:                 %(acodec|)s\r\nasr:                    %(asr|)s Hz\r\naudio channels:         %(audio_channels|)s\r\nlanguage:               %(language&{} |)s%(requested_formats.0.language&{} |)s%(requested_formats.1.language&{} |)s%(requested_formats.2.language&{} |)s%(requested_formats.3.language&{} |)s%(requested_formats.4.language&{} |)s%(requested_formats.5.language&{} |)s\r\n-------------- web 2.0 ---------------------------------\r\naverage rating:         %(average_rating|)s\r\nage limit:              %(age_limit|)s\r\nviewcount:              %(view_count&{} views|)16s\r\nconcurrent views:       %(concurrent_view_count&{} views|)16s\r\nlikes:                  %(like_count&{} likes|)16s%(dislike_count& / {} dislikes|)s\r\nreposts:                %(repost_count&{} reposts|)18s\r\ncomments:               %(comment_count&{} comments|)19s\r\n-------------- source ----------------------------------\r\ncreator:                %(creator|)s\r\nuploader:               %(uploader|)s\r\nuploader id:            %(uploader_id|)s\r\nchannel:                %(channel|)s\r\nchannel id:             %(channel_id|)s\r\nchannel followers:      %(channel_follower_count&{} followers|)s\r\navailability:           %(availability|)s\r\nlicense:                %(license|)s\r\nURLs:\r\n%(urls,url|)s' to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\tech\factsheet.nfo
[info] Writing video description to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\!nfo\syno psis.description
[info] Writing video subtitles to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl  test video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.en.ttml
[debug] Invoking http downloader on "https://www.youtube.com/api/timedtext?v=BaW_jenozKc&caps=asr&opi=112496729&xoaf=5&hl=en&ip=0.0.0.0&ipbits=0&expire=1682737758&sparams=ip%2Cipbits%2Cexpire%2Cv%2Ccaps%2Copi%2Cxoaf&signature=7BB688C9E1B90851446770125BF9DEDE60CE840F.65EE2CD7420B7FE603F968C329EE9A6433DA9CCC&key=yt8&lang=en&fmt=ttml"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video  "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.en.ttml
[download] 100% of    820.00B in 00:00:00 at 5.36KiB/s
[info] There's no video thumbnails to download
[info] Writing video metadata as JSON to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\tech \metadata.info.json
WARNING: There are no annotations to write.
[info] Writing internet shortcut (.url) to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\te ch\link.url
[info] Writing internet shortcut (.desktop) to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭�\\tech\link.desktop
[debug] Searching for '(?P<download_dir>.*\\\\)' in '%(filename)s'
[MetadataParser] Parsed download_dir from '%(filename)s': "c:\\hp\\-\\#YT\\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\\"

========================================================= 2023-04-28 [20:09:19] ========== stage: before_dl ===================================================================

[debug] Invoking http downloader on "https://rr1---sn-h0jeln7l.googlevideo.com/videoplayback?expire=1682734159&ei=7ydMZJT0Auiox_APmbm8mAg&ip=91.118.143.91&id=o-AAxDkS-nVYRwQg2QnhvAwcI36qR5CaxFsLGE-YyGhAwn&itag=17&source=youtube&requiressl=yes&mh=Rf&mm=31%2C26&mn=sn-h0jeln7l%2Csn-4g5ednde&ms=au%2Conr&mv=m&mvi=1&pl=16&initcwndbps=1343750&spc=qEK7B0N95wsQOS8LqqwzweD3NdQ04KA&vprv=1&svpuc=1&mime=video%2F3gpp&gir=yes&clen=57125&dur=10.216&lmt=1387961822994781&mt=1682712304&fvip=3&fexp=24007246&c=ANDROID&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAIIzYWpslUYFb6c3VQFwkIJt0OwFhZYEi4Kb2rXz3Q7eAiEAm_gZSuAQfunQnERKLtUI1_zr_iIm30f8SDIrY5CLwg0%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgfjIdPDGzeXTLnjX2TLrH8wO1SLwZ5zoWhJV3PIzcJ1ICIQCBKZfT4txcDflXzZd5m5XEDzh7FzkYNkbLJ2go_weKgg%3D%3D"
[download] Destination: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video  "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.3gp
[download] 100% of   55.79KiB in 00:00:00 at 132.32KiB/s
[VideoRemuxer] Remuxing video from 3gp to mkv; Destination: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.mkv
[debug] ffmpeg command line: ".\helpertools\FFmpeg\bin\ffmpeg" -y -loglevel "repeat+info" -i "file:c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video "'⧸⧹ä↭𝕐 [youtube.BaW_jen  ozKc] {17}.3gp" -map 0 -dn -ignore_unknown -c copy -movflags "+faststart" "file:c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\y outube-dl test video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.mkv"
Deleting original file c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video  "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.3gp (pass -k to keep)
[Metadata] Adding metadata to "c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test  video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.mkv"
[debug] ffmpeg command line: ".\helpertools\FFmpeg\bin\ffmpeg" -y -loglevel "repeat+info" -i "file:c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video "'⧸⧹ä↭𝕐 [youtube.BaW_jen  ozKc] {17}.mkv" -map 0 -dn -ignore_unknown -c copy -write_id3v1 1 -metadata "title=youtube-dl test video \"'/\ä↭𝕐" -metadata "date=201 21002" -metadata "description=test chars:  \"'/\ä↭𝕐
test URL: https://github.com/rg3/youtube-dl/issues/1892

This is a test video for youtube-dl.

For more information, contact phihag@phihag.de ." -metadata "synopsis=test chars:  \"'/\ä↭𝕐
test URL: https://github.com/rg3/youtube-dl/issues/1892

This is a test video for youtube-dl.

For more information, contact phihag@phihag.de ." -metadata "purl=https://www.youtube.com/watch?v=BaW_jenozKc" -metadata "comment=https://www.youtube.com/watch?v=BaW_jenozKc" -metadata "artist=Philipp Hagemeister" -movflags "+faststart" "file:c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video "'⧸⧹ä↭𝕐 [youtube.  BaW_jenozKc] {17}.temp.mkv"
[Exec] Executing command: .\helpertools\FFmpeg\bin\ffprobe -show_entries stream=start_time "c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {  17}.mkv"
ffprobe version N-110185-gb564ad8eac-20230407 Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 12.2.0 (crosstool-NG 1.25.0.152_89671bf)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --disable-libmfx --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20230407
  libavutil      58.  6.100 / 58.  6.100
  libavcodec     60.  9.100 / 60.  9.100
  libavformat    60.  4.101 / 60.  4.101
  libavdevice    60.  2.100 / 60.  2.100
  libavfilter     9.  5.100 /  9.  5.100
  libswscale      7.  2.100 /  7.  2.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
Input #0, matroska,webm, from 'c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test  video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.mkv':
  Metadata:
    title           : youtube-dl test video "'/\ä↭𝕐
    COMMENT         : https://www.youtube.com/watch?v=BaW_jenozKc
    COMPATIBLE_BRANDS: isom3gp6
    MAJOR_BRAND     : 3gp6
    MINOR_VERSION   : 256
    ARTIST          : Philipp Hagemeister
    DATE            : 20121002
    DESCRIPTION     : test chars:  "'/\ä↭𝕐
                    : test URL: https://github.com/rg3/youtube-dl/issues/1892
                    :
                    : This is a test video for youtube-dl.
                    :
                    : For more information, contact phihag@phihag.de .
    SYNOPSIS        : test chars:  "'/\ä↭𝕐
                    : test URL: https://github.com/rg3/youtube-dl/issues/1892
                    :
                    : This is a test video for youtube-dl.
                    :
                    : For more information, contact phihag@phihag.de .
    PURL            : https://www.youtube.com/watch?v=BaW_jenozKc
    ENCODER         : Lavf60.4.101
  Duration: 00:00:10.22, start: 0.000000, bitrate: 45 kb/s
  Stream #0:0: Video: mpeg4 (Simple Profile), yuv420p, 176x144 [SAR 1:1 DAR 11:9], 12 fps, 12 tbr, 1k tbn (default)
    Metadata:
      HANDLER_NAME    : IsoMedia File Produced by Google, 5-11-2011
      VENDOR_ID       : [0][0][0][0]
      DURATION        : 00:00:10.083000000
  Stream #0:1: Audio: aac (LC), 22050 Hz, mono, fltp (default)
    Metadata:
      HANDLER_NAME    : IsoMedia File Produced by Google, 5-11-2011
      VENDOR_ID       : [0][0][0][0]
      DURATION        : 00:00:10.216000000
[STREAM]
start_time=0.000000
[/STREAM]
[STREAM]
start_time=0.000000
[/STREAM]

========================================================= 2023-04-28 [20:09:19] ========== stage: post_process ===================================================================

[MoveFiles] Moving file "c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video  "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.en.ttml" to "c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä ↭𝕐\subs\youtube-dl test video "'
⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.en.ttml"
[Exec] Executing command: ..\curl\bin\curl.exe --insecure "https://www.youtube.com/watch?v=BaW_jenozKc" -o ".\\2012-10-02 youtube-dl test video "'/\ä↭𝕐\!nfo\home.html"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to open the file .\\2012-10-02 youtube-dl test video
Warning: '/\ä___\!nfo\home.html: No such file or directory
100  1381    0  1381    0     0   6478      0 --:--:-- --:--:-- --:--:--  6483
curl: (23) Failure writing output to destination

========================================================= 2023-04-28 [20:09:19] ========== stage: after_move ===================================================================

ERROR: Postprocessing: Command returned error code 23
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 3333, in process_info
  File "yt_dlp\YoutubeDL.py", line 3518, in post_process
  File "yt_dlp\YoutubeDL.py", line 3494, in run_all_pps
  File "yt_dlp\YoutubeDL.py", line 3473, in run_pp
  File "yt_dlp\postprocessor\common.py", line 24, in run
  File "yt_dlp\postprocessor\exec.py", line 33, in run
yt_dlp.utils.PostProcessingError: Command returned error code 23


========================================================= 2023-04-28 [20:09:19] ========== stage: after_video ===================================================================

[info] Writing '%(comments|)j' to: c:\hp\-\#YT\~~\!nfo\84 comments.json
ERROR: Preprocessing: Command returned error code 1

after_move

--parse-metadata "before_dl:filename:(?P<download_dir>.*\\\)"
--print-to-file "after_move:%(comments|)j" "%(download_dir)s\!nfo\%(comment_count|[aborted])s comments.json"

This
❌ creates no comments.json file
Why ??

log
yt-dlp test:youtube
[debug] Command-line config: ['test:youtube']
[debug] Portable config "c:\hp\-\!portableapps\yt-dlp\yt-dlp.conf": ['--verbose', '--no-playlist', '--format-sort', 'hasvid,ie_pref,quality,res,hdr,codec,size,br,asr,ext,fps,hasaud,lang,source,proto,id', '-F', '-f', 'bestvideo*+bestaudio/best', '-f-', '--paths', 'c:\\hp\\-\\#YT', '--ffmpeg-location', '.\\helpertools\\FFmpeg\\bin', '--no-simulate', '--no-quiet', '--progress', '--parse-metadata', '%(is_live)s:(?P<islive>True)', '--parse-metadata', '%(was_live)s:(?P<waslive>True)', '--alias', 'set-output', '-o {}".\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\%(playlist_index|)02d%(playlist_index& = |)s%(release_timestamp>%Y-%m-%d,release_date>%Y-%m-%d,modified_date>%Y-%m-%d,modified_timestamp>%Y-%m-%d,upload_date>%Y-%m-%d,upload_timestamp>%Y-%m-%d,timestamp>%Y-%m-%d,release_year,epoch>DL %Y-%m-%d [%H.%M.%S])s %(alt_title,title).100B%(alt_title.101B,title.101B&…|)s\\\\"{}', '--set-output', '', '%(title).120B%(title.121B&…|)s [%(extractor)s.%(islive&live.|)s%(id)s] {%(format_id)s}.%(ext)s', '--set-output', 'subtitle:', 'subs\\%(title).120B%(title.121B&…|)s [%(extractor)s.%(islive&live.|)s%(id)s] {%(format_id)s}.%(ext)s', '--set-output', 'infojson:', 'tech\\metadata.%(ext)s', '--set-output', 'link:', 'tech\\link.%(ext)s', '--set-output', 'description:', '!nfo\\synopsis.%(ext)s', '--set-output', 'annotation:', '!nfo\\annotations.%(ext)s', '--set-output', 'thumbnail:', 'thumbs\\thumb.%(ext)s', '--alias', 'set-pl_output', '-o {}".\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\\\"{}', '--set-pl_output', 'pl_infojson:', 'playlist metadata.%(ext)s', '--set-pl_output', 'pl_description:', 'playlist description.%(ext)s', '--set-pl_output', 'pl_thumbnail:', 'folder.%(ext)s', '--set-pl_output', 'pl_video:', '%(playlist_title,playlist|).120B%(playlist_title.121,playlist.121&…|)s [%(extractor)s.%(islive&live.|)s%(id)s] {%(format_id)s}.%(ext)s', '--output-na-placeholder', '~~', '--write-info-json', '--write-description', '--write-annotations', '--write-playlist-metafiles', '--get-comments', '--write-link', '--write-url-link', '--write-desktop-link', '--no-overwrites', '--no-post-overwrites', '--merge-output-format', 'mkv', '--remux-video', 'mkv', '--list-subs', '--write-subs', '--write-auto-subs', '--all-subs', '--sub-langs', 'all', '--extractor-args', 'youtube:skip=translated_subs', '--sub-format', 'all/ttml/vtt/best', '--list-thumbnails', '--write-thumbnail', '--write-all-thumbnails', '--embed-metadata', '--embed-chapters', '--no-embed-info-json', '--no-check-certificate', '--retries', 'inf', '--file-access-retries', 'inf', '--fragment-retries', 'inf', '--retry-sleep', 'exp=1', '--retry-sleep', 'http,fragment,file_access,extractor:exp=1', '--no-skip-unavailable-fragments', '--geo-bypass', '--audio-multistreams', '--print', 'pre_process:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: pre_process ===================================================================\r\n', '--print', 'after_filter:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: after_filter ===================================================================\r\n', '--print', 'video:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: video ===================================================================\r\n', '--print', 'before_dl:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: before_dl ===================================================================\r\n', '--print', 'post_process:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: post_process ===================================================================\r\n', '--print', 'after_move:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: after_move ===================================================================\r\n', '--print', 'after_video:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: after_video ===================================================================\r\n', '--print', 'playlist:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: playlist ===================================================================\r\n', '--parse-metadata', 'video::(?P<comments>)', '--parse-metadata', 'video::(?P<formats>)', '--parse-metadata', 'video::(?P<thumbnails>)', '--parse-metadata', 'before_dl:filename:(?P<download_dir>.*\\\\)', '--print-to-file', 'after_move:%(comments|)j', '%(download_dir)s\\!nfo\\%(comment_count|[aborted])s comments.json', '--exec', 'pre_process:cd %(download_dir)q && IF EXIST !nfo ren !nfo !nfo.old & IF EXIST tech ren tech tech.old', '--alias', 'print-factsheet', '--print-to-file {} ".\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\%(playlist_index|)02d%(playlist_index& = |)s%(release_timestamp>%Y-%m-%d,release_date>%Y-%m-%d,modified_date>%Y-%m-%d,modified_timestamp>%Y-%m-%d,upload_date>%Y-%m-%d,upload_timestamp>%Y-%m-%d,timestamp>%Y-%m-%d,release_year,epoch>DL %Y-%m-%d [%H.%M.%S])s %(alt_title,title).100B%(alt_title.101B,title.101B&…|)s\\tech\\factsheet.nfo"', '--print-to-file', '%(requested_formats)j', '.\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\%(playlist_index|)02d%(playlist_index& = |)s%(release_timestamp>%Y-%m-%d,release_date>%Y-%m-%d,modified_date>%Y-%m-%d,modified_timestamp>%Y-%m-%d,upload_date>%Y-%m-%d,upload_timestamp>%Y-%m-%d,timestamp>%Y-%m-%d,release_year,epoch>DL %Y-%m-%d [%H.%M.%S])s %(alt_title,title).100B%(alt_title.101B,title.101B&…|)s\\tech\\AV info.json', '--print-to-file', '%(chapters|)j', '.\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\%(playlist_index|)02d%(playlist_index& = |)s%(release_timestamp>%Y-%m-%d,release_date>%Y-%m-%d,modified_date>%Y-%m-%d,modified_timestamp>%Y-%m-%d,upload_date>%Y-%m-%d,upload_timestamp>%Y-%m-%d,timestamp>%Y-%m-%d,release_year,epoch>DL %Y-%m-%d [%H.%M.%S])s %(alt_title,title).100B%(alt_title.101B,title.101B&…|)s\\!nfo\\chapters.json', '--exec', '..\\curl\\bin\\curl.exe --insecure "%(webpage_url,original_url)s" -o ".\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\%(playlist_index|)02d%(playlist_index& = |)s%(release_timestamp>%Y-%m-%d,release_date>%Y-%m-%d,modified_date>%Y-%m-%d,modified_timestamp>%Y-%m-%d,upload_date>%Y-%m-%d,upload_timestamp>%Y-%m-%d,timestamp>%Y-%m-%d,release_year,epoch>DL %Y-%m-%d [%H.%M.%S])s %(alt_title,title).100B%(alt_title.101B,title.101B&…|)s\\!nfo\\home.html"', '--exec', 'post_process:.\\helpertools\\FFmpeg\\bin\\ffprobe -show_entries stream=start_time %(filepath)q', '--print-factsheet', '%(playlist&--------------- PLAYLIST -------------------------------|)s%(playlist&\r\nplaylist_title:       |)s%(playlist_title|)s%(playlist&\r\nplaylist:             |)s%(playlist|)s%(playlist&\r\nplaylist_id:          |)s%(playlist_id|)s%(playlist&\r\nplaylist uploader:    |)s%(playlist_uploader|)s%(playlist&\r\nplaylist uploader id: |)s%(playlist_uploader_id|)s%(playlist&\r\nplaylist index:       |)s%(playlist_index&{} / |)s%(playlist_count|)s%(playlist&\r\nplaylist autonumber:  |)s%(playlist_autonumber&{} / |)s%(n_entries|)s%(playlist&\r\n---------------------------------------------------------|)sfilename:               %(filename|)s\r\n---------------- TITLE ----------------------------------\r\ntitle:                  %(title|)s\r\nfulltitle:              %(fulltitle|)s\r\nalt title:              %(alt_title|)s\r\ncategories:             %(categories|)l\r\ntags:                   %(tags|)l\r\n---------------- WWW ------------------------------------\r\nid:                     %(id|)s\r\ndisplay id:             %(display_id|)s\r\noriginal url:           %(original_url|)s\r\nwebpage url:            %(webpage_url|)s\r\nprotocol:               %(protocol|)s\r\nextractor:              %(extractor|)s\r\nextractor key:          %(extractor_key|)s\r\n---------------- TIME ----------------------------------\r\nlocation:               %(location|)s\r\nlive status:            %(live_status|)s (islive:%(islive&yes|no)s, waslive:%(waslive&yes|no)s)\r\nreleased:               %(release_timestamp>%Y-%m-%d %H:%M,release_date>%Y-%m-%d,release_year|)s\r\nlast modified:          %(modified_timestamp>%Y-%m-%d %H:%M,modified_date>%Y-%m-%d|)s\r\nuploaded:               %(upload_timestamp>%Y-%m-%d %H:%M,upload_date>%Y-%m-%d|)s\r\nbecame available:       %(timestamp>%Y-%m-%d %H:%M|)s\r\ndownload start:         %(epoch>%Y-%m-%d %H:%M:%S)s UTC\r\n   runtime:             %(duration>%H:%M:%S,duration_string|)19s\r\nstart time:             %(start_time>%H:%M:%S|)19s\r\n  end time:             %(end_time>%H:%M:%S|)19s\r\n---------------- A/V -----------------------------------\r\nformat id:              %(format_id|)s\r\nformat:                 %(format|)s\r\nformat note:            %(format_note|)s\r\nhas DRM:                %(has_drm,_has_drm|-)s / %(requested_formats.0.has_drm|)s / %(requested_formats.1.has_drm|)s\r\naudio bitrate:          %(abr|)4d KBit/s\r\nvideo bitrate:          %(vbr|)4d KBit/s\r\na/v bitrate:            %(tbr|)4d KBit/s\r\nfilesize:               %(filesize&{:,} bytes|)s%(filesize_approx&~{:,} bytes|)s\r\next:                    %(ext|)s%(container& / {}|)s\r\n--------------- VIDEO ----------------------------------\r\nvcodec:                 %(vcodec|)s\r\nresolution:             %(width|)s*%(height|)s\r\naspect ratio:           %(aspect_ratio|)s\r\nstretched ratio:        %(stretched_ratio|)s\r\nframe rate:             %(fps|)s fps\r\ndynamic range:          %(dynamic_range|)s\r\n--------------- AUDIO ----------------------------------\r\nacodec:                 %(acodec|)s\r\nasr:                    %(asr|)s Hz\r\naudio channels:         %(audio_channels|)s\r\nlanguage:               %(language&{} |)s%(requested_formats.0.language&{} |)s%(requested_formats.1.language&{} |)s%(requested_formats.2.language&{} |)s%(requested_formats.3.language&{} |)s%(requested_formats.4.language&{} |)s%(requested_formats.5.language&{} |)s\r\n-------------- web 2.0 ---------------------------------\r\naverage rating:         %(average_rating|)s\r\nage limit:              %(age_limit|)s\r\nviewcount:              %(view_count&{} views|)16s\r\nconcurrent views:       %(concurrent_view_count&{} views|)16s\r\nlikes:                  %(like_count&{} likes|)16s%(dislike_count& / {} dislikes|)s\r\nreposts:                %(repost_count&{} reposts|)18s\r\ncomments:               %(comment_count&{} comments|)19s\r\n-------------- source ----------------------------------\r\ncreator:                %(creator|)s\r\nuploader:               %(uploader|)s\r\nuploader id:            %(uploader_id|)s\r\nchannel:                %(channel|)s\r\nchannel id:             %(channel_id|)s\r\nchannel followers:      %(channel_follower_count&{} followers|)s\r\navailability:           %(availability|)s\r\nlicense:                %(license|)s\r\nURLs:\r\n%(urls,url|)s']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2023.04.28.193828 [f005a35aa] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-110185-gb564ad8eac-20230407 (setts), ffprobe N-110185-gb564ad8eac-20230407
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.2
[debug] Proxy map: {}
[debug] Loaded 1810 extractors
[TestURL] Extracting URL: test:youtube
[TestURL] Test URL: https://www.youtube.com/watch?v=BaW_jenozKc&t=1s&end=9
[youtube] Extracting URL: https://www.youtube.com/watch?v=BaW_jenozKc&t=1s&end=9
[youtube] BaW_jenozKc: Downloading webpage
[youtube] BaW_jenozKc: Downloading android player API JSON
[info] BaW_jenozKc: Downloading subtitles: en
[debug] Sort order given by user: hasvid, ie_pref, quality, res, hdr, codec, size, br, asr, ext, fps, hasaud, lang, source, proto, id
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, hdr, vcodec, acodec, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, fps, hasaud, lang, source, proto, id, channels
[debug] Searching for '(?P<islive>True)' in '%(is_live)s'
[MetadataParser] Could not interpret '%(is_live)s' as '(?P<islive>True)'
[debug] Searching for '(?P<waslive>True)' in '%(was_live)s'
[MetadataParser] Could not interpret '%(was_live)s' as '(?P<waslive>True)'
[Exec] Executing command: cd "~~" && IF EXIST !nfo ren !nfo !nfo.old & IF EXIST tech ren tech tech.old
Das System kann den angegebenen Pfad nicht finden.

========================================================= 2023-04-28 [20:15:48] ========== stage: pre_process ===================================================================

ERROR: Preprocessing: Command returned error code 1
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 3504, in pre_process
  File "yt_dlp\YoutubeDL.py", line 3494, in run_all_pps
  File "yt_dlp\YoutubeDL.py", line 3473, in run_pp
  File "yt_dlp\postprocessor\common.py", line 24, in run
  File "yt_dlp\postprocessor\exec.py", line 33, in run
yt_dlp.utils.PostProcessingError: Command returned error code 1

[youtube] Downloading comment section API JSON
[youtube] Downloading ~84 comments
[youtube] Sorting comments by newest first
[youtube] Downloading comment API JSON page 1 (0/84)
[youtube] Downloading comment API JSON page 2 (20/84)
[youtube]     Downloading comment API JSON reply thread 1 (25/84)
[youtube]     Downloading comment API JSON reply thread 2 (34/84)
[youtube]     Downloading comment API JSON reply thread 3 (37/84)
[youtube]     Downloading comment API JSON reply thread 4 (39/84)
[youtube] Downloading comment API JSON page 3 (51/84)
[youtube]     Downloading comment API JSON reply thread 1 (54/84)
[youtube]     Downloading comment API JSON reply thread 2 (57/84)
[youtube]     Downloading comment API JSON reply thread 3 (60/84)
[youtube]     Downloading comment API JSON reply thread 4 (68/84)
[youtube]        Downloading comment replies API JSON page 1 (78/84)
[youtube] Extracted 84 comments

========================================================= 2023-04-28 [20:15:48] ========== stage: after_filter ===================================================================

[info] Available thumbnails for BaW_jenozKc:
ID Width   Height  URL
0  unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/3.jpg
1  unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/3.webp
2  unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/2.jpg
3  unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/2.webp
4  unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/1.jpg
5  unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/1.webp
6  unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/mq3.jpg
7  unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/mq3.webp
8  unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/mq2.jpg
9  unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/mq2.webp
10 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/mq1.jpg
11 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/mq1.webp
12 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/hq3.jpg
13 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/hq3.webp
14 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/hq2.jpg
15 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/hq2.webp
16 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/hq1.jpg
17 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/hq1.webp
18 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/sd3.jpg
19 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/sd3.webp
20 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/sd2.jpg
21 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/sd2.webp
22 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/sd1.jpg
23 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/sd1.webp
24 120     90      https://i.ytimg.com/vi/BaW_jenozKc/default.jpg
25 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/default.webp
26 320     180     https://i.ytimg.com/vi/BaW_jenozKc/mqdefault.jpg
27 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/mqdefault.webp
28 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/0.jpg
29 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/0.webp
30 168     94      https://i.ytimg.com/vi/BaW_jenozKc/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBdrRddrIfyq2ucu8zSkKH8OBJx4w
31 196     110     https://i.ytimg.com/vi/BaW_jenozKc/hqdefault.jpg?sqp=-oaymwEbCMQBEG5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLDcIFxOnwfD_QElq-UjQhMWQ-dkDQ
32 246     138     https://i.ytimg.com/vi/BaW_jenozKc/hqdefault.jpg?sqp=-oaymwEcCPYBEIoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDFYc6hdanFAt6qWX8vwK3QXP8DMA
33 336     188     https://i.ytimg.com/vi/BaW_jenozKc/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBC_Tq_vrsdYkBc8A6EACttj-6ZZw
34 480     360     https://i.ytimg.com/vi/BaW_jenozKc/hqdefault.jpg
35 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/hqdefault.webp
36 640     480     https://i.ytimg.com/vi/BaW_jenozKc/sddefault.jpg
37 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/sddefault.webp
38 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/hq720.jpg
39 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/hq720.webp
40 1920    1080    https://i.ytimg.com/vi/BaW_jenozKc/maxresdefault.jpg
41 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/maxresdefault.webp
BaW_jenozKc has no automatic captions
[info] Available subtitles for BaW_jenozKc:
Language Name    Formats
en       English vtt, ttml, srv3, srv2, srv1, json3
[info] Available formats for BaW_jenozKc:
ID  EXT  RESOLUTION FPS CH │   FILESIZE   TBR PROTO │ VCODEC        VBR ACODEC      ABR ASR MORE INFO
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
139 m4a  audio only      258.59KiB   48k https │ audio only        mp4a.40.5   48k 22k low, ANDR, m4a_dash
249 webm audio only      258.17KiB   48k https │ audio only        opus        48k 48k low, ANDR, webm_dash
250 webm audio only      276.07KiB   63k https │ audio only        opus        63k 48k low, ANDR, webm_dash
140 m4a  audio only      2154.06KiB  128k https │ audio only        mp4a.40.2  128k 44k medium, ANDR, m4a_dash
251 webm audio only      2138.96KiB  116k https │ audio only        opus       116k 48k medium, ANDR, webm_dash
17  3gp  176x144     12  155.79KiB   45k https │ mp4v.20.3     45k mp4a.40.2    0k 22k 144p, ANDR
160 mp4  256x144     15135.08KiB  113k https │ avc1.4d400c  113k video only          144p, ANDR, mp4_dash
278 webm 256x144     3052.22KiB   44k https │ vp9           44k video only          144p, ANDR, webm_dash
133 mp4  426x240     30294.27KiB  246k https │ avc1.4d4015  246k video only          240p, ANDR, mp4_dash
242 webm 426x240     3033.27KiB   28k https │ vp9           28k video only          240p, ANDR, webm_dash
134 mp4  640x360     30349.59KiB  292k https │ avc1.4d401e  292k video only          360p, ANDR, mp4_dash
18  mp4  640x360     30  2 │ ~525.60KiB  420k https │ avc1.42001E  420k mp4a.40.2    0k 44k 360p, ANDR
243 webm 640x360     3075.55KiB   63k https │ vp9           63k video only          360p, ANDR, webm_dash
135 mp4  854x480     30849.41KiB  710k https │ avc1.4d401f  710k video only          480p, ANDR, mp4_dash
244 webm 854x480     30165.49KiB  138k https │ vp9          138k video only          480p, ANDR, webm_dash
136 mp4  1280x720    301.60MiB 1366k https │ avc1.4d401f 1366k video only          720p, ANDR, mp4_dash
22  mp4  1280x720    30  2 │ ~  1.82MiB 1493k https │ avc1.64001F 1493k mp4a.40.2    0k 44k 720p, ANDR
247 webm 1280x720    30504.68KiB  420k https │ vp9          420k video only          720p, ANDR, webm_dash
137 mp4  1920x1080   302.11MiB 1803k https │ avc1.640028 1803k video only          1080p, ANDR, mp4_dash
248 webm 1920x1080   30965.31KiB  804k https │ vp9          804k video only          1080p, ANDR, webm_dash

Enter format selector: w
[info] BaW_jenozKc: Downloading 1 format(s): 17
[debug] Searching for '(?P<comments>)' in ''
[MetadataParser] Parsed comments from '': ''
[debug] Searching for '(?P<formats>)' in ''
[MetadataParser] Parsed formats from '': ''
[debug] Searching for '(?P<thumbnails>)' in ''
[MetadataParser] Parsed thumbnails from '': ''

========================================================= 2023-04-28 [20:15:48] ========== stage: video ===================================================================

[info] Writing '%(requested_formats)j' to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\tec h\AV info.json
[info] Writing '%(chapters|)j' to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\!nfo\chapte rs.json
[info] Writing '%(playlist&--------------- PLAYLIST -------------------------------|)s%(playlist&\r\nplaylist_title:       |)s%(playlist_title|)s%(playlist&\r\nplaylist:             |)s%(playlist|)s%(playlist&\r\nplaylist_id:          |)s%(playlist_id|)s%(playlist&\r\nplaylist uploader:    |)s%(playlist_uploader|)s%(playlist&\r\nplaylist uploader id: |)s%(playlist_uploader_id|)s%(playlist&\r\nplaylist index:       |)s%(playlist_index&{} / |)s%(playlist_count|)s%(playlist&\r\nplaylist autonumber:  |)s%(playlist_autonumber&{} / |)s%(n_entries|)s%(playlist&\r\n---------------------------------------------------------|)sfilename:               %(filename|)s\r\n---------------- TITLE ----------------------------------\r\ntitle:                  %(title|)s\r\nfulltitle:              %(fulltitle|)s\r\nalt title:              %(alt_title|)s\r\ncategories:             %(categories|)l\r\ntags:                   %(tags|)l\r\n---------------- WWW ------------------------------------\r\nid:                     %(id|)s\r\ndisplay id:             %(display_id|)s\r\noriginal url:           %(original_url|)s\r\nwebpage url:            %(webpage_url|)s\r\nprotocol:               %(protocol|)s\r\nextractor:              %(extractor|)s\r\nextractor key:          %(extractor_key|)s\r\n---------------- TIME ----------------------------------\r\nlocation:               %(location|)s\r\nlive status:            %(live_status|)s (islive:%(islive&yes|no)s, waslive:%(waslive&yes|no)s)\r\nreleased:               %(release_timestamp>%Y-%m-%d %H:%M,release_date>%Y-%m-%d,release_year|)s\r\nlast modified:          %(modified_timestamp>%Y-%m-%d %H:%M,modified_date>%Y-%m-%d|)s\r\nuploaded:               %(upload_timestamp>%Y-%m-%d %H:%M,upload_date>%Y-%m-%d|)s\r\nbecame available:       %(timestamp>%Y-%m-%d %H:%M|)s\r\ndownload start:         %(epoch>%Y-%m-%d %H:%M:%S)s UTC\r\n   runtime:             %(duration>%H:%M:%S,duration_string|)19s\r\nstart time:             %(start_time>%H:%M:%S|)19s\r\n  end time:             %(end_time>%H:%M:%S|)19s\r\n---------------- A/V -----------------------------------\r\nformat id:              %(format_id|)s\r\nformat:                 %(format|)s\r\nformat note:            %(format_note|)s\r\nhas DRM:                %(has_drm,_has_drm|-)s / %(requested_formats.0.has_drm|)s / %(requested_formats.1.has_drm|)s\r\naudio bitrate:          %(abr|)4d KBit/s\r\nvideo bitrate:          %(vbr|)4d KBit/s\r\na/v bitrate:            %(tbr|)4d KBit/s\r\nfilesize:               %(filesize&{:,} bytes|)s%(filesize_approx&~{:,} bytes|)s\r\next:                    %(ext|)s%(container& / {}|)s\r\n--------------- VIDEO ----------------------------------\r\nvcodec:                 %(vcodec|)s\r\nresolution:             %(width|)s*%(height|)s\r\naspect ratio:           %(aspect_ratio|)s\r\nstretched ratio:        %(stretched_ratio|)s\r\nframe rate:             %(fps|)s fps\r\ndynamic range:          %(dynamic_range|)s\r\n--------------- AUDIO ----------------------------------\r\nacodec:                 %(acodec|)s\r\nasr:                    %(asr|)s Hz\r\naudio channels:         %(audio_channels|)s\r\nlanguage:               %(language&{} |)s%(requested_formats.0.language&{} |)s%(requested_formats.1.language&{} |)s%(requested_formats.2.language&{} |)s%(requested_formats.3.language&{} |)s%(requested_formats.4.language&{} |)s%(requested_formats.5.language&{} |)s\r\n-------------- web 2.0 ---------------------------------\r\naverage rating:         %(average_rating|)s\r\nage limit:              %(age_limit|)s\r\nviewcount:              %(view_count&{} views|)16s\r\nconcurrent views:       %(concurrent_view_count&{} views|)16s\r\nlikes:                  %(like_count&{} likes|)16s%(dislike_count& / {} dislikes|)s\r\nreposts:                %(repost_count&{} reposts|)18s\r\ncomments:               %(comment_count&{} comments|)19s\r\n-------------- source ----------------------------------\r\ncreator:                %(creator|)s\r\nuploader:               %(uploader|)s\r\nuploader id:            %(uploader_id|)s\r\nchannel:                %(channel|)s\r\nchannel id:             %(channel_id|)s\r\nchannel followers:      %(channel_follower_count&{} followers|)s\r\navailability:           %(availability|)s\r\nlicense:                %(license|)s\r\nURLs:\r\n%(urls,url|)s' to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\tech\factsheet.nfo
[info] Writing video description to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\!nfo\syno psis.description
[info] Writing video subtitles to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl  test video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.en.ttml
[debug] Invoking http downloader on "https://www.youtube.com/api/timedtext?v=BaW_jenozKc&caps=asr&opi=112496729&xoaf=5&hl=en&ip=0.0.0.0&ipbits=0&expire=1682738147&sparams=ip%2Cipbits%2Cexpire%2Cv%2Ccaps%2Copi%2Cxoaf&signature=A5A794AA68B05B10EA7F70F8DDB6A1DB5D7BD4D5.078F151F8E0C412F7E8F0B6937312C0B7D51E518&key=yt8&lang=en&fmt=ttml"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video  "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.en.ttml
[download] 100% of    820.00B in 00:00:00 at 5.22KiB/s
[info] There's no video thumbnails to download
[info] Writing video metadata as JSON to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\tech \metadata.info.json
WARNING: There are no annotations to write.
[info] Writing internet shortcut (.url) to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\te ch\link.url
[info] Writing internet shortcut (.desktop) to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭�\\tech\link.desktop
[debug] Searching for '(?P<download_dir>.*\\\\)' in '%(filename)s'
[MetadataParser] Parsed download_dir from '%(filename)s': "c:\\hp\\-\\#YT\\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\\"

========================================================= 2023-04-28 [20:15:48] ========== stage: before_dl ===================================================================

[debug] Invoking http downloader on "https://rr4---sn-h0jeenek.googlevideo.com/videoplayback?expire=1682734548&ei=dClMZPuxB-ujx_APvcKGkA4&ip=91.118.143.91&id=o-AKzPvj0ws7h-eocXQ27meARffNm_-0Z1DKNDSgKBwewO&itag=17&source=youtube&requiressl=yes&mh=Rf&mm=31%2C26&mn=sn-h0jeenek%2Csn-4g5ednde&ms=au%2Conr&mv=m&mvi=4&pl=16&initcwndbps=1178750&spc=qEK7B78yRJNUJqIj3oUewHFqd_stevU&vprv=1&svpuc=1&mime=video%2F3gpp&gir=yes&clen=57125&dur=10.216&lmt=1387961822994781&mt=1682712545&fvip=3&fexp=24007246&c=ANDROID&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAO82SBcyr-Fr8fiaQhsXIZRFwPFCoVYF0hThOnK7_7OMAiEAmqAym7F21cZ0U6IQd7qixul2z0bnoR9dX2nLBgopp9U%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgZ4NKtzfUm8StUX8OU6fUN9fhwty9sh2dkEoheD5z810CIQD5nQmLCnbUhG0SG1XpAdWy-ML8Fj7kaUJq-2wbKafmEg%3D%3D"
[download] Destination: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video  "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.3gp
[download] 100% of   55.79KiB in 00:00:00 at 153.26KiB/s
[VideoRemuxer] Remuxing video from 3gp to mkv; Destination: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.mkv
[debug] ffmpeg command line: ".\helpertools\FFmpeg\bin\ffmpeg" -y -loglevel "repeat+info" -i "file:c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video "'⧸⧹ä↭𝕐 [youtube.BaW_jen  ozKc] {17}.3gp" -map 0 -dn -ignore_unknown -c copy -movflags "+faststart" "file:c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\y outube-dl test video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.mkv"
Deleting original file c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video  "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.3gp (pass -k to keep)
[Metadata] Adding metadata to "c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test  video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.mkv"
[debug] ffmpeg command line: ".\helpertools\FFmpeg\bin\ffmpeg" -y -loglevel "repeat+info" -i "file:c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video "'⧸⧹ä↭𝕐 [youtube.BaW_jen  ozKc] {17}.mkv" -map 0 -dn -ignore_unknown -c copy -write_id3v1 1 -metadata "title=youtube-dl test video \"'/\ä↭𝕐" -metadata "date=201 21002" -metadata "description=test chars:  \"'/\ä↭𝕐
test URL: https://github.com/rg3/youtube-dl/issues/1892

This is a test video for youtube-dl.

For more information, contact phihag@phihag.de ." -metadata "synopsis=test chars:  \"'/\ä↭𝕐
test URL: https://github.com/rg3/youtube-dl/issues/1892

This is a test video for youtube-dl.

For more information, contact phihag@phihag.de ." -metadata "purl=https://www.youtube.com/watch?v=BaW_jenozKc" -metadata "comment=https://www.youtube.com/watch?v=BaW_jenozKc" -metadata "artist=Philipp Hagemeister" -movflags "+faststart" "file:c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video "'⧸⧹ä↭𝕐 [youtube.  BaW_jenozKc] {17}.temp.mkv"
[Exec] Executing command: .\helpertools\FFmpeg\bin\ffprobe -show_entries stream=start_time "c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {  17}.mkv"
ffprobe version N-110185-gb564ad8eac-20230407 Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 12.2.0 (crosstool-NG 1.25.0.152_89671bf)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --disable-libmfx --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20230407
  libavutil      58.  6.100 / 58.  6.100
  libavcodec     60.  9.100 / 60.  9.100
  libavformat    60.  4.101 / 60.  4.101
  libavdevice    60.  2.100 / 60.  2.100
  libavfilter     9.  5.100 /  9.  5.100
  libswscale      7.  2.100 /  7.  2.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
Input #0, matroska,webm, from 'c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test  video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.mkv':
  Metadata:
    title           : youtube-dl test video "'/\ä↭𝕐
    COMMENT         : https://www.youtube.com/watch?v=BaW_jenozKc
    COMPATIBLE_BRANDS: isom3gp6
    MAJOR_BRAND     : 3gp6
    MINOR_VERSION   : 256
    ARTIST          : Philipp Hagemeister
    DATE            : 20121002
    DESCRIPTION     : test chars:  "'/\ä↭𝕐
                    : test URL: https://github.com/rg3/youtube-dl/issues/1892
                    :
                    : This is a test video for youtube-dl.
                    :
                    : For more information, contact phihag@phihag.de .
    SYNOPSIS        : test chars:  "'/\ä↭𝕐
                    : test URL: https://github.com/rg3/youtube-dl/issues/1892
                    :
                    : This is a test video for youtube-dl.
                    :
                    : For more information, contact phihag@phihag.de .
    PURL            : https://www.youtube.com/watch?v=BaW_jenozKc
    ENCODER         : Lavf60.4.101
  Duration: 00:00:10.22, start: 0.000000, bitrate: 45 kb/s
  Stream #0:0: Video: mpeg4 (Simple Profile), yuv420p, 176x144 [SAR 1:1 DAR 11:9], 12 fps, 12 tbr, 1k tbn (default)
    Metadata:
      HANDLER_NAME    : IsoMedia File Produced by Google, 5-11-2011
      VENDOR_ID       : [0][0][0][0]
      DURATION        : 00:00:10.083000000
  Stream #0:1: Audio: aac (LC), 22050 Hz, mono, fltp (default)
    Metadata:
      HANDLER_NAME    : IsoMedia File Produced by Google, 5-11-2011
      VENDOR_ID       : [0][0][0][0]
      DURATION        : 00:00:10.216000000
[STREAM]
start_time=0.000000
[/STREAM]
[STREAM]
start_time=0.000000
[/STREAM]

========================================================= 2023-04-28 [20:15:48] ========== stage: post_process ===================================================================

[MoveFiles] Moving file "c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video  "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.en.ttml" to "c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä ↭𝕐\subs\youtube-dl test video "'
⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.en.ttml"
[Exec] Executing command: ..\curl\bin\curl.exe --insecure "https://www.youtube.com/watch?v=BaW_jenozKc" -o ".\\2012-10-02 youtube-dl test video "'/\ä↭𝕐\!nfo\home.html"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to open the file .\\2012-10-02 youtube-dl test video
Warning: '/\ä___\!nfo\home.html: No such file or directory
100  1381    0  1381    0     0   6618      0 --:--:-- --:--:-- --:--:--  6671
curl: (23) Failure writing output to destination

========================================================= 2023-04-28 [20:15:48] ========== stage: after_move ===================================================================

[info] Writing '%(comments|)j' to: c:\hp\-\#YT\c:⧹hp⧹-⧹#YT⧹2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐 ⧹\!nfo\84 comments.json
ERROR: Postprocessing: Command returned error code 23
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 3333, in process_info
  File "yt_dlp\YoutubeDL.py", line 3518, in post_process
  File "yt_dlp\YoutubeDL.py", line 3494, in run_all_pps
  File "yt_dlp\YoutubeDL.py", line 3473, in run_pp
  File "yt_dlp\postprocessor\common.py", line 24, in run
  File "yt_dlp\postprocessor\exec.py", line 33, in run
yt_dlp.utils.PostProcessingError: Command returned error code 23


========================================================= 2023-04-28 [20:15:48] ========== stage: after_video ===================================================================

ERROR: Preprocessing: Command returned error code 1

post_process

--parse-metadata "before_dl:filename:(?P<download_dir>.*\\\)"
--print-to-file "post_process:%(comments|)j" "%(download_dir)s\!nfo\%(comment_count|[aborted])s comments.json"

This
❌ creates an empty comments.json file
❌ in the wrong place: c:\downloads\c:⧹downloads⧹2012-10-02 youtube-dl test video\ instead of C:\downloads\2012-10-02 youtube-dl test video\!nfo
(note : vs )

log
yt-dlp test:youtube
[debug] Command-line config: ['test:youtube']
[debug] Portable config "c:\hp\-\!portableapps\yt-dlp\yt-dlp.conf": ['--verbose', '--no-playlist', '--format-sort', 'hasvid,ie_pref,quality,res,hdr,codec,size,br,asr,ext,fps,hasaud,lang,source,proto,id', '-F', '-f', 'bestvideo*+bestaudio/best', '-f-', '--paths', 'c:\\hp\\-\\#YT', '--ffmpeg-location', '.\\helpertools\\FFmpeg\\bin', '--no-simulate', '--no-quiet', '--progress', '--parse-metadata', '%(is_live)s:(?P<islive>True)', '--parse-metadata', '%(was_live)s:(?P<waslive>True)', '--alias', 'set-output', '-o {}".\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\%(playlist_index|)02d%(playlist_index& = |)s%(release_timestamp>%Y-%m-%d,release_date>%Y-%m-%d,modified_date>%Y-%m-%d,modified_timestamp>%Y-%m-%d,upload_date>%Y-%m-%d,upload_timestamp>%Y-%m-%d,timestamp>%Y-%m-%d,release_year,epoch>DL %Y-%m-%d [%H.%M.%S])s %(alt_title,title).100B%(alt_title.101B,title.101B&…|)s\\\\"{}', '--set-output', '', '%(title).120B%(title.121B&…|)s [%(extractor)s.%(islive&live.|)s%(id)s] {%(format_id)s}.%(ext)s', '--set-output', 'subtitle:', 'subs\\%(title).120B%(title.121B&…|)s [%(extractor)s.%(islive&live.|)s%(id)s] {%(format_id)s}.%(ext)s', '--set-output', 'infojson:', 'tech\\metadata.%(ext)s', '--set-output', 'link:', 'tech\\link.%(ext)s', '--set-output', 'description:', '!nfo\\synopsis.%(ext)s', '--set-output', 'annotation:', '!nfo\\annotations.%(ext)s', '--set-output', 'thumbnail:', 'thumbs\\thumb.%(ext)s', '--alias', 'set-pl_output', '-o {}".\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\\\"{}', '--set-pl_output', 'pl_infojson:', 'playlist metadata.%(ext)s', '--set-pl_output', 'pl_description:', 'playlist description.%(ext)s', '--set-pl_output', 'pl_thumbnail:', 'folder.%(ext)s', '--set-pl_output', 'pl_video:', '%(playlist_title,playlist|).120B%(playlist_title.121,playlist.121&…|)s [%(extractor)s.%(islive&live.|)s%(id)s] {%(format_id)s}.%(ext)s', '--output-na-placeholder', '~~', '--write-info-json', '--write-description', '--write-annotations', '--write-playlist-metafiles', '--get-comments', '--write-link', '--write-url-link', '--write-desktop-link', '--no-overwrites', '--no-post-overwrites', '--merge-output-format', 'mkv', '--remux-video', 'mkv', '--list-subs', '--write-subs', '--write-auto-subs', '--all-subs', '--sub-langs', 'all', '--extractor-args', 'youtube:skip=translated_subs', '--sub-format', 'all/ttml/vtt/best', '--list-thumbnails', '--write-thumbnail', '--write-all-thumbnails', '--embed-metadata', '--embed-chapters', '--no-embed-info-json', '--no-check-certificate', '--retries', 'inf', '--file-access-retries', 'inf', '--fragment-retries', 'inf', '--retry-sleep', 'exp=1', '--retry-sleep', 'http,fragment,file_access,extractor:exp=1', '--no-skip-unavailable-fragments', '--geo-bypass', '--audio-multistreams', '--print', 'pre_process:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: pre_process ===================================================================\r\n', '--print', 'after_filter:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: after_filter ===================================================================\r\n', '--print', 'video:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: video ===================================================================\r\n', '--print', 'before_dl:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: before_dl ===================================================================\r\n', '--print', 'post_process:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: post_process ===================================================================\r\n', '--print', 'after_move:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: after_move ===================================================================\r\n', '--print', 'after_video:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: after_video ===================================================================\r\n', '--print', 'playlist:\r\n========================================================= %(epoch>%Y-%m-%d [%H:%M:%S])s ========== stage: playlist ===================================================================\r\n', '--parse-metadata', 'video::(?P<comments>)', '--parse-metadata', 'video::(?P<formats>)', '--parse-metadata', 'video::(?P<thumbnails>)', '--parse-metadata', 'before_dl:filename:(?P<download_dir>.*\\\\)', '--print-to-file', 'post_process:%(comments|)j', '%(download_dir)s\\!nfo\\%(comment_count|[aborted])s comments.json', '--exec', 'pre_process:cd %(download_dir)q && IF EXIST !nfo ren !nfo !nfo.old & IF EXIST tech ren tech tech.old', '--alias', 'print-factsheet', '--print-to-file {} ".\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\%(playlist_index|)02d%(playlist_index& = |)s%(release_timestamp>%Y-%m-%d,release_date>%Y-%m-%d,modified_date>%Y-%m-%d,modified_timestamp>%Y-%m-%d,upload_date>%Y-%m-%d,upload_timestamp>%Y-%m-%d,timestamp>%Y-%m-%d,release_year,epoch>DL %Y-%m-%d [%H.%M.%S])s %(alt_title,title).100B%(alt_title.101B,title.101B&…|)s\\tech\\factsheet.nfo"', '--print-to-file', '%(requested_formats)j', '.\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\%(playlist_index|)02d%(playlist_index& = |)s%(release_timestamp>%Y-%m-%d,release_date>%Y-%m-%d,modified_date>%Y-%m-%d,modified_timestamp>%Y-%m-%d,upload_date>%Y-%m-%d,upload_timestamp>%Y-%m-%d,timestamp>%Y-%m-%d,release_year,epoch>DL %Y-%m-%d [%H.%M.%S])s %(alt_title,title).100B%(alt_title.101B,title.101B&…|)s\\tech\\AV info.json', '--print-to-file', '%(chapters|)j', '.\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\%(playlist_index|)02d%(playlist_index& = |)s%(release_timestamp>%Y-%m-%d,release_date>%Y-%m-%d,modified_date>%Y-%m-%d,modified_timestamp>%Y-%m-%d,upload_date>%Y-%m-%d,upload_timestamp>%Y-%m-%d,timestamp>%Y-%m-%d,release_year,epoch>DL %Y-%m-%d [%H.%M.%S])s %(alt_title,title).100B%(alt_title.101B,title.101B&…|)s\\!nfo\\chapters.json', '--exec', '..\\curl\\bin\\curl.exe --insecure "%(webpage_url,original_url)s" -o ".\\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\\%(playlist_index|)02d%(playlist_index& = |)s%(release_timestamp>%Y-%m-%d,release_date>%Y-%m-%d,modified_date>%Y-%m-%d,modified_timestamp>%Y-%m-%d,upload_date>%Y-%m-%d,upload_timestamp>%Y-%m-%d,timestamp>%Y-%m-%d,release_year,epoch>DL %Y-%m-%d [%H.%M.%S])s %(alt_title,title).100B%(alt_title.101B,title.101B&…|)s\\!nfo\\home.html"', '--exec', 'post_process:.\\helpertools\\FFmpeg\\bin\\ffprobe -show_entries stream=start_time %(filepath)q', '--print-factsheet', '%(playlist&--------------- PLAYLIST -------------------------------|)s%(playlist&\r\nplaylist_title:       |)s%(playlist_title|)s%(playlist&\r\nplaylist:             |)s%(playlist|)s%(playlist&\r\nplaylist_id:          |)s%(playlist_id|)s%(playlist&\r\nplaylist uploader:    |)s%(playlist_uploader|)s%(playlist&\r\nplaylist uploader id: |)s%(playlist_uploader_id|)s%(playlist&\r\nplaylist index:       |)s%(playlist_index&{} / |)s%(playlist_count|)s%(playlist&\r\nplaylist autonumber:  |)s%(playlist_autonumber&{} / |)s%(n_entries|)s%(playlist&\r\n---------------------------------------------------------|)sfilename:               %(filename|)s\r\n---------------- TITLE ----------------------------------\r\ntitle:                  %(title|)s\r\nfulltitle:              %(fulltitle|)s\r\nalt title:              %(alt_title|)s\r\ncategories:             %(categories|)l\r\ntags:                   %(tags|)l\r\n---------------- WWW ------------------------------------\r\nid:                     %(id|)s\r\ndisplay id:             %(display_id|)s\r\noriginal url:           %(original_url|)s\r\nwebpage url:            %(webpage_url|)s\r\nprotocol:               %(protocol|)s\r\nextractor:              %(extractor|)s\r\nextractor key:          %(extractor_key|)s\r\n---------------- TIME ----------------------------------\r\nlocation:               %(location|)s\r\nlive status:            %(live_status|)s (islive:%(islive&yes|no)s, waslive:%(waslive&yes|no)s)\r\nreleased:               %(release_timestamp>%Y-%m-%d %H:%M,release_date>%Y-%m-%d,release_year|)s\r\nlast modified:          %(modified_timestamp>%Y-%m-%d %H:%M,modified_date>%Y-%m-%d|)s\r\nuploaded:               %(upload_timestamp>%Y-%m-%d %H:%M,upload_date>%Y-%m-%d|)s\r\nbecame available:       %(timestamp>%Y-%m-%d %H:%M|)s\r\ndownload start:         %(epoch>%Y-%m-%d %H:%M:%S)s UTC\r\n   runtime:             %(duration>%H:%M:%S,duration_string|)19s\r\nstart time:             %(start_time>%H:%M:%S|)19s\r\n  end time:             %(end_time>%H:%M:%S|)19s\r\n---------------- A/V -----------------------------------\r\nformat id:              %(format_id|)s\r\nformat:                 %(format|)s\r\nformat note:            %(format_note|)s\r\nhas DRM:                %(has_drm,_has_drm|-)s / %(requested_formats.0.has_drm|)s / %(requested_formats.1.has_drm|)s\r\naudio bitrate:          %(abr|)4d KBit/s\r\nvideo bitrate:          %(vbr|)4d KBit/s\r\na/v bitrate:            %(tbr|)4d KBit/s\r\nfilesize:               %(filesize&{:,} bytes|)s%(filesize_approx&~{:,} bytes|)s\r\next:                    %(ext|)s%(container& / {}|)s\r\n--------------- VIDEO ----------------------------------\r\nvcodec:                 %(vcodec|)s\r\nresolution:             %(width|)s*%(height|)s\r\naspect ratio:           %(aspect_ratio|)s\r\nstretched ratio:        %(stretched_ratio|)s\r\nframe rate:             %(fps|)s fps\r\ndynamic range:          %(dynamic_range|)s\r\n--------------- AUDIO ----------------------------------\r\nacodec:                 %(acodec|)s\r\nasr:                    %(asr|)s Hz\r\naudio channels:         %(audio_channels|)s\r\nlanguage:               %(language&{} |)s%(requested_formats.0.language&{} |)s%(requested_formats.1.language&{} |)s%(requested_formats.2.language&{} |)s%(requested_formats.3.language&{} |)s%(requested_formats.4.language&{} |)s%(requested_formats.5.language&{} |)s\r\n-------------- web 2.0 ---------------------------------\r\naverage rating:         %(average_rating|)s\r\nage limit:              %(age_limit|)s\r\nviewcount:              %(view_count&{} views|)16s\r\nconcurrent views:       %(concurrent_view_count&{} views|)16s\r\nlikes:                  %(like_count&{} likes|)16s%(dislike_count& / {} dislikes|)s\r\nreposts:                %(repost_count&{} reposts|)18s\r\ncomments:               %(comment_count&{} comments|)19s\r\n-------------- source ----------------------------------\r\ncreator:                %(creator|)s\r\nuploader:               %(uploader|)s\r\nuploader id:            %(uploader_id|)s\r\nchannel:                %(channel|)s\r\nchannel id:             %(channel_id|)s\r\nchannel followers:      %(channel_follower_count&{} followers|)s\r\navailability:           %(availability|)s\r\nlicense:                %(license|)s\r\nURLs:\r\n%(urls,url|)s']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2023.04.28.193828 [f005a35aa] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-110185-gb564ad8eac-20230407 (setts), ffprobe N-110185-gb564ad8eac-20230407
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.2
[debug] Proxy map: {}
[debug] Loaded 1810 extractors
[TestURL] Extracting URL: test:youtube
[TestURL] Test URL: https://www.youtube.com/watch?v=BaW_jenozKc&t=1s&end=9
[youtube] Extracting URL: https://www.youtube.com/watch?v=BaW_jenozKc&t=1s&end=9
[youtube] BaW_jenozKc: Downloading webpage
[youtube] BaW_jenozKc: Downloading android player API JSON
[info] BaW_jenozKc: Downloading subtitles: en
[debug] Sort order given by user: hasvid, ie_pref, quality, res, hdr, codec, size, br, asr, ext, fps, hasaud, lang, source, proto, id
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, hdr, vcodec, acodec, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, fps, hasaud, lang, source, proto, id, channels
[debug] Searching for '(?P<islive>True)' in '%(is_live)s'
[MetadataParser] Could not interpret '%(is_live)s' as '(?P<islive>True)'
[debug] Searching for '(?P<waslive>True)' in '%(was_live)s'
[MetadataParser] Could not interpret '%(was_live)s' as '(?P<waslive>True)'
[Exec] Executing command: cd "~~" && IF EXIST !nfo ren !nfo !nfo.old & IF EXIST tech ren tech tech.old
Das System kann den angegebenen Pfad nicht finden.

========================================================= 2023-04-28 [20:16:57] ========== stage: pre_process ===================================================================

ERROR: Preprocessing: Command returned error code 1
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 3504, in pre_process
  File "yt_dlp\YoutubeDL.py", line 3494, in run_all_pps
  File "yt_dlp\YoutubeDL.py", line 3473, in run_pp
  File "yt_dlp\postprocessor\common.py", line 24, in run
  File "yt_dlp\postprocessor\exec.py", line 33, in run
yt_dlp.utils.PostProcessingError: Command returned error code 1

[youtube] Downloading comment section API JSON
[youtube] Downloading ~84 comments
[youtube] Sorting comments by newest first
[youtube] Downloading comment API JSON page 1 (0/84)
[youtube] Downloading comment API JSON page 2 (20/84)
[youtube]     Downloading comment API JSON reply thread 1 (25/84)
[youtube]     Downloading comment API JSON reply thread 2 (34/84)
[youtube]     Downloading comment API JSON reply thread 3 (37/84)
[youtube]     Downloading comment API JSON reply thread 4 (39/84)
[youtube] Downloading comment API JSON page 3 (51/84)
[youtube]     Downloading comment API JSON reply thread 1 (54/84)
[youtube]     Downloading comment API JSON reply thread 2 (57/84)
[youtube]     Downloading comment API JSON reply thread 3 (60/84)
[youtube]     Downloading comment API JSON reply thread 4 (68/84)
[youtube]        Downloading comment replies API JSON page 1 (78/84)
[youtube] Extracted 84 comments

========================================================= 2023-04-28 [20:16:57] ========== stage: after_filter ===================================================================

[info] Available thumbnails for BaW_jenozKc:
ID Width   Height  URL
0  unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/3.jpg
1  unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/3.webp
2  unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/2.jpg
3  unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/2.webp
4  unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/1.jpg
5  unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/1.webp
6  unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/mq3.jpg
7  unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/mq3.webp
8  unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/mq2.jpg
9  unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/mq2.webp
10 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/mq1.jpg
11 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/mq1.webp
12 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/hq3.jpg
13 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/hq3.webp
14 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/hq2.jpg
15 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/hq2.webp
16 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/hq1.jpg
17 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/hq1.webp
18 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/sd3.jpg
19 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/sd3.webp
20 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/sd2.jpg
21 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/sd2.webp
22 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/sd1.jpg
23 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/sd1.webp
24 120     90      https://i.ytimg.com/vi/BaW_jenozKc/default.jpg
25 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/default.webp
26 320     180     https://i.ytimg.com/vi/BaW_jenozKc/mqdefault.jpg
27 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/mqdefault.webp
28 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/0.jpg
29 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/0.webp
30 168     94      https://i.ytimg.com/vi/BaW_jenozKc/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBdrRddrIfyq2ucu8zSkKH8OBJx4w
31 196     110     https://i.ytimg.com/vi/BaW_jenozKc/hqdefault.jpg?sqp=-oaymwEbCMQBEG5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLDcIFxOnwfD_QElq-UjQhMWQ-dkDQ
32 246     138     https://i.ytimg.com/vi/BaW_jenozKc/hqdefault.jpg?sqp=-oaymwEcCPYBEIoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDFYc6hdanFAt6qWX8vwK3QXP8DMA
33 336     188     https://i.ytimg.com/vi/BaW_jenozKc/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBC_Tq_vrsdYkBc8A6EACttj-6ZZw
34 480     360     https://i.ytimg.com/vi/BaW_jenozKc/hqdefault.jpg
35 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/hqdefault.webp
36 640     480     https://i.ytimg.com/vi/BaW_jenozKc/sddefault.jpg
37 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/sddefault.webp
38 unknown unknown https://i.ytimg.com/vi/BaW_jenozKc/hq720.jpg
39 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/hq720.webp
40 1920    1080    https://i.ytimg.com/vi/BaW_jenozKc/maxresdefault.jpg
41 unknown unknown https://i.ytimg.com/vi_webp/BaW_jenozKc/maxresdefault.webp
BaW_jenozKc has no automatic captions
[info] Available subtitles for BaW_jenozKc:
Language Name    Formats
en       English vtt, ttml, srv3, srv2, srv1, json3
[info] Available formats for BaW_jenozKc:
ID  EXT  RESOLUTION FPS CH │   FILESIZE   TBR PROTO │ VCODEC        VBR ACODEC      ABR ASR MORE INFO
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
139 m4a  audio only      258.59KiB   48k https │ audio only        mp4a.40.5   48k 22k low, ANDR, m4a_dash
249 webm audio only      258.17KiB   48k https │ audio only        opus        48k 48k low, ANDR, webm_dash
250 webm audio only      276.07KiB   63k https │ audio only        opus        63k 48k low, ANDR, webm_dash
140 m4a  audio only      2154.06KiB  128k https │ audio only        mp4a.40.2  128k 44k medium, ANDR, m4a_dash
251 webm audio only      2138.96KiB  116k https │ audio only        opus       116k 48k medium, ANDR, webm_dash
17  3gp  176x144     12  155.79KiB   45k https │ mp4v.20.3     45k mp4a.40.2    0k 22k 144p, ANDR
160 mp4  256x144     15135.08KiB  113k https │ avc1.4d400c  113k video only          144p, ANDR, mp4_dash
278 webm 256x144     3052.22KiB   44k https │ vp9           44k video only          144p, ANDR, webm_dash
133 mp4  426x240     30294.27KiB  246k https │ avc1.4d4015  246k video only          240p, ANDR, mp4_dash
242 webm 426x240     3033.27KiB   28k https │ vp9           28k video only          240p, ANDR, webm_dash
134 mp4  640x360     30349.59KiB  292k https │ avc1.4d401e  292k video only          360p, ANDR, mp4_dash
18  mp4  640x360     30  2 │ ~525.60KiB  420k https │ avc1.42001E  420k mp4a.40.2    0k 44k 360p, ANDR
243 webm 640x360     3075.55KiB   63k https │ vp9           63k video only          360p, ANDR, webm_dash
135 mp4  854x480     30849.41KiB  710k https │ avc1.4d401f  710k video only          480p, ANDR, mp4_dash
244 webm 854x480     30165.49KiB  138k https │ vp9          138k video only          480p, ANDR, webm_dash
136 mp4  1280x720    301.60MiB 1366k https │ avc1.4d401f 1366k video only          720p, ANDR, mp4_dash
22  mp4  1280x720    30  2 │ ~  1.82MiB 1493k https │ avc1.64001F 1493k mp4a.40.2    0k 44k 720p, ANDR
247 webm 1280x720    30504.68KiB  420k https │ vp9          420k video only          720p, ANDR, webm_dash
137 mp4  1920x1080   302.11MiB 1803k https │ avc1.640028 1803k video only          1080p, ANDR, mp4_dash
248 webm 1920x1080   30965.31KiB  804k https │ vp9          804k video only          1080p, ANDR, webm_dash

Enter format selector: w
[info] BaW_jenozKc: Downloading 1 format(s): 17
[debug] Searching for '(?P<comments>)' in ''
[MetadataParser] Parsed comments from '': ''
[debug] Searching for '(?P<formats>)' in ''
[MetadataParser] Parsed formats from '': ''
[debug] Searching for '(?P<thumbnails>)' in ''
[MetadataParser] Parsed thumbnails from '': ''

========================================================= 2023-04-28 [20:16:57] ========== stage: video ===================================================================

[info] Writing '%(requested_formats)j' to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\tec h\AV info.json
[info] Writing '%(chapters|)j' to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\!nfo\chapte rs.json
[info] Writing '%(playlist&--------------- PLAYLIST -------------------------------|)s%(playlist&\r\nplaylist_title:       |)s%(playlist_title|)s%(playlist&\r\nplaylist:             |)s%(playlist|)s%(playlist&\r\nplaylist_id:          |)s%(playlist_id|)s%(playlist&\r\nplaylist uploader:    |)s%(playlist_uploader|)s%(playlist&\r\nplaylist uploader id: |)s%(playlist_uploader_id|)s%(playlist&\r\nplaylist index:       |)s%(playlist_index&{} / |)s%(playlist_count|)s%(playlist&\r\nplaylist autonumber:  |)s%(playlist_autonumber&{} / |)s%(n_entries|)s%(playlist&\r\n---------------------------------------------------------|)sfilename:               %(filename|)s\r\n---------------- TITLE ----------------------------------\r\ntitle:                  %(title|)s\r\nfulltitle:              %(fulltitle|)s\r\nalt title:              %(alt_title|)s\r\ncategories:             %(categories|)l\r\ntags:                   %(tags|)l\r\n---------------- WWW ------------------------------------\r\nid:                     %(id|)s\r\ndisplay id:             %(display_id|)s\r\noriginal url:           %(original_url|)s\r\nwebpage url:            %(webpage_url|)s\r\nprotocol:               %(protocol|)s\r\nextractor:              %(extractor|)s\r\nextractor key:          %(extractor_key|)s\r\n---------------- TIME ----------------------------------\r\nlocation:               %(location|)s\r\nlive status:            %(live_status|)s (islive:%(islive&yes|no)s, waslive:%(waslive&yes|no)s)\r\nreleased:               %(release_timestamp>%Y-%m-%d %H:%M,release_date>%Y-%m-%d,release_year|)s\r\nlast modified:          %(modified_timestamp>%Y-%m-%d %H:%M,modified_date>%Y-%m-%d|)s\r\nuploaded:               %(upload_timestamp>%Y-%m-%d %H:%M,upload_date>%Y-%m-%d|)s\r\nbecame available:       %(timestamp>%Y-%m-%d %H:%M|)s\r\ndownload start:         %(epoch>%Y-%m-%d %H:%M:%S)s UTC\r\n   runtime:             %(duration>%H:%M:%S,duration_string|)19s\r\nstart time:             %(start_time>%H:%M:%S|)19s\r\n  end time:             %(end_time>%H:%M:%S|)19s\r\n---------------- A/V -----------------------------------\r\nformat id:              %(format_id|)s\r\nformat:                 %(format|)s\r\nformat note:            %(format_note|)s\r\nhas DRM:                %(has_drm,_has_drm|-)s / %(requested_formats.0.has_drm|)s / %(requested_formats.1.has_drm|)s\r\naudio bitrate:          %(abr|)4d KBit/s\r\nvideo bitrate:          %(vbr|)4d KBit/s\r\na/v bitrate:            %(tbr|)4d KBit/s\r\nfilesize:               %(filesize&{:,} bytes|)s%(filesize_approx&~{:,} bytes|)s\r\next:                    %(ext|)s%(container& / {}|)s\r\n--------------- VIDEO ----------------------------------\r\nvcodec:                 %(vcodec|)s\r\nresolution:             %(width|)s*%(height|)s\r\naspect ratio:           %(aspect_ratio|)s\r\nstretched ratio:        %(stretched_ratio|)s\r\nframe rate:             %(fps|)s fps\r\ndynamic range:          %(dynamic_range|)s\r\n--------------- AUDIO ----------------------------------\r\nacodec:                 %(acodec|)s\r\nasr:                    %(asr|)s Hz\r\naudio channels:         %(audio_channels|)s\r\nlanguage:               %(language&{} |)s%(requested_formats.0.language&{} |)s%(requested_formats.1.language&{} |)s%(requested_formats.2.language&{} |)s%(requested_formats.3.language&{} |)s%(requested_formats.4.language&{} |)s%(requested_formats.5.language&{} |)s\r\n-------------- web 2.0 ---------------------------------\r\naverage rating:         %(average_rating|)s\r\nage limit:              %(age_limit|)s\r\nviewcount:              %(view_count&{} views|)16s\r\nconcurrent views:       %(concurrent_view_count&{} views|)16s\r\nlikes:                  %(like_count&{} likes|)16s%(dislike_count& / {} dislikes|)s\r\nreposts:                %(repost_count&{} reposts|)18s\r\ncomments:               %(comment_count&{} comments|)19s\r\n-------------- source ----------------------------------\r\ncreator:                %(creator|)s\r\nuploader:               %(uploader|)s\r\nuploader id:            %(uploader_id|)s\r\nchannel:                %(channel|)s\r\nchannel id:             %(channel_id|)s\r\nchannel followers:      %(channel_follower_count&{} followers|)s\r\navailability:           %(availability|)s\r\nlicense:                %(license|)s\r\nURLs:\r\n%(urls,url|)s' to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\tech\factsheet.nfo
[info] Writing video description to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\!nfo\syno psis.description
[info] Writing video subtitles to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl  test video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.en.ttml
[debug] Invoking http downloader on "https://www.youtube.com/api/timedtext?v=BaW_jenozKc&caps=asr&opi=112496729&xoaf=5&hl=en&ip=0.0.0.0&ipbits=0&expire=1682738216&sparams=ip%2Cipbits%2Cexpire%2Cv%2Ccaps%2Copi%2Cxoaf&signature=174182829F9F96E181A108410B613388BE882C1B.EA0596832B9C5CC93DE48AA88D96B497D33B8FDE&key=yt8&lang=en&fmt=ttml"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video  "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.en.ttml
[download] 100% of    820.00B in 00:00:00 at 5.44KiB/s
[info] There's no video thumbnails to download
[info] Writing video metadata as JSON to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\tech \metadata.info.json
WARNING: There are no annotations to write.
[info] Writing internet shortcut (.url) to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\te ch\link.url
[info] Writing internet shortcut (.desktop) to: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭�\\tech\link.desktop
[debug] Searching for '(?P<download_dir>.*\\\\)' in '%(filename)s'
[MetadataParser] Parsed download_dir from '%(filename)s': "c:\\hp\\-\\#YT\\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\\"

========================================================= 2023-04-28 [20:16:57] ========== stage: before_dl ===================================================================

[debug] Invoking http downloader on "https://rr4---sn-h0jeenek.googlevideo.com/videoplayback?expire=1682734617&ei=uSlMZJCVHZLBgAeip42ADg&ip=91.118.143.91&id=o-AAuyNnSo-UU-lu0sqVXHEqo8aYwqeN4W5N9J2kAXPnC-&itag=17&source=youtube&requiressl=yes&mh=Rf&mm=31%2C26&mn=sn-h0jeenek%2Csn-4g5ednde&ms=au%2Conr&mv=m&mvi=4&pl=16&initcwndbps=940000&spc=qEK7Bys0nciOCCMK2R3IpiJQLX5O920&vprv=1&svpuc=1&mime=video%2F3gpp&gir=yes&clen=57125&dur=10.216&lmt=1387961822994781&mt=1682712780&fvip=3&fexp=24007246&c=ANDROID&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhALdTD51qLb5XbrSeA6EB1DxuGmbzx-ONl2X9BSAUKKdyAiEAisvqv1GzoGI9tvks8DAuI_LSRoIE8xn9ruOoRt_tWEg%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgMDmadvEgDp5vkpdrVvDMYGMjVzOtf3pIRXN12wu1EmACIHygnTORvmWK_ucyx69p7F109rotdmz7fslTzyJZVD_L"
[download] Destination: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video  "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.3gp
[download] 100% of   55.79KiB in 00:00:00 at 164.51KiB/s
[VideoRemuxer] Remuxing video from 3gp to mkv; Destination: c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.mkv
[debug] ffmpeg command line: ".\helpertools\FFmpeg\bin\ffmpeg" -y -loglevel "repeat+info" -i "file:c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video "'⧸⧹ä↭𝕐 [youtube.BaW_jen  ozKc] {17}.3gp" -map 0 -dn -ignore_unknown -c copy -movflags "+faststart" "file:c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\y outube-dl test video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.mkv"
Deleting original file c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video  "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.3gp (pass -k to keep)
[Metadata] Adding metadata to "c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test  video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.mkv"
[debug] ffmpeg command line: ".\helpertools\FFmpeg\bin\ffmpeg" -y -loglevel "repeat+info" -i "file:c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video "'⧸⧹ä↭𝕐 [youtube.BaW_jen  ozKc] {17}.mkv" -map 0 -dn -ignore_unknown -c copy -write_id3v1 1 -metadata "title=youtube-dl test video \"'/\ä↭𝕐" -metadata "date=201 21002" -metadata "description=test chars:  \"'/\ä↭𝕐
test URL: https://github.com/rg3/youtube-dl/issues/1892

This is a test video for youtube-dl.

For more information, contact phihag@phihag.de ." -metadata "synopsis=test chars:  \"'/\ä↭𝕐
test URL: https://github.com/rg3/youtube-dl/issues/1892

This is a test video for youtube-dl.

For more information, contact phihag@phihag.de ." -metadata "purl=https://www.youtube.com/watch?v=BaW_jenozKc" -metadata "comment=https://www.youtube.com/watch?v=BaW_jenozKc" -metadata "artist=Philipp Hagemeister" -movflags "+faststart" "file:c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video "'⧸⧹ä↭𝕐 [youtube.  BaW_jenozKc] {17}.temp.mkv"
[Exec] Executing command: .\helpertools\FFmpeg\bin\ffprobe -show_entries stream=start_time "c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {  17}.mkv"
ffprobe version N-110185-gb564ad8eac-20230407 Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 12.2.0 (crosstool-NG 1.25.0.152_89671bf)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --disable-libmfx --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20230407
  libavutil      58.  6.100 / 58.  6.100
  libavcodec     60.  9.100 / 60.  9.100
  libavformat    60.  4.101 / 60.  4.101
  libavdevice    60.  2.100 / 60.  2.100
  libavfilter     9.  5.100 /  9.  5.100
  libswscale      7.  2.100 /  7.  2.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
Input #0, matroska,webm, from 'c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test  video "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.mkv':
  Metadata:
    title           : youtube-dl test video "'/\ä↭𝕐
    COMMENT         : https://www.youtube.com/watch?v=BaW_jenozKc
    COMPATIBLE_BRANDS: isom3gp6
    MAJOR_BRAND     : 3gp6
    MINOR_VERSION   : 256
    ARTIST          : Philipp Hagemeister
    DATE            : 20121002
    DESCRIPTION     : test chars:  "'/\ä↭𝕐
                    : test URL: https://github.com/rg3/youtube-dl/issues/1892
                    :
                    : This is a test video for youtube-dl.
                    :
                    : For more information, contact phihag@phihag.de .
    SYNOPSIS        : test chars:  "'/\ä↭𝕐
                    : test URL: https://github.com/rg3/youtube-dl/issues/1892
                    :
                    : This is a test video for youtube-dl.
                    :
                    : For more information, contact phihag@phihag.de .
    PURL            : https://www.youtube.com/watch?v=BaW_jenozKc
    ENCODER         : Lavf60.4.101
  Duration: 00:00:10.22, start: 0.000000, bitrate: 45 kb/s
  Stream #0:0: Video: mpeg4 (Simple Profile), yuv420p, 176x144 [SAR 1:1 DAR 11:9], 12 fps, 12 tbr, 1k tbn (default)
    Metadata:
      HANDLER_NAME    : IsoMedia File Produced by Google, 5-11-2011
      VENDOR_ID       : [0][0][0][0]
      DURATION        : 00:00:10.083000000
  Stream #0:1: Audio: aac (LC), 22050 Hz, mono, fltp (default)
    Metadata:
      HANDLER_NAME    : IsoMedia File Produced by Google, 5-11-2011
      VENDOR_ID       : [0][0][0][0]
      DURATION        : 00:00:10.216000000
[STREAM]
start_time=0.000000
[/STREAM]
[STREAM]
start_time=0.000000
[/STREAM]

========================================================= 2023-04-28 [20:16:57] ========== stage: post_process ===================================================================

[info] Writing '%(comments|)j' to: c:\hp\-\#YT\c:⧹hp⧹-⧹#YT⧹2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐 ⧹\!nfo\84 comments.json
[MoveFiles] Moving file "c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐\youtube-dl test video  "'⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.en.ttml" to "c:\hp\-\#YT\2012-10-02 youtube-dl test video "'⧸⧹ä ↭𝕐\subs\youtube-dl test video "'
⧸⧹ä↭𝕐 [youtube.BaW_jenozKc] {17}.en.ttml"
[Exec] Executing command: ..\curl\bin\curl.exe --insecure "https://www.youtube.com/watch?v=BaW_jenozKc" -o ".\\2012-10-02 youtube-dl test video "'/\ä↭𝕐\!nfo\home.html"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to open the file .\\2012-10-02 youtube-dl test video
Warning: '/\ä___\!nfo\home.html: No such file or directory
100  1381    0  1381    0     0   7212      0 --:--:-- --:--:-- --:--:--  7268
curl: (23) Failure writing output to destination

========================================================= 2023-04-28 [20:16:57] ========== stage: after_move ===================================================================

ERROR: Postprocessing: Command returned error code 23
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 3333, in process_info
  File "yt_dlp\YoutubeDL.py", line 3518, in post_process
  File "yt_dlp\YoutubeDL.py", line 3494, in run_all_pps
  File "yt_dlp\YoutubeDL.py", line 3473, in run_pp
  File "yt_dlp\postprocessor\common.py", line 24, in run
  File "yt_dlp\postprocessor\exec.py", line 33, in run
yt_dlp.utils.PostProcessingError: Command returned error code 23


========================================================= 2023-04-28 [20:16:57] ========== stage: after_video ===================================================================

ERROR: Preprocessing: Command returned error code 1

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

see above

@chrizilla chrizilla added the question Question label Apr 28, 2023
@pukkandan
Copy link
Member

❌ in the wrong place: C:\downloads\~~\!nfo instead of C:\downloads\2012-10-02 youtube-dl test video\!nfo

As I already pointed out in another issue, the infodict of after_video has a different structure to previou stages since it no longer necessarily represent a single download. The download_dir you parsed is now in requested_downloads.0.download_dir


For others, show verbose log. I shouldn't have to try it myself or make guesses to answer!

@chrizilla

This comment was marked as resolved.

@pukkandan
Copy link
Member

pukkandan commented Apr 28, 2023

[info] Writing '%(comments|)j' to: c:\hp\-\#YT\c:⧹hp⧹-⧹#YT⧹2012-10-02 youtube-dl test video "'⧸⧹ä↭𝕐 ⧹\!nfo\84 comments.json

The file is being written, just not where you expected.

--parse-metadata "before_dl:filename:(?P<download_dir>.*\\\)"
--print-to-file "after_move:%(comments|)j" "%(download_dir)s\!nfo\%(comment_count|[aborted])s comments.json"

I believe I mentioned in a previous issue (when we discussed aliases?) that you cannot use variables like this. No?1 Fields are sanitized when used in filenames. You are going about this the totally wrong way as I have been repeatedly saying. The way to avoid duplicating code is not to try and perform magic with --parse-metadata, but to write a script with actual variables!

When you asked how to extract download dir, I assumed you just want it to be used for --exec etc, not to by passed into yet another outtmpl. Even if I had added a new download_dir variable like you suggested back there, you still would have ended up in this problem! I suggest you please read https://xyproblem.info before further questions.

Footnotes

  1. I can't be bothered to find the exact comment in the mountains of questions.

@chrizilla

This comment was marked as off-topic.

@pukkandan
Copy link
Member

I kept answering that I don't understand what this means: here and here

You don't understand what it means to write a script?

@chrizilla
Copy link
Author

chrizilla commented Apr 29, 2023

I'd need to tell the script where the download_dir is. yt-dlp doesn't give us this information until stage 4:before_dl apparently. So it doesn't help:

  • Once yt-dlp tells us the full_path in stage 4, everything can be done from within yt-dlp and an external script is unnecessary.
  • Before that (in stages 1-3), as long as full_path is unknown, I cannot call an external script.

For example:
I have various sidecar files (chapters, description, comments, metadata.json, etc.) in a subfolder: download_dir!nfo . When resuming downloads (i.e. when this subfolder already exists from a previous yt-dlp run) I would like to rename !nfo to !nfo.old in stage 1:pre_process so that files don't get overwritten or appended with duplicate data.

How can I achieve that?
In stage 1:pre_process I cannot tell the script where the download_dir is because yt-dlp refuses to tell me in stages 1-3. Yt-dlp only tells me in stage 4:before_dl (at which point I can do it myself from inside yt-dlp without an external script) but that's too late, because at that stage the !nfo dir and some files inside have already been created even on 1st run of yt-dlp.

@chrizilla
Copy link
Author

chrizilla commented Apr 29, 2023

you cannot use variables like this.

Why ??
You taught me that here:

--parse "%(chapters|)j:(?P<chapter_json>.*)" --exec something "%(chapter_json|)q"

Isn't this very much alike ?

you asked how to extract download dir
Even if I had added a new download_dir variable like you suggested back there, you still would have ended up in this problem!

Why?

As far as I can see, all my problems would be solved if 3 variables were available at all stages and for all parameters (not just for print) as requested in #6931:

  • yt-dlp's home download dir (as defined by --paths , e.g. D:\downloads)
  • the video's full path filepath , e.g. D:\downloads\title\video.mp4
  • the videos's download_dir e.g. D:\downloads\title

This would really be a godsend.

I think this is a decent request.
How are users supposed to accomplish any preprocessing if you don't give them these variables ??
Because from my tests, it seems that the download_dir is unknown in

  1. pre_process
  2. after_filter
  3. video

the infodict of after_video has a different structure to previou stages since it no longer necessarily represent a single download. The download_dir you parsed is now in requested_downloads.0.download_dir

Ok, so I guess I cannot use requested_downloads.0.download_dir as a solution for this issue, because it only works for a single download, so apparently not if playlists are downloaded, right? (or are there even further situations where multiple downloads occur, aside from playlists?)

@pukkandan
Copy link
Member

you cannot use variables like this.

Why ??

you asked how to extract download dir
Even if I had added a new download_dir variable like you suggested back there, you still would have ended up in this problem!

Why?

Because

Fields are sanitized when used in filenames.


Ok, so I guess I cannot use requested_downloads.0.download_dir as a solution for this issue, because it only works for a single download, so apparently not if playlists are downloaded, right? (or are there even further situations where multiple downloads occur, aside from playlists?)

It's not for playlists, but -f f1,f2


I'd need to tell the script where the download_dir is.

No, you don't. You are the one telling yt-dlp what template to use in the first place. See this example batch script:

set "download_dir=C:\%%(id)s"
yt-dlp -o "%download_dir%\%%(title)s" --print-to-file "%%(comments|)j" "%download_dir%\comments.json"

@chrizilla
Copy link
Author

chrizilla commented Apr 29, 2023

yt-dlp -o "%download_dir%\%%(title)s"

I am not sure I understand. I cannot call yt-dlp with %download_dir% because download_dir is decided by yt-dlp based upon:

-o ".\%(playlist_title,playlist|).100B%(playlist_title.101B,playlist.101B&…|)s\%(playlist_index|)02d%(playlist_index& = |)s%(release_timestamp>%Y-%m-%d,release_date>%Y-%m-%d,modified_date>%Y-%m-%d,modified_timestamp>%Y-%m-%d,upload_date>%Y-%m-%d,upload_timestamp>%Y-%m-%d,timestamp>%Y-%m-%d,release_year,epoch>DL %Y-%m-%d [%H.%M.%S])s %(alt_title,title).100B%(alt_title.101B,title.101B&…|)s\%(title).120B%(title.121&…|)s [%(extractor)s.%(islive&live.|)s%(id)s] {%(format_id)s}.%(ext)s"

I won't ever be able to recreate all of this in an external shell script (and even if I were, it would likely fail due to codepage hell).

Fields are sanitized when used in filenames.

I don't think this is the problem, because

  1. the sanitizing is always done in the same manner, so it would end up being the same download_dir which it clearly isn't:

    c:\hp-#YT\c:⧹hp⧹-⧹#YT...

    There must be something else/additional at play given the repeating path structure.

  2. AFAIK I can force ASCII characters by with %(filepath)a but that wouldn't prevent the repeating path structure either, no?

@chrizilla
Copy link
Author

chrizilla commented Apr 29, 2023

@pukkandan : I don't understand why you don't want to give us the 3 variables referenced above. This would solve all problems and outstanding issues.

If this is tricky to code, I understand.
But if it's just a matter of principle, then I understand less so, because:

How are users supposed to accomplish any preprocessing if you don't give them these variables ??
Because from my tests, it seems that the download_dir is unknown in
1. pre_process
2. after_filter
3. video

You already succeeded in Populate filename and urls fields at all stages of --print. If this works for --print, couldn't this be extended to --print-to-file and --exec (or to all parameters if a general solution is possible) ?

@pukkandan
Copy link
Member

yt-dlp -o "%download_dir%\%%(title)s"

I am not sure I understand. I cannot call yt-dlp with %download_dir% because download_dir is decided by yt-dlp based upon:

The var is not set to the actual dir, but the template. See how my example uses %(id)s.

I don't think this is the problem, because

  1. the sanitizing is always done in the same manner, so it would end up being the same download_dir which it clearly isn't:

No, sanitize(a)/sanitze(b) and sanitize(a/b) wil give different results.

This would solve all problems and outstanding issues.

It wouldn't, because of above

@chrizilla
Copy link
Author

chrizilla commented Apr 29, 2023

It wouldn't

I am absolutely certain it would, because:
I have already succeeded in making download_dir work in later stages where it is available:

--parse-metadata "before_dl:filename:(?P<download_dir>.*\\\)"

--exec after_move:'..\curl\bin\curl.exe --insecure "%(webpage_url,original_url)s" -o "%(download_dir)s\!nfo\home.html"'
--exec after_move:'.\helpertools\FFmpeg\bin\ffprobe -hide_banner -show_streams -show_format %(filepath)q -of json=c=0 -o "%(download_dir)s\tech\FFprobe results.json"'

This works! ✔️
So there is absolutely no reason why the very same field wouldn't work earlier (if it were available).

For example, I could solve my last remaining problem (prevent overwriting/appending preexisting metadata files) as follows if only the fields were available at pre_process stage already:

--exec pre_process:'IF EXIST %(download_dir)q CD %(download_dir)q && IF EXIST !nfo ren !nfo !nfo.old'

@pukkandan
Copy link
Member

pukkandan commented Apr 29, 2023

The problem is when you pass it as a filename to --print-to-file again. --exec do not go through filename sanitization...

I'm sorry, I don't know how to explain it any better. If you are sure it works, feel free to try implementing it and prove me wrong. Here is a POC implementation for adding the field:

diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index 8ee42b86a..b87f7b488 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -1122,6 +1122,9 @@ def prepare_outtmpl(self, outtmpl, info_dict, sanitize=False):
         """

         info_dict.setdefault('epoch', int(time.time()))  # keep epoch consistent once set
+        if 'download_dir' not in info_dict:
+            info_dict['download_dir'] = None  # Prevent recurssion
+            info_dict['download_dir'] = os.path.dirname(self.prepare_filename(info_dict))

         info_dict = self._copy_infodict(info_dict)
         info_dict['duration_string'] = (  # %(duration>%H-%M-%S)s is wrong if duration > 24hrs

@chrizilla
Copy link
Author

chrizilla commented Apr 29, 2023

--exec do not go through filename sanitization...

Ok, so you agree that it would solve my problem (which uses --exec pre_process as shown above):
--exec pre_process:'IF EXIST %(download_dir)q CD %(download_dir)q && IF EXIST !nfo ren !nfo !nfo.old'

prove me wrong

Above, I have already provided proof that it works (for --exec), no ?

The problem is when you pass it as a filename to --print-to-file again.

I'll play around to see if I can find a solution for that. But even if this ultimately fails and download_dir cannot be used for --print-to-file, the worst case scenario is that I'll just have to live with the convoluted path repetition (#6931) which is mostly a cosmetic problem.

But on the other hand, if download_dir works for --exec at least, that would already be a major enhancement.
Don't you want this improvement ?
I thought that you are not on board because it is too complex to code. But apparently you already succeeded with the code above?

feel free to try implementing it
Here is a POC implementation for adding the field:

What are you suggesting I should do? I haven't learned yet how to compile python code.

@pukkandan
Copy link
Member

pukkandan commented Apr 29, 2023

I believe I have already given explanations and alternate solutions for these to the best of my ability. I am not going to try and write them again. The tldr is:

  1. yt-dlp is not a scripting language or a do-it-all solution. Just because parse-metadata can be used for some advanced manipulation does not mean that you should use it for everything. Write proper scripts to do what you want.
  2. Unless a very strong usecase can be made for download_dir, it will not be added.
  3. The existence of download_dir won't help with your --print-to-file issue, irrespective of whether it is added by code or by --parse-metadata.
  4. It can be used in --exec as you want, but then, so can the --parse-metadata solution, making this not a sufficient argument for (2). Also, note (1) again - A proper script/env variable is still preferable here imho than the parse-metadata solution. But well, the option exists...
  5. The field also will not help with solution to avoid convoluted repetitions of filename pattern inside the config file #6931 because you need to process outtmpl to get the dir in the first place. So it make no sense to try and use the dir back in outtmpl. Again, just putting the template it in a script/env var is way easier!

@chrizilla
Copy link
Author

chrizilla commented Apr 29, 2023

Honestly, this leaves me heartbroken. For days on end I've been struggling to make things work and now you have even presented the solution in your code above but you don't want to add that code? Was that just to tease me?
It would have solved many (or all) of my issues and it would do no harm, so could you please add this improvement given that you already have the code apparently ?

  1. Unless a very strong usecase can be made for download_dir, it will not be added.

Isn't this a strong usecase given that it would solve a lot of issues ?
How can I make a strong usecase ?

  1. The existence of download_dir won't help with your --print-to-file issue, irrespective of whether it is added by code or by --parse-metadata.

I have yet to determine that, but it definitely WILL solve all problems that depend on --exec pre_process: !!
So that alone makes it worth it.

  1. It can be used in --exec as you want, but then, so can the --parse-metadata solution, making this not a sufficient argument for (2). Also, note (1) again - A proper script/env variable is still preferable here imho than the parse-metadata solution. But well, the option exists...

@pukkandan : I think you still partially misunderstand the problem: The user cannot --parse-metadata the download location during stages 1-3 as shown here. So, it would not only be a BIG HELP if you offered the required variables to the user, but it is currently IMPOSSIBLE, because users cannot --parse-metadata the field themselves in stages 1-3. So no, the option doesn't exist currently without your help.

I already explained this above in:

How are users supposed to accomplish any preprocessing if you don't give them these variables ??
Because from my tests, it seems that the download_dir is unknown in

  1. pre_process
  2. after_filter
  3. video

  1. The field also will not help with solution to avoid convoluted repitions of filename pattern inside the config file #6931 because you need to process outtmpl to get the dir in the first place.

As I already said in collapsed comment above @bashonly has solved 50% (the -o part) of #6931 with his --alias solution and the remaining 50% may or may not be solved by having these fields available. I will try if you give me a chance. (EDIT: I have tried and the sanitation doesn't seem to be a problem except for the directory backslash. If there is a solution to replace with \ then I think it may work out.) But that would only be a bonus and is not the only or even main argument for making these fields available to the user. The main argument is that preprocessing is not possible without knowing the download location!

Again, just putting the template it in a script/env var is way easier!

I explained in #6939 (comment) why I don't think it can be solved via an external script.

@chrizilla
Copy link
Author

I don't know what else to say, except ... just ... please 🙏 🛐

@pukkandan
Copy link
Member

And now you have even presented the solution in your code above but you don't want to add that code? Was that just to tease me?

It has many subtle bugs and since was just meant to be a POC so that you could see for yourself why adding a field won't actually solve your problems. But since you don't seem to know how to run patch yt-dlp from source, that ended up a pointless attempt.

It would have solved many (or all) of my issues

My point is that IT WONT! You have yet to show any use case which can't be done easily without this. I don't see any --exec pre_process: etc in your OP, so I have no clue what u want to do with it. The closest thing you are showing is that you can't "print download_dir at pre_process" (which can easily be done with the above example script btw). Certainly, that is not your actual use case?

You might want to explain what you are actually trying to accomplish. Is it just to write comments and delete it when empty? If so, you are extremely overcomplicating this. I bet your requirement will end up being easier for me to write the script for you than to continue this discussion.

Again, just putting the template it in a script/env var is way easier!

I explained in #6939 (comment) why I don't think it can be solved via an external script.

and I replied:

I am not sure I understand. I cannot call yt-dlp with %download_dir% because download_dir is decided by yt-dlp based upon:

The var is not set to the actual dir, but the template. See how my example uses %(id)s.

You should just change %%(id)s to whatever template you want.

@chrizilla chrizilla changed the title struggling to find the right stage for printing comments struggling to find the right stage for --print-to-file comments Apr 29, 2023
@chrizilla
Copy link
Author

chrizilla commented Apr 29, 2023

I will try figuring out your scripting suggestion, but I am afraid this will open a new can of worms.

You have yet to show any use case which can't be done easily without this. I don't see any --exec pre_process: etc in your OP, so I have no clue what u want to do with it. The closest thing you are showing is that you can't "print download_dir at pre_process". Certainly, that is not your actual use case?

You might want to explain what you are actually trying to accomplish. Is it just to write comments and delete it when empty? If so, you are extremely overcomplicating this. I bet your requirement will end up being easier for me to write the script for you than to continue this discussion.

Ok, then thank you for still trying to help me out. I have come a long way (thanks to your help) during the last weeks, but 3 2 problems remain. I will try to "xy" them as best I can:

  1. "Is it just to write comments and delete it when empty?" I want to stop writing empty metadata files.
    This is (not yet) handled in --print-to-file field IF field exists to prevent empty file from being written ? #6857

  2. When resuming downloads I need to prevent appending to preexisting metadata sidecar files from previous yt-dlp runs, which creates e.g. comment files with duplicate sets of comments.
    My favourite solution would be this:
    --exec pre_process:'IF EXIST %(download_dir)q CD %(download_dir)q && IF EXIST !nfo ren !nfo !nfo.old'
    But I cannot do this because I cannot parse download_dir at pre_process stage.
    "I don't see any --exec pre_process: etc in your OP" You are right. I mentioned this example as an answer to one of your questions, but should have opened a new issue instead, sorry. I have opened a separate issue to track this:
    prevent appending duplicate data to preexisting metadata files #6952

3. solved
  1. My config is bloated by the convoluted repetition of filename patterns.
    This is handled in solution to avoid convoluted repetitions of filename pattern inside the config file #6931
    Benefits are listed in that issue.
    Solutions for -o and --exec have already been found in that issue.
    A solution for --print-to-file is missing (edit: has been found) closes #6931.
    Since no solution for --print-to-file has been found so far, I have tried myself, resulting in struggling to find the right stage for --print-to-file comments #6939.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question
Projects
None yet
Development

No branches or pull requests

2 participants