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.
set mtime to video publish date #18384
Comments
|
I just tested and it appears that all DASH segments indeed had the same/proper mtime when fetched via http.py. However when the segments are stitched together, the mtime is lost. |
|
Not a pull request yet, because I'm new to the code in this project and haven't run the unit tests. But this seems to do the job!
In summary, it leverages the fact that every fragment/segment already has an mtime set from the last-modified header. So it just re-sets the mtime of the working/temp file from the fragment file. Which in turn, seems to be preserved in the finalized file of all fragments. Feedback? |
|
Has this been addressed? I'm running latest version and it seems |
Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2018.12.03. 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?
Description of your issue, suggested solution and other information
this is a followup to #18383 in which I found out that the mtime is only set according to the
Last-ModifiedHTTP headers, and doesn't work for videos downloaded with DASH. I find this counter-intuitive: having downloaded videos and seen that the mtime was set to — as far as I could tell — the upload date, I expected this to happen all the time until it randomly didn't work for some videos.I think that, whenever the upload time is available, it should be used for the final file's mtime in place of
Last-Modified.