yt-dlp: Unable to download one specific video json file on linux, How to ignore json errors and keep downloading video?

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'

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

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)

--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)

OSError: [Errno 36] File name too long

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