Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mtime not being set on audio files in certain cases #2299

Open
nurupo opened this issue Feb 4, 2014 · 0 comments
Open

mtime not being set on audio files in certain cases #2299

nurupo opened this issue Feb 4, 2014 · 0 comments
Labels

Comments

@nurupo
Copy link

@nurupo nurupo commented Feb 4, 2014

Description

I used

youtube-dl -ci -o "%(title)s - %(id)s.%(ext)s" --extract-audio --audio-format "mp3" --audio-quality 0 --keep-video "some playlist"

to download videos from a playlist + extract mp3 audios from those videos.

While it was processing, I noted that one video errored for no particular reason. After everything was downloaded and converted, I decided to rerun the command, since youtube-dl claims to be able to skip already downloaded things. Already downloaded video files, in fact, weren't re-downloaded, but every single audio file was re-created. I guess there is nothing one can do, with a video you at least know its size from youtube, so you can easily check if it's already downloaded or not, but you don't know how big an extracted audio file would be, so you don't know if the audio file you have is a complete audio file or not, so to be safe it just re-converts every single audio file. This is a little annoying, try to re-encode 10gb of audio, but I don't think that this is a bug, it looks rather intentional, like a feature.

The actual issue here is that Last-Modified time of re-done audio files is set to now instead of the time of corresponding youtube video. That is a bug. youtube-dl sets Last-Modified correctly the first time you run the command, but then forgets to set it when the command is ran again and audio files are re-created.

I'm sorry if that was already reported, there are a lot of issues open here.

Steps to reproduce

  1. Run

    youtube-dl -ci -o "%(title)s - %(id)s.%(ext)s" --extract-audio --audio-format "mp3" --audio-quality 0 --keep-video "http://www.youtube.com/watch?v=qn4jgmmub20"
  2. Repeat 1

What I see

File name Last-Modified (yyyy-mm-dd)
【IA】 アウターサイエンス 【オリジナルMV】 - qn4jgmmub20.mp3 2014-02-03 (current date)
【IA】 アウターサイエンス 【オリジナルMV】 - qn4jgmmub20.mp4 2014-01-07

What I expected to see

File name Last-Modified (yyyy-mm-dd)
【IA】 アウターサイエンス 【オリジナルMV】 - qn4jgmmub20.mp3 2014-01-07
【IA】 アウターサイエンス 【オリジナルMV】 - qn4jgmmub20.mp4 2014-01-07
@jaimeMF jaimeMF added the request label Feb 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.