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

youtube-dl does not remove .m4a file when --add-metadata is invoked #2399

Closed
peteyreplies opened this issue Feb 16, 2014 · 3 comments
Closed

youtube-dl does not remove .m4a file when --add-metadata is invoked #2399

peteyreplies opened this issue Feb 16, 2014 · 3 comments

Comments

@peteyreplies
Copy link

@peteyreplies peteyreplies commented Feb 16, 2014

I have been using youtube-dl to rip audio from youtube channels I like. I noticed what I am assuming to be a bug, however, when I tried to add metadata to improve my ID3 tags.

Simply put, when I run:

youtube-dl http://www.youtube.com/watch?v=P7ZL5EP7FTE -itw --extract-audio --audio-format mp3 --audio-quality 0

The original m4a file is deleted when the conversion to mp3 is complete.

However, when I run:

youtube-dl http://www.youtube.com/watch?v=P7ZL5EP7FTE -itw --extract-audio --audio-format mp3 --audio-quality 0 --add-metadata

it is not deleted when the conversion is complete.

@peteyreplies
Copy link
Author

@peteyreplies peteyreplies commented Feb 16, 2014

As requested, here is the output of both with the --verbose flag added:

Without --add-metadata:

youtube-dl http://www.youtube.com/watch?v=P7ZL5EP7FTE -itw --extract-audio --audio-format mp3 --audio-quality 0 --verbose [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['http://www.youtube.com/watch?v=P7ZL5EP7FTE', '-itw', '--extract-audio', '--audio-format', 'mp3', '--audio-quality', '0', '--verbose'] [debug] Encodings: locale 'UTF-8', fs 'utf-8', out 'UTF-8', pref: 'UTF-8' [debug] youtube-dl version 2014.02.13 [debug] Python version 2.7.3 - Darwin-12.4.0-x86_64-i386-32bit [debug] Proxy map: {} [youtube] Setting language [youtube] P7ZL5EP7FTE: Downloading webpage [youtube] P7ZL5EP7FTE: Downloading video info webpage [youtube] P7ZL5EP7FTE: Extracting video information [youtube] P7ZL5EP7FTE: Encrypted signatures detected. [youtube] encrypted signature length 89 (43.45), itag 22, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 43, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 18, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 5, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 36, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 17, html5 player vfliqjKfF [youtube] encrypted signature length 87 (43.43), itag 136, html5 player vfliqjKfF [youtube] encrypted signature length 87 (43.43), itag 135, html5 player vfliqjKfF [youtube] encrypted signature length 87 (43.43), itag 134, html5 player vfliqjKfF [youtube] encrypted signature length 87 (43.43), itag 133, html5 player vfliqjKfF [youtube] encrypted signature length 87 (43.43), itag 160, html5 player vfliqjKfF [youtube] encrypted signature length 87 (43.43), itag 140, html5 player vfliqjKfF [youtube] encrypted signature length 87 (43.43), itag 171, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 136, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 135, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 134, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 133, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 160, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 140, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 171, html5 player vfliqjKfF [ffmpeg] Destination: Robin Schulz - Willst Du-P7ZL5EP7FTE.mp3 [debug] ffmpeg command line: ffmpeg -y -i 'Robin Schulz - Willst Du-P7ZL5EP7FTE.m4a' -vn -acodec libmp3lame -aq 0 'Robin Schulz - Willst Du-P7ZL5EP7FTE.mp3' Deleting original file Robin Schulz - Willst Du-P7ZL5EP7FTE.m4a (pass -k to keep)

With --add-metada:

Freya:lbm2 chris$ youtube-dl http://www.youtube.com/watch?v=P7ZL5EP7FTE -itw --extract-audio --audio-format mp3 --audio-quality 0 --add-metadata --verbose [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['http://www.youtube.com/watch?v=P7ZL5EP7FTE', '-itw', '--extract-audio', '--audio-format', 'mp3', '--audio-quality', '0', '--add-metadata', '--verbose'] [debug] Encodings: locale 'UTF-8', fs 'utf-8', out 'UTF-8', pref: 'UTF-8' [debug] youtube-dl version 2014.02.13 [debug] Python version 2.7.3 - Darwin-12.4.0-x86_64-i386-32bit [debug] Proxy map: {} [youtube] Setting language [youtube] P7ZL5EP7FTE: Downloading webpage [youtube] P7ZL5EP7FTE: Downloading video info webpage [youtube] P7ZL5EP7FTE: Extracting video information [youtube] P7ZL5EP7FTE: Encrypted signatures detected. [youtube] encrypted signature length 89 (43.45), itag 22, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 43, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 18, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 5, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 36, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 17, html5 player vfliqjKfF [youtube] encrypted signature length 84 (41.42), itag 136, html5 player vfliqjKfF [youtube] encrypted signature length 84 (41.42), itag 135, html5 player vfliqjKfF [youtube] encrypted signature length 84 (41.42), itag 134, html5 player vfliqjKfF [youtube] encrypted signature length 84 (41.42), itag 133, html5 player vfliqjKfF [youtube] encrypted signature length 84 (41.42), itag 160, html5 player vfliqjKfF [youtube] encrypted signature length 84 (41.42), itag 140, html5 player vfliqjKfF [youtube] encrypted signature length 84 (41.42), itag 171, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 136, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 135, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 134, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 133, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 160, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 140, html5 player vfliqjKfF [youtube] encrypted signature length 89 (43.45), itag 171, html5 player vfliqjKfF [ffmpeg] Adding metadata to 'Robin Schulz - Willst Du-P7ZL5EP7FTE.m4a' [debug] ffmpeg command line: ffmpeg -y -i 'Robin Schulz - Willst Du-P7ZL5EP7FTE.m4a' -c copy -metadata date=20130722 -metadata 'artist=La Belle Musique' -metadata 'title=Robin Schulz - Willst Du' 'Robin Schulz - Willst Du-P7ZL5EP7FTE.temp.m4a' [ffmpeg] Destination: Robin Schulz - Willst Du-P7ZL5EP7FTE.mp3 [debug] ffmpeg command line: ffmpeg -y -i 'Robin Schulz - Willst Du-P7ZL5EP7FTE.m4a' -vn -acodec libmp3lame -aq 0 'Robin Schulz - Willst Du-P7ZL5EP7FTE.mp3'

As you can see, the "delete" command is never issued.

In practice, I can solve this trivially myself by adding "rm *.m4a" to my script, but I thought I'd surface it anyway.

Thanks for making such a super useful tool!

@jaimeMF jaimeMF added bug and removed bug labels Feb 16, 2014
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Feb 16, 2014

Thanks for detailed report!, you're right, the m4a file should be removed . There's already an open issue: #2261, so I'm closing this one (you can subscribe to the other issue to get the updates).

@jaimeMF jaimeMF closed this Feb 16, 2014
@peteyreplies
Copy link
Author

@peteyreplies peteyreplies commented Feb 16, 2014

Thanks Jaime!

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.