feature that changed file date to upload date seems to no longer work #393

Closed
opened 2026-02-20 23:02:47 -05:00 by deekerman · 2 comments
Owner

Originally created by @rifter on GitHub (Nov 15, 2012).

For the longest time, youtube-dl had this feature.. it would take the date and time that the video was uploaded and change the file date to that date. It seems like that no longer happens by default, and I cannot find where to explicitly make it happen. Instead the date and time seem to be when I downloaded the video. I had been downloading videos from this channel: https://www.youtube.com/user/TheYoungTurks/videos and then using ls -rt to build a playlist so I could watch them in order. Because I download in a couple of processes at once, it ends up that the order is mucked up. These are the options I use (I wrote a script to preserve them:
./youtube-dl -R 5 -i -n -c --write-srt -o "%(uploader)s-%(stitle)s-%(id)s.%(ext)s" "$vid"

I actually just added --write-srt tonight because I saw it while looking for this option. Before this I did not use it.
Does it maybe have a different effect if the video was uploaded on the same day but different times? if so is there a way to make the upload date include a time in some way so I can order things differently?

Originally created by @rifter on GitHub (Nov 15, 2012). For the longest time, youtube-dl had this feature.. it would take the date and time that the video was uploaded and change the file date to that date. It seems like that no longer happens by default, and I cannot find where to explicitly make it happen. Instead the date and time seem to be when I downloaded the video. I had been downloading videos from this channel: https://www.youtube.com/user/TheYoungTurks/videos and then using ls -rt to build a playlist so I could watch them in order. Because I download in a couple of processes at once, it ends up that the order is mucked up. These are the options I use (I wrote a script to preserve them: ./youtube-dl -R 5 -i -n -c --write-srt -o "%(uploader)s-%(stitle)s-%(id)s.%(ext)s" "$vid" I actually just added --write-srt tonight because I saw it while looking for this option. Before this I did not use it. Does it maybe have a different effect if the video was uploaded on the same day but different times? if so is there a way to make the upload date include a time in some way so I can order things differently?
deekerman 2026-02-20 23:02:47 -05:00
Author
Owner

@rifter commented on GitHub (Nov 15, 2012):

I'm using ext4 if that matters. I had used reiserfs4 I think before, but ext4 gave me way better performance.

@rifter commented on GitHub (Nov 15, 2012): I'm using ext4 if that matters. I had used reiserfs4 I think before, but ext4 gave me way better performance.
Author
Owner

@dirkf commented on GitHub (Feb 5, 2024):

Nowadays the Last-modified header sets the filetime, unless --no-mtime.

@dirkf commented on GitHub (Feb 5, 2024): Nowadays the `Last-modified` header sets the filetime, unless `--no-mtime`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#393
No description provided.