Skip to content

[Youtube] Extract exact timestamps #1803

Description

@HalvorRaknes

Checklist

  • I'm reporting a bug unrelated to a specific site
  • I've verified that I'm running yt-dlp version 2021.11.10.1. (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

When downloading YouTube videos the timestamps given to the downloaded files are inaccurate. I suppose this can be improved by copying the method used by Youtube DataViewer (https://citizenevidence.amnestyusa.org/).

Can this be impletemented?

Verbose log

-

Activity

  1. added
    site-enhancementFeature request for some website
    and removed
    bugBug that is not site-specific
    on Nov 26, 2021
  2. changed the title [-]Inaccurate timestamps[/-] [+][Youtube] Extract exact timestamps[/+] on Nov 26, 2021
  3. pukkandan commented on Nov 27, 2021

    @pukkandan
    Member

    They are probably using Youtube Data API which gives the uploaded timestamp. But we can only use the innertube API which only gives the uploaded date

  4. HalvorRaknes commented on Nov 28, 2021

    @HalvorRaknes
    Author

    OK. Why is it they can use that and we aren't allowed?

    Also, would it be possible to extract timestampts from other video sites such as BitChute and Odysee? That would save me a bit of extraneous work doing 'touch -t' on the downloaded videoes.

  5. coletdjnz commented on Nov 29, 2021

    @coletdjnz
    Member

    youtube-dl will not use any kind of APIs involving sharing personal keys due to obvious reasons.
    Originally posted by @dstftw in ytdl-org/youtube-dl#376 (comment)

    If you require accurate timestamps, use the official data API yourself with your own personal API key. As @pukkandan mentioned, it is not possible to get the accurate timestamp from the Innertube API or the website (unless someone manages to find a way).

    Also, would it be possible to extract timestampts from other video sites such as BitChute and Odysee? That would save me a bit of extraneous work doing 'touch -t' on the downloaded videoes.

    open a site feature request issue for each of these sites

  6. pukkandan commented on Nov 29, 2021

    @pukkandan
    Member

    That would save me a bit of extraneous work doing 'touch -t' on the downloaded videoes.

    Note that the mtime of the videos are NOT the timestamp as extracted by yt-dlp. If you want the mtime, there is no choice but to get it from the downloaded file or by probing the download URL

  7. pukkandan commented on Dec 1, 2021

    @pukkandan
    Member

    Closing since it is impossible afaik. If it ever becomes possible to implement (without using the Data API ofc), it can be re-opened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    site-enhancementFeature request for some website

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions