How to get yt-dlp to download videos with the original time-stamp.
See original GitHub issueChecklist
- I’m asking a question and not reporting a bug or requesting a feature
- I’ve looked through the README
- I’ve verified that I’m running yt-dlp version 2022.06.22.1 (update instructions) or later (specify commit)
- I’ve searched the bugtracker for similar questions including closed ones. DO NOT post duplicates
- I’ve read the guidelines for opening an issue
Question
For e.g. If I were to download https://www.youtube.com/watch?v=Q27MMde5DhQ yt-dlp would download the file but that would be downloaded with the current time-stamp but if you look up the video, you would see that it was posted on 3rd March 2022 which is almost 3 months back. Is there a way to tell yt-dlp to use the time-stamps as it appears.
I have another question and this comes from
https://github.com/yt-dlp/yt-dlp#configuration
where you have shared -
%XDG_CONFIG_HOME%/yt-dlp/config (recommended on Linux/macOS) %XDG_CONFIG_HOME%/yt-dlp.conf
and then told -
%XDG_CONFIG_HOME% defaults to ~/.config if undefined.
so guessing I would have to make a file under ~/.config with yt-dlp
I just did -
~/.config/yt-dlp$ touch config
Is that enough and do I just need
–no-mtime
in the config file.
It didn’t work, am I doing something wrong ???
Verbose log
$ yt-dlp -vu -c -f 247 8_cniE9z77c --write-auto-sub
[debug] Command-line config: ['-vu', '-c', '-f', '247', '8_cniE9z77c', '--write-auto-sub']
[debug] User config "/home/shirish/.config/yt-dlp/config": ['--no-mtime']
Type account password and press [Return]:
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.06.22.1 [a86e01e74]
[debug] Python version 3.10.5 (CPython 64bit) - Linux-5.18.0-2-amd64-x86_64-with-glibc2.33
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 4.4.2-1 (setts), ffprobe 4.4.2-1, phantomjs 2.1.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.11.0, brotli-1.0.9, certifi-2020.06.20, mutagen-1.45.1, secretstorage-3.3.2, sqlite3-2.6.0, websockets-10.2, xattr-0.9.9
[debug] Proxy map: {}
WARNING: [youtube] Login with password is not supported for this website. Use --cookies-from-browser or --cookies for the authentication. See https://github.com/ytdl-org/youtube-dl#how-do-i-pass-cookies-to-youtube-dl for how to manually pass cookies
[debug] [youtube] Extracting URL: 8_cniE9z77c
[youtube] 8_cniE9z77c: Downloading webpage
[youtube] 8_cniE9z77c: Downloading android player API JSON
[debug] Loading youtube-nsig.60c2da65 from cache
[debug] [youtube] Decrypted nsig UWfHaqkzyz6W5qH => FCBlfpURbFB3Kg
[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
[debug] Downloading subtitles: en
[info] 8_cniE9z77c: Downloading 1 format(s): 247
[info] Writing video subtitles to: WHAT THE HELL IS THAT THING!! _ Breathedge _ Space Survival _ #15 [8_cniE9z77c].en.vtt
[debug] Invoking http downloader on "https://www.youtube.com/api/timedtext?v=8_cniE9z77c&caps=asr&xoaf=4&xosf=1&hl=en&ip=0.0.0.0&ipbits=0&expire=1656465037&sparams=ip%2Cipbits%2Cexpire%2Cv%2Ccaps%2Cxoaf&signature=81001E0039DB09B1C53E0549E4278034D9AAAE55.CF3868154372646D5F997029A5589C589247D0CE&key=yt8&kind=asr&lang=en&fmt=vtt"
[download] Destination: WHAT THE HELL IS THAT THING!! _ Breathedge _ Space Survival _ #15 [8_cniE9z77c].en.vtt
[download] 100% of 261.67KiB in 00:00
[debug] Invoking http downloader on "https://rr2---sn-cnoa-2o9e.googlevideo.com/videoplayback?expire=1656461437&ei=HUS7YvTVK9GDg8UP3M2r2Ao&ip=117.212.243.60&id=o-AOW3lIEagTY3lbuqae8PLth36qxrn-_CSJoSNHp7VCw4&itag=247&aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C298%2C299%2C302%2C303%2C308&source=youtube&requiressl=yes&mh=E6&mm=31%2C29&mn=sn-cnoa-2o9e%2Csn-cvh76nld&ms=au%2Crdu&mv=m&mvi=2&pl=21&initcwndbps=576250&spc=4ocVCz3POQn9dZiF3CcOOc-agFtlG6Q&vprv=1&mime=video%2Fwebm&ns=E6bP8fCnM7mVt8Mt-f_Z2VkG&gir=yes&clen=337249607&dur=2271.840&lmt=1653413891333921&mt=1656439525&fvip=4&keepalive=yes&fexp=24001373%2C24007246&c=WEB&txp=6319224&n=FCBlfpURbFB3Kg&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cspc%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgHQTY0zRSaIEiM557ev3AdJC1y-n-ZZ72M3Mzb8uXzTcCIQDkNiditGHtS8ZQwsuQuFf2FVej0StVYB22kABbuYuF9w%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhANPhzyvkfvLBPE-rY82HNBlGML2a67snMQ5vWZf7TBO1AiEA41cUAKQbT9hq9eyTPzs09o1lC6xB4SD7ujZvw7O-hP8%3D"
[download] Destination: WHAT THE HELL IS THAT THING!! _ Breathedge _ Space Survival _ #15 [8_cniE9z77c].webm
[download] 100% of 321.63MiB in 00:51
Issue Analytics
- State:
- Created a year ago
- Comments:6 (5 by maintainers)
Top Related StackOverflow Question
But with extractors that set
timestampa user could easily usetouchor similar, if available, in a--exec ...command to set the file modification date (or a script if onlyupload_dateis available).@dirkf Because as we know, Unix system calls take their name from HTTP headers.