question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Youtube - upload_date functionality changed and requires clarified documentation

See original GitHub issue

Checklist

Region

No response

Description

using upload_date for some videos results in the date being a day ahead for some videos, I believe this is because the functionality changed in the update to use true UTC and not adjust for local time.

Example: https://www.youtube.com/watch?v=ey8B30KyOMQ Date published (on youtube) is reported as November 8th, 2021 because it adjusts to my local time yt-dlp is reporting it as November 9th, 2021 as seen in logs as it was 4am UTC

This has changed compared to previous versions, as I run batch scripts and noticed way more web traffic than normal on directories which have videos already in it.

The following image has the latest download details on the left, and the previous versions’ download on the right. https://i.imgur.com/JWBbu1F.png

Note that the timestamp is the same but the title is adjusted. It’s not clear that the functionality of “upload_date” has changed/now defaults to naming it based on UTC.

Ideally this could be changed in the documentation to specify that it names based on UTC, since the documentation doesn’t specify either way

Verbose log

PS I:\Video\YT-Archive> .\yt-dlp.exe -vU
[debug] Command-line config: ['-vU']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, err utf-8, pref cp1252
[debug] yt-dlp version 2022.03.08 [535eb16] (win_exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19044-SP0
[debug] exe versions: none
[debug] Optional libraries: brotli, Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.03.08.1, Current version: 2022.03.08
Current Build Hash 728c6e072133451bbe26825b329577e4a40242af74582a73d6d8a10ac45c6b3e
Updating to version 2022.03.08.1 ...
Updated yt-dlp to version 2022.03.08.1
PS I:\Video\YT-Archive> .\yt-dlp.exe -S 'height:720' -o "%(uploader)s/%(title)s-%(upload_date)s.%(ext)s" -w -c --throttled-rate 100K https://www.youtube.com/watch?v=ey8B30KyOMQ
[youtube] ey8B30KyOMQ: Downloading webpage
[youtube] ey8B30KyOMQ: Downloading android player API JSON
[info] ey8B30KyOMQ: Downloading 1 format(s): 22
[download] DaThings\{YTP} ~ Pocket Mans!-20211109.mp4 has already been downloaded
[download] 100% of 33.36MiB
PS I:\Video\YT-Archive>

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
pukkandancommented, Mar 21, 2022

Do not depend on filenames to detect duplicates for the long term. Filenames can change for a variety of reasons. (1) Video metadata including title changes all the time. (2) The file extension changes if the preferred format changes. (3) Extraction of some metadata fields may break. (4) Less likely, but the default outtmpl may change

Also, it is much slower than using archive

2reactions
pukkandancommented, Mar 21, 2022

Previously, US time was being (mistakenly) used for upload_date. now UTC is being used, which is the correct behavior. This change will not be reverted. Instead I will document it as such.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Update: Dec. 20] YouTube bugs/issues & pending ...
Here we are tracking all the bugs and problems found on YouTube and their status as well as any pending improvements that are...
Read more >
Upload YouTube videos - Computer - Google Help
You can upload videos to YouTube in a few easy steps. Use the instructions below to upload your videos from a computer or...
Read more >
What happens if you edit an old YouTube video? Does it ...
Does it change the upload date, or does it stay normal? ... All you would need here is a program that offers video...
Read more >
YouTube confirms that it has removed the “sort by oldest ...
It's possible that "changing the query" requires some involved ... wasn't rolled out like a new feature with documentation and blog posts, ...
Read more >
Revision History | YouTube Data API - Google Developers
This page lists YouTube Data API (v3) changes and documentation updates. ... To clarify these processes and better meet the needs of developers...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found