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

Respect --ignore-errors for --write-info-json #7576

Open
8 of 9 tasks
snwefly opened this issue Jul 13, 2023 · 16 comments
Open
8 of 9 tasks

Respect --ignore-errors for --write-info-json #7576

snwefly opened this issue Jul 13, 2023 · 16 comments
Labels
bug Bug that is not site-specific question Question

Comments

@snwefly
Copy link

snwefly commented Jul 13, 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

video in question is xo5qfiAR6GY

yt-dlp --write-info-json --continue --ignore-errors xo5qfiAR6GY

It downloads perfectly on windows but getting error on linux

I thought "/" on the title causing the issue but video downloads without any issue when not using "--write-info-json" parameters.

is there any way to ignore json errors and keep downloading the video and what causing this error?

image

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

yt-dlp -vU --write-info-json --continue --ignore-errors  xo5qfiAR6GY
[debug] Command-line config: ['-vU', '--write-info-json', '--continue', '--ignore-errors', 'xo5qfiAR6GY']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.07.06 [b532a3481] (zip)
[debug] Python 3.10.4 (CPython x86_64 64bit) - Linux-5.10.0-0.bpo.15-amd64-x86_64-with-glibc2.28 (OpenSSL 1.1.1n  15 Mar 2022, glibc 2.28)
[debug] exe versions: ffmpeg 4.1.9-0, ffprobe 4.1.9-0
[debug] Optional libraries: certifi-2023.05.07, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.07.06, Current version: stable@2023.07.06
Current Build Hash: cedf44a9cf3c241520a692c1006d276e6f434d4d945727c47cb1a70d32953f4a
yt-dlp is up to date (stable@2023.07.06)
[youtube] Extracting URL: xo5qfiAR6GY
[youtube] xo5qfiAR6GY: Downloading webpage
[youtube] xo5qfiAR6GY: Downloading ios player API JSON
[youtube] xo5qfiAR6GY: Downloading android player API JSON
[debug] [youtube] Extracting signature function js_f2f137c6_100
[debug] Loading youtube-sigfuncs.js_f2f137c6_100 from cache
[debug] Loading youtube-nsig.f2f137c6 from cache
[debug] [youtube] Decrypted nsig LZhJTdXCb3whrlvU => Yg07V6B38_R2qQ
[youtube] xo5qfiAR6GY: Downloading m3u8 information
[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, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] xo5qfiAR6GY: Downloading 1 format(s): 137+251
[info] Writing video metadata as JSON to: 브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].info.json
ERROR: Cannot write video metadata to JSON file 브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].info.json
Traceback (most recent call last):
  File "server/yt-dlp/yt_dlp/YoutubeDL.py", line 4073, in _write_info_json
    write_json_file(self.sanitize_info(ie_result, self.params.get('clean_infojson', True)), infofn)
  File "server/yt-dlp/yt_dlp/utils/_utils.py", line 264, in write_json_file
  File "server/.pyenv/versions/3.10.4/lib/python3.10/tempfile.py", line 553, in NamedTemporaryFile
    (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
  File "server/.pyenv/versions/3.10.4/lib/python3.10/tempfile.py", line 256, in _mkstemp_inner
    fd = _os.open(file, flags, 0o600)
OSError: [Errno 36] File name too long: '브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].info.json.4po3w3rg.tmp'
@snwefly snwefly added the question Question label Jul 13, 2023
@bashonly
Copy link
Member

OSError: [Errno 36] File name too long

use the output template to shorten the filename, e.g.:
-o "%(title).100B [%(id)s].%(ext)s"

@october262
Copy link

try again with - yt-dlp -o '%(title).4s' --write-info-json "xo5qfiAR6GY"

@snwefly
Copy link
Author

snwefly commented Jul 13, 2023

OMG i completely missed the last line, Thanks

I don't like to use -output, trying to keep the file, name intact for archival purpose, is there any way to ignore json/name errors and keep downloading the video?

@gamer191
Copy link
Collaborator

--ignore-errors should have ignored that error imo (the error was about the info json, as demonstrated by the .info.json in the file name)

@pukkandan
Copy link
Member

The name will be too long for the video too.

@gamer191
Copy link
Collaborator

The name will be too long for the video too.

Apparently not, see my verbose logs below:

jay@Ubuntu11:~$ yt-dlp -v --write-info-json --ignore-errors  xo5qfiAR6GY
[debug] Command-line config: ['-v', '--write-info-json', '--ignore-errors', 'xo5qfiAR6GY']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.07.06 [b532a3481] (linux_exe)
[debug] Python 3.10.12 (CPython x86_64 64bit) - Linux-6.4.2-surface-x86_64-with-glibc2.37 (OpenSSL 3.1.1 30 May 2023, glibc 2.37)
[debug] exe versions: ffmpeg 5.1.2 (setts), ffprobe 5.1.2, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[youtube] Extracting URL: xo5qfiAR6GY
[youtube] xo5qfiAR6GY: Downloading webpage
[youtube] xo5qfiAR6GY: Downloading ios player API JSON
[youtube] xo5qfiAR6GY: Downloading android player API JSON
[debug] [youtube] Extracting signature function js_f2f137c6_104
[youtube] xo5qfiAR6GY: Downloading player f2f137c6
[debug] Saving youtube-sigfuncs.js_f2f137c6_104 to cache
[debug] Saving youtube-nsig.f2f137c6 to cache
[debug] [youtube] Decrypted nsig DdTADfPR4RTeuMPS => XYUKMbGaHGo45A
[youtube] xo5qfiAR6GY: Downloading m3u8 information
[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, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] xo5qfiAR6GY: Downloading 1 format(s): 137+251
[info] Writing video metadata as JSON to: 브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].info.json
ERROR: Cannot write video metadata to JSON file 브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].info.json
Traceback (most recent call last):
  File "yt_dlp/YoutubeDL.py", line 4073, in _write_info_json
  File "yt_dlp/utils/_utils.py", line 264, in write_json_file
  File "tempfile.py", line 559, in NamedTemporaryFile
  File "tempfile.py", line 556, in opener
  File "tempfile.py", line 256, in _mkstemp_inner
