yt-dlp: `--mark-watched` does not marks video as fully watched.

Checklist

  • I’m reporting a bug unrelated to a specific site
  • I’ve verified that I’m running yt-dlp version 2022.01.21. (update instructions)
  • I’ve checked that all provided URLs are alive and playable in a browser
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
  • I’ve read the guidelines for opening an issue

Description

--mark-watched only marks video as partially watched, not as fully watched: изображение

Verbose log

❯ yt-dlp --cookies-from-browser firefox --mark-watched -vU https://www.youtube.com/watch?v=72zEL9iSIXo
[debug] Command-line config: ['--cookies-from-browser', 'firefox', '--mark-watched', '-vU', 'https://www.youtube.com/watch?v=72zEL9iSIXo']
[Cookies] Extracting cookies from firefox
[debug] Extracting cookies from: "C:\Users\User\AppData\Roaming\Mozilla\Firefox\Profiles\ntr0heq8.default-release\cookies.sqlite"
[Cookies] Extracted 2838 cookies from firefox
[debug] Encodings: locale cp1251, fs utf-8, out utf-8, err utf-8, pref cp1251
[debug] yt-dlp version 2022.01.21 [f20d607] (win_exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.22000-SP0
[debug] exe versions: ffmpeg 5.0-essentials_build-www.gyan.dev (setts), ffprobe 5.0-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.01.21, Current version: 2022.01.21
yt-dlp is up to date (2022.01.21)
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=72zEL9iSIXo
[youtube] 72zEL9iSIXo: Downloading webpage
[debug] [youtube] Extracted SAPISID cookie
[youtube] 72zEL9iSIXo: Downloading android player API JSON
[debug] Loading youtube-nsig.495d0f2b from cache
[debug] [youtube] Decrypted nsig oh29N3uJm3KFv3W1yI8 => ZMKMYa1cjy1ktQ
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, codec:vp9.2, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[youtube] 72zEL9iSIXo: Marking watched
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 72zEL9iSIXo: Downloading 1 format(s): 303+251
[debug] Invoking downloader on "https://rr2---sn-uxoxu05-vqnl.googlevideo.com/videoplayback?expire=1643648852&ei=9ML3YYk2grfWArfViMAH&ip=31.31.99.193&id=o-ALnQi5ga-_vwDDOS1ZOFF1t2JuE939yeeq12S7XdOdkU&itag=303&source=youtube&requiressl=yes&mh=KS&mm=31%2C29&mn=sn-uxoxu05-vqnl%2Csn-3c27sne7&ms=au%2Crdu&mv=m&mvi=2&pl=20&initcwndbps=1365000&vprv=1&mime=video%2Fwebm&gir=yes&clen=47294725&dur=441.583&lmt=1617493441873642&mt=1643626843&fvip=16&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5535432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAMPkW5lGL3cegXS65RYmM5G5uiOjNTm3wOd_OmFgR8lgAiEAg774cjPOLvxFKnXEQuTK40-U1TrJNyOlBCEiIRo-9B4%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAINuvrZzlPGVVa8W6oE65lW4SWTGuzLgipW4I7zsJ59sAiAVECUGfiIpDomGZ75xSOG9LHajoXmovCxaeMnsRZc0Uw%3D%3D"
[download] Resuming download at byte 42706448
[download] Destination: 5 Ways Windows is Better Than Linux [72zEL9iSIXo].f303.webm
[download] 100% of 45.10MiB in 00:00
[debug] Invoking downloader on "https://rr2---sn-uxoxu05-vqnl.googlevideo.com/videoplayback?expire=1643648852&ei=9ML3YYk2grfWArfViMAH&ip=31.31.99.193&id=o-ALnQi5ga-_vwDDOS1ZOFF1t2JuE939yeeq12S7XdOdkU&itag=251&source=youtube&requiressl=yes&mh=KS&mm=31%2C29&mn=sn-uxoxu05-vqnl%2Csn-3c27sne7&ms=au%2Crdu&mv=m&mvi=2&pl=20&initcwndbps=1365000&vprv=1&mime=audio%2Fwebm&gir=yes&clen=6106418&dur=441.621&lmt=1617317228346810&mt=1643626843&fvip=16&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgdnG6AA09aRID88N53Zoh5b-qjszpEsDU0Q9fi9deZQkCIQDVyqxAu36WO_a3NVpNmDLTTohImudF5NcOxFrfJLVf8Q%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAINuvrZzlPGVVa8W6oE65lW4SWTGuzLgipW4I7zsJ59sAiAVECUGfiIpDomGZ75xSOG9LHajoXmovCxaeMnsRZc0Uw%3D%3D"
[download] Destination: 5 Ways Windows is Better Than Linux [72zEL9iSIXo].f251.webm
[download] 100% of 5.82MiB in 00:00
[Merger] Merging formats into "5 Ways Windows is Better Than Linux [72zEL9iSIXo].webm"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:5 Ways Windows is Better Than Linux [72zEL9iSIXo].f303.webm" -i "file:5 Ways Windows is Better Than Linux [72zEL9iSIXo].f251.webm" -c copy -map "0:v:0" -map "1:a:0" -movflags "+faststart" "file:5 Ways Windows is Better Than Linux [72zEL9iSIXo].temp.webm"
Deleting original file 5 Ways Windows is Better Than Linux [72zEL9iSIXo].f303.webm (pass -k to keep)
Deleting original file 5 Ways Windows is Better Than Linux [72zEL9iSIXo].f251.webm (pass -k to keep)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 16 (9 by maintainers)

Commits related to this issue

Most upvoted comments

This is still happening to me in 2025. But I noticed only videos longer than 20 minutes are properly getting marked as fully watched.

Broken, but can be fixed by changing ‘st’: video_length into ‘st’: 0 In extractors/youtube.py, _mark_watched routine. Don’t ask why and how it works, idk.