Repository: yt-dlp
Issue: [YouTube] Request for new meta field "format_lmt"
Labels: site-enhancement,triage

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm requesting a site-specific feature
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

Australia

### Example URLs

https://www.youtube.com/watch?v=8UVNT4wvIGY

### Provide a description that is worded well enough to be understood

Most (if not all) YouTube formats have a "lastModified" property, which is a timestamp in unix epoch format. This timestamp is also embedded within the format's url under the "lmt" key.

I've found this timestamp to be a fairly reliable way of distinguishing between different encodings of a format (which occur either when YouTube re-encodes formats for internal reasons or when a video is modified after upload). I'd like to be able to use the timestamp within my file names as well as with the --print and --print-to-file options. If there was an additional option to display the timestamps as part of the formats table that would be a bonus.

BTW, the "lmt" value is already saved in info-json files created by yt-dlp, but only as a part of the format url and not as an individual field itself. While I'm not sure if this would be considered worth the effort it would be possible to extract the lmt timestamps from the format urls and thus make an "lmt" field available even with existing info-json files.

Verbose output is probably not of much use but shows a couple of format urls with their embedded "lmt" values.

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-vU', '--print', 'urls', '-f', '356+251', 'https://www.youtube.com/watch?v=8UVNT4wvIGY']
[debug] User config "C:\Users\uvbun\AppData\Roaming\yt-dlp\config.txt": ['-o', 'ID.[%(id)s].av.%(height)sp.[%(format_id)s].%(ext)s', '-o', 'infojson:ID.[%(id)s].%(ext)s', '--concurrent-fragments', '4', '--retries', '8', '--fragment-retries', '8', '--abort-on-unavailable-fragment', '--no-overwrites', '--no-continue', '--keep-video', '--fixup', 'never', '--no-check-formats', '--live-from-start', '--downloader', 'aria2c', '--cookies-from-browser', 'firefox:General-002::none', '--sleep-requests', '1', '--sleep-subtitles', '4', '-S', 'hasvid,+hasaud,+proto,hdr,vcodec,height,fps,lang,quality', '--extractor-args', 'youtube:player_client=tv,web_creator', '--alias', 'tt', '-o tt.[%(id)s].av.%(height)sp.[%(format_id)s].%(ext)s', '--alias', 'all-clients', '--extractor-args youtube:player_client=all', '--alias', 'ios-clients', '--extractor-args youtube:player_client=tv,web_creator,ios', '--alias', 'view,-X', '-F --extractor-args youtube:player_client={0}', '--alias', 'view-alt-clients', '-F --extractor-args youtube:player_client=web_embedded,mweb,ios', '--alias', 'view-ios-client', '-F --extractor-args youtube:player_client=ios', '--alias', 'view-web-client', '-F --extractor-args youtube:player_client=web', '--alias', 'view-web-clients', '-F --extractor-args youtube:player_client=web_embedded,mweb', '--alias', 'yt-subs', '--config-locations C:\\\\Tools\\\\Configs\\\\yt-dlp\\\\yt-subs.cfg', '--alias', 'subs', '-o yt.[%(id)s].tt.sub.%(ext)s --skip-download --write-subs', '--alias', 'autocaps', '-o yt.[%(id)s].tt.auto.%(ext)s --skip-download --write-auto-subs', '--alias', 'autocaps-n', '--downloader native -o yt.[%(id)s].tt.auto.%(ext)s --skip-download --write-auto-subs', '--alias', 'read-cookies', '--no-cookies-from-browser --cookies "C:\\Tools\\Data\\Cookies\\yt-dlp-browser-cookies.txt"', '--alias', 'write-cookies', '--cookies "C:\\Tools\\Data\\Cookies\\yt-dlp-browser-cookies.txt"', '--alias', 'skip-cookies', '--no-cookies-from-browser']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2024.12.15.232913 from yt-dlp/yt-dlp-nightly-builds [d298693b1] (win_exe)
[debug] Python 3.10.11 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1t  7 Feb 2023)
[debug] exe versions: ffmpeg N-116527-g9a2171318d-20240804 (setts), ffprobe N-116527-g9a2171318d-20240804, phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.21.0, brotli-1.1.0, certifi-2024.12.14, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.32.3, sqlite3-3.40.1, urllib3-2.2.3, websockets-14.1
[debug] Proxy map: {}
Extracting cookies from firefox
[debug] Extracting cookies from: "C:\Users\...\AppData\Roaming\Mozilla\Firefox\Profiles\General-002\cookies.sqlite"
[debug] Only loading cookies not belonging to any container
Extracted 1465 cookies from firefox
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1837 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2024.12.15.232913 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2024.12.15.232913 from yt-dlp/yt-dlp-nightly-builds)
[youtube] Extracting URL: https://www.youtube.com/watch?v=8UVNT4wvIGY
[youtube] 8UVNT4wvIGY: Downloading webpage
[debug] [youtube] Extracted SAPISID cookie
[youtube] Sleeping 1.0 seconds ...
[youtube] 8UVNT4wvIGY: Downloading tv player API JSON
[youtube] Sleeping 1.0 seconds ...
[youtube] 8UVNT4wvIGY: Downloading web creator player API JSON
[debug] [youtube] Extracting signature function js_03dbdfab_107
[debug] Loading youtube-sigfuncs.js_03dbdfab_107 from cache
[debug] Loading youtube-nsig.03dbdfab from cache
[debug] [youtube] Decrypted nsig xrKixouipMwYIveQl => rk1ex7lAapaklg
[debug] Loading youtube-nsig.03dbdfab from cache
[debug] [youtube] Decrypted nsig NQ69zsLao8knYPpDP => XhFnQPwXZRmsQA
[debug] [youtube] Extracting signature function js_03dbdfab_103
[debug] Loading youtube-sigfuncs.js_03dbdfab_103 from cache
[debug] Sort order given by user: hasvid, +hasaud, +proto, hdr, vcodec, height, fps, lang, quality
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, +hasaud, +proto, hdr, vcodec, height, fps, lang, quality, res, source, channels, acodec, size, br, asr, vext, aext, id
[info] 8UVNT4wvIGY: Downloading 1 format(s): 356+251
https://rr4---sn-n02xgavv250-hxae.googlevideo.com/videoplayback?expire=1734451903&ei=X05hZ8OLHK7G9fwPvNKC4As&ip=125.253.110.59&id=o-AGKs_9sZ4B_-2SlGJsmK7yzIWWqTnCNRn1Ah11fHKeZu&itag=356&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C356%2C394%2C395%2C396%2C397%2C398%2C399&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&met=1734430303%2C&mh=v2&mm=31%2C29&mn=sn-n02xgavv250-hxae%2Csn-hxa7zn7s&ms=au%2Crdu&mv=m&mvi=4&pl=22&rms=au%2Cau&ctier=A&pfa=5&initcwndbps=3167500&hightc=yes&siu=1&bui=AfMhrI94Dc5ghYVP-mbMi_hcfnk6KmxYstd2VhzR-pnpDQURHdFGfnogVYP7f5I_YZuywsVWUw&vprv=1&svpuc=1&mime=video%2Fwebm&ns=bOpSqeq3bHo3hyvwF0Axsr4Q&rqh=1&gir=yes&clen=44680176&dur=243.880&lmt=1713941333662117&mt=1734429921&fvip=1&keepalive=yes&lmw=1&fexp=51326932%2C51335594&c=TVHTML5&sefc=1&txp=4532434&n=XhFnQPwXZRmsQA&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cxpc%2Cctier%2Cpfa%2Chightc%2Csiu%2Cbui%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=AGluJ3MwRgIhALJe6milQBFmwrIiXJ7nhFJmN77u6vxGBGC4kd4ISpoJAiEA0FXUKfenxQ3AI7hs_F1mLl1sR0XqDGNImfTaSpzrSwk%3D&sig=AJfQdSswRAIgUyWvHwaKX8WD7lNqtvmAAaw1vTUsjUXrI6FIVFZYxLACIFIa5GZdM2m6yFVC13idX3QO12Mb_P20AnXrAuwOs9Jo
https://rr4---sn-n02xgavv250-hxae.googlevideo.com/videoplayback?expire=1734451903&ei=X05hZ8OLHK7G9fwPvNKC4As&ip=125.253.110.59&id=o-AGKs_9sZ4B_-2SlGJsmK7yzIWWqTnCNRn1Ah11fHKeZu&itag=251&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&met=1734430303%2C&mh=v2&mm=31%2C29&mn=sn-n02xgavv250-hxae%2Csn-hxa7zn7s&ms=au%2Crdu&mv=m&mvi=4&pl=22&rms=au%2Cau&ctier=A&pfa=5&initcwndbps=3167500&hightc=yes&siu=1&bui=AfMhrI94Dc5ghYVP-mbMi_hcfnk6KmxYstd2VhzR-pnpDQURHdFGfnogVYP7f5I_YZuywsVWUw&vprv=1&svpuc=1&mime=audio%2Fwebm&ns=bOpSqeq3bHo3hyvwF0Axsr4Q&rqh=1&gir=yes&clen=3949970&dur=243.901&lmt=1713940635356788&mt=1734429921&fvip=1&keepalive=yes&lmw=1&fexp=51326932%2C51335594&c=TVHTML5&sefc=1&txp=4532434&n=XhFnQPwXZRmsQA&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cctier%2Cpfa%2Chightc%2Csiu%2Cbui%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=AGluJ3MwRgIhALJe6milQBFmwrIiXJ7nhFJmN77u6vxGBGC4kd4ISpoJAiEA0FXUKfenxQ3AI7hs_F1mLl1sR0XqDGNImfTaSpzrSwk%3D&sig=AJfQdSswRQIhAIVQ_UTET4udsZ9Ts72B5bl7yYop-T2Ei4Dcz9YEmRfWAiBUclNVBjyWFYjzUCa_hJxHq7RHBJpQIKZG7et_wYCi4g%3D%3D
```