OSError: [Errno 36] File name too long: '/home/jay/브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].info.json.ittz5zw_.tmp'

jay@Ubuntu11:~$ yt-dlp -v --ignore-errors  xo5qfiAR6GY
[debug] Command-line config: ['-v', '--ignore-errors', 'xo5qfiAR6GY']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.07.06 [b532a3481] (linux_exe)
[debug] Python 3.10.12 (CPython x86_64 64bit) - Linux-6.4.2-surface-x86_64-with-glibc2.37 (OpenSSL 3.1.1 30 May 2023, glibc 2.37)
[debug] exe versions: ffmpeg 5.1.2 (setts), ffprobe 5.1.2, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[youtube] Extracting URL: xo5qfiAR6GY
[youtube] xo5qfiAR6GY: Downloading webpage
[youtube] xo5qfiAR6GY: Downloading ios player API JSON
[youtube] xo5qfiAR6GY: Downloading android player API JSON
[debug] [youtube] Extracting signature function js_f2f137c6_100
[youtube] xo5qfiAR6GY: Downloading player f2f137c6
[debug] Saving youtube-sigfuncs.js_f2f137c6_100 to cache
[debug] Loading youtube-nsig.f2f137c6 from cache
[debug] [youtube] Decrypted nsig -JDATzD89iYSTlEj => DMJ1VMGKtOyM5Q
[youtube] xo5qfiAR6GY: Downloading m3u8 information
[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, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] xo5qfiAR6GY: Downloading 1 format(s): 137+251
[debug] Invoking http downloader on "https://rr3---sn-u2bpouxgoxu-hxar.googlevideo.com/videoplayback?expire=1689281233&ei=cQ6wZJS1I9PmrtoPnLKn8AI&ip=27.32.184.222&id=o-AFOKd7FkzbQEwuhjJXWfnJDP8JjXRQOBPLXR8_pZ_y8c&itag=137&source=youtube&requiressl=yes&mh=Ja&mm=31%2C29&mn=sn-u2bpouxgoxu-hxar%2Csn-hxa76n7s&ms=au%2Crdu&mv=m&mvi=3&pl=24&initcwndbps=1761250&vprv=1&svpuc=1&mime=video%2Fmp4&gir=yes&clen=43237195&dur=201.366&lmt=1687333634255014&mt=1689259301&fvip=4&keepalive=yes&fexp=24007246&beids=24350017&c=IOS&txp=6219224&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhANZ2mpI6wJoB3yz_NRw4luWrd1cXYlOVUrWqqGZKJyaYAiEAnoiZYAsqqH9vAreboIEzTmox9-YV9s9BGpgz5qWyF1U%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAN2d2Pkpg8qIOIj0fK3tOzJwzITRuL7DlM-hKecJU3IpAiA7eiuugWZJVU6DO38UT9Ck40IsvfzcubrcYmbYA7BuuQ%3D%3D"
[download] Destination: 브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].f137.mp4
[download]   2.4% of   41.23MiB at  451.53KiB/s ETA 01:31^C
ERROR: Interrupted by user

@snwefly
Copy link
Author

snwefly commented Jul 13, 2023

This is strange .description is 12 char and .info.json is 10 char but yt-dlp able to download description but not the json.

yt-dlp -v --write-description --ignore-errors xo5qfiAR6GY
[debug] Command-line config: ['-v', '--write-description', '--ignore-errors', 'xo5qfiAR6GY']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.07.06 [b532a3481] (zip)
[debug] Python 3.10.4 (CPython x86_64 64bit) - Linux-5.10.0-0.bpo.15-amd64-x86_64-with-glibc2.28 (OpenSSL 1.1.1n  15 Mar 2022, glibc 2.28)
[debug] exe versions: ffmpeg 4.1.9-0, ffprobe 4.1.9-0
[debug] Optional libraries: certifi-2023.05.07, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[youtube] Extracting URL: xo5qfiAR6GY
[youtube] xo5qfiAR6GY: Downloading webpage
[youtube] xo5qfiAR6GY: Downloading ios player API JSON
[youtube] xo5qfiAR6GY: Downloading android player API JSON
[debug] [youtube] Extracting signature function js_4cc5d082_111
[debug] Loading youtube-sigfuncs.js_4cc5d082_111 from cache
[debug] Loading youtube-nsig.4cc5d082 from cache
[debug] [youtube] Decrypted nsig nFfklGsZF-xnDHliW2 => SAbIPtY_066rbA
[youtube] xo5qfiAR6GY: Downloading m3u8 information
[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, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] xo5qfiAR6GY: Downloading 1 format(s): 137+251
[info] Writing video description to: 브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].description
[download] 브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].mkv has already been downloaded
server@nova:~$ /home/server/yt-dlp -v --write-description --ignore-errors xo5qfiAR6GY
[debug] Command-line config: ['-v', '--write-description', '--ignore-errors', 'xo5qfiAR6GY']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.07.06 [b532a3481] (zip)
[debug] Python 3.10.4 (CPython x86_64 64bit) - Linux-5.10.0-0.bpo.15-amd64-x86_64-with-glibc2.28 (OpenSSL 1.1.1n  15 Mar 2022, glibc 2.28)
[debug] exe versions: ffmpeg 4.1.9-0, ffprobe 4.1.9-0
[debug] Optional libraries: certifi-2023.05.07, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[youtube] Extracting URL: xo5qfiAR6GY
[youtube] xo5qfiAR6GY: Downloading webpage
[youtube] xo5qfiAR6GY: Downloading ios player API JSON
[youtube] xo5qfiAR6GY: Downloading android player API JSON
[debug] [youtube] Extracting signature function js_4cc5d082_107
[youtube] xo5qfiAR6GY: Downloading player 4cc5d082
[debug] Saving youtube-sigfuncs.js_4cc5d082_107 to cache
[debug] Loading youtube-nsig.4cc5d082 from cache
[debug] [youtube] Decrypted nsig r_JHpsS_dT7gF4uEZN => a1XZIN6KOW4Lbw
[youtube] xo5qfiAR6GY: Downloading m3u8 information
[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, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] xo5qfiAR6GY: Downloading 1 format(s): 137+251
[info] Writing video description to: 브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].description
[debug] Invoking http downloader on "https://rr5---sn-5hne6nzy.googlevideo.com/videoplayback?expire=1689313249&ei=gYuwZIuGF-ycp-oP9fqMgA4&ip=46.232.211.96&id=o-AJ1dbpmhaqTZ2ut2QvBCWAHoRbgOYvJtnJfIw4UV0YKV&itag=137&source=youtube&requiressl=yes&mh=Ja&mm=31%2C29&mn=sn-5hne6nzy%2Csn-5hnekn7l&ms=au%2Crdu&mv=m&mvi=5&pl=23&initcwndbps=4815000&vprv=1&svpuc=1&mime=video%2Fmp4&gir=yes&clen=43237195&dur=201.366&lmt=1687333634255014&mt=1689291470&fvip=1&keepalive=yes&fexp=24007246%2C24362685%2C51000022&c=IOS&txp=6219224&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgVWME9ilBG743K1AnPrYvx5C-zqUjfTLUsZXqCKpibCkCIQC5pbC2VcxPJ3hwTPcatNu-LEJm6lw5tvHUZGZOausffg%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAP7V3Z1SQPswSulaolRTN32XBchHpgGSY2hJ6ceOjMKJAiANRUaM1voCTpLtZb6_UpCfzg8y84LXycQctpcf6ymJww%3D%3D"
[download] Destination: 브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].f137.mp4
[download] 100% of   41.23MiB in 00:00:00 at 47.17MiB/s
[debug] Invoking http downloader on "https://rr5---sn-5hne6nzy.googlevideo.com/videoplayback?expire=1689313249&ei=gYuwZNWwHr2hp-oPmpeOkAo&ip=46.232.211.96&id=o-ALl1v3vcKqIzREragA-d_9yDzSNx992gIo6fQW1x2WRq&itag=251&source=youtube&requiressl=yes&mh=Ja&mm=31%2C26&mn=sn-5hne6nzy%2Csn-4g5edns7&ms=au%2Conr&mv=m&mvi=5&pl=23&pcm2=no&initcwndbps=4815000&spc=Ul2SqwgIH2rb2E98aNPLjZCFP1oJORA&vprv=1&svpuc=1&mime=audio%2Fwebm&gir=yes&clen=3200460&dur=201.401&lmt=1648209738134415&mt=1689291227&fvip=2&keepalive=yes&fexp=24007246%2C24363391&beids=24350018&c=ANDROID&txp=6211224&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cpcm2%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgaDW2QQLXiVGW6DmfX3-MOaxdvR0GH1TI871GiUtgK18CIQDDKxeeGDxLV53nIdkKq4c-NVxIAZVkTHs0SSQMpJhOiw%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgWHX3q3s3QRVPY9facSFYqvToDvHjcmrSyCwOzQMsoRoCIQCmiujultEFv4pOw20w5WcvGK-XswZw5voxfHb6PrzlbQ%3D%3D"
[download] Destination: 브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].f251.webm
[download] 100% of    3.05MiB in 00:00:00 at 32.26MiB/s
[Merger] Merging formats into "브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].mkv"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].f137.mp4' -i 'file:브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].f251.webm' -c copy -map 0:v:0 -map 1:a:0 -movflags +faststart 'file:브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].temp.mkv'
Deleting original file 브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].f251.webm (pass -k to keep)
Deleting original file 브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].f137.mp4 (pass -k to keep)

@gamer191
Copy link
Collaborator

why does the info json have .ittz5zw_.tmp at the end (the first part seems to be random)

@snwefly
Copy link
Author

snwefly commented Jul 14, 2023

Even its add .ittz5zw_.tmp to the name its shouldn't be a a problem since max file name is 255 and path length is 4096. not sure why even its add "ittz5zw" to the name 🙄.

Total char count 104

"땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].info.json.ittz5zw_.tmp"

Total char count is 134
"브레이브걸스(Brave Girls)Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].info.json.ittz5zw.tmp"

@pukkandan
Copy link
Member

pukkandan commented Jul 14, 2023

--ignore-errors should have ignored that error imo

I'll fix this, but you should shorten the filename anyway imho

Even its add .ittz5zw_.tmp to the name its shouldn't be a a problem since max file name is 255

In Linux, it's 255 UTF-8 bytes so UTF-16 chars count double

>>> len('브레이브걸스(Brave Girls)_Thank you⧸땡큐 수트댄스_점핑안무 점핑 점핑피트니스 최신점핑 점핑작품 점핑동작 최신가요 다이어트점핑 쉬운점핑 트램펄린안무⧸에어로점핑 [xo5qfiAR6GY].info.json.4po3w3rg.tmp'.encode('utf-8'))
260

why does the info json have .ittz5zw_.tmp at the end

Like video, infojson is written to temp file first and then renamed. This is done to make sure large infojson are written atomically.

@snwefly
Copy link
Author

snwefly commented Jul 14, 2023

.description got more characters than .info.json so why yt-dlp able to download description file without encountering any "name too long" error? is it because description is written without temp file?

@pukkandan
Copy link
Member

yes

@gamer191
Copy link
Collaborator

gamer191 commented Jul 14, 2023

Like video, infojson is written to temp file first and then renamed. This is done to make sure large infojson are written atomically.

why not just .tmp then?

@pukkandan
Copy link
Member

pukkandan commented Jul 14, 2023

Not sure. ytdl-org/youtube-dl@181c865 - could be just that it was eaier to use NamedTemporaryFile, or there could be some actual reason

@snwefly
Copy link
Author

snwefly commented Jul 14, 2023

yes

for video its understandable since its require muxing but why yt-dlp need to create temp file for json?

@pukkandan
Copy link
Member

Like video, infojson is written to temp file first and then renamed. This is done to make sure large infojson are written atomically.

ytdl-org/youtube-dl@181c865

@pukkandan pukkandan reopened this Apr 14, 2024
@pukkandan pukkandan changed the title Unable to download one specific video json file on linux, How to ignore json errors and keep downloading video? Respect --ignore-errors for --write-info-json Apr 14, 2024
@pukkandan pukkandan added the bug Bug that is not site-specific label Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that is not site-specific question Question
Projects
None yet
Development

No branches or pull requests

5 participants