Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Embedding thumbnail resets mtime #18915
Comments
|
Seeing a similar problem. I've found if I pass any of the following options then the With any of those options ( Successful time setHere's an example of the success case: (
Failed time setHere's an example of the failure case: (
Versions and settings
In my case, the powershell instance's |
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like this:[x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2019.01.17. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add the
-vflag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):Description of your issue, suggested solution and other information
When downloading a video, the default behaviour of youtube-dl is to set the modification time (mtime) of the output file to the time indicated by the Last-Modified response header of... something. When downloading multiple streams, it isn't clear which modification time is used. Regardless, this works fine, even when combining multiple streams:
(The video was originally uploaded in 2009, but the incorrect date appears to be the fault of YouTube, not youtube-dl.)
youtube-dl includes a handy feature,
--embed-thumbnail, which additionally retrieves a JPEG thumbnail for the video and embeds it into the output file. Unfortunately, this step is performed via an external tool (AtomicParsley), and happens after youtube-dl backdates the mtime of the output file. This means that the final mtime of the output file is ultimately set to the current time (by the system, because AtomicParsley modifies the file), not the modification time of the video as indicated by the source.I suspect the correct fix here is to perform mtime adjustment of the output file at the very last minute, after all other possible options applying to the single output file have been handled.