yt-dlp

yt_dlp · Adding video publishing date to filename after download?


I have a question about specific programming problem (for a shell script), a software algorithm (yt-dlp syntax):

Is there any way to add the publishing date of the video at the beginning of the filename? For channel downloads that would enable me to view videos in the order that they have been released. Like so:

2023-05-06 TitleOfVideo [rB_RVxbzFSo].mp4

Thanks a lot!


Solution

  • You can use yt-dlp -o "%(upload_date>%Y-%m-%d)s %(title)+.100U [%(id)s]" $VIDEOLINK.

    Template help can be found on https://github.com/yt-dlp/yt-dlp#output-template