ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.35k stars 10.04k forks source link

Youtube-dl downloads all formats instead of mp3 only. #14106

Closed sf55 closed 7 years ago

sf55 commented 7 years ago

Please follow the guide below


Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.09.02. 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?


The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--ignore-errors', u'-v', u'-x', u'--audio-format', u'mp3', u'-continue', u'-o', u'%(autonumber)02d-%(title)s.%(ext)s', u'--add-metadata', u'https://deboned.bandcamp.com/album/deboned-existench']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.09.02
[debug] Python version 2.7.9 - Linux-3.16.0-4-amd64-x86_64-with-debian-8.9
[debug] exe versions: avconv 11.9-6, avprobe 11.9-6, ffmpeg 3.3.2, ffprobe 3.3.2
[debug] Proxy map: {}
[Bandcamp:album] deboned-existench: Downloading webpage
[download] Downloading playlist: Deboned / Existench
[Bandcamp:album] playlist Deboned / Existench: Collected 5 video ids (downloading 5 of them)
[download] Downloading video 1 of 5
[Bandcamp] fuckin-melt: Downloading webpage
[Bandcamp] 1986026118: Downloading free downloads page
[Bandcamp] 1986026118: Downloading alac JSON
[Bandcamp] 1986026118: Downloading aac-hi JSON
[Bandcamp] 1986026118: Downloading mp3-v0 JSON
[Bandcamp] 1986026118: Downloading mp3-320 JSON
[Bandcamp] 1986026118: Downloading flac JSON
[Bandcamp] 1986026118: Downloading wav JSON
[Bandcamp] 1986026118: Downloading vorbis JSON
[Bandcamp] 1986026118: Downloading aiff-lossless JSON
[debug] Invoking downloader on u'http://popplers5.bandcamp.com/download/track?enc=aiff-lossless&fsig=02f69c297eb8c15c521b8e115ee5a525&id=1986026118&ts=1504412186.1030003688'
[download] Destination: 01-Deboned - Fuckin Melt!.aiff
[download] 100% of 11.16MiB in 00:28
[debug] avconv command line: avprobe -show_streams 'file:01-Deboned - Fuckin Melt!.aiff'
[ffmpeg] Destination: 01-Deboned - Fuckin Melt!.mp3
[debug] ffmpeg command line: avconv -y -i 'file:01-Deboned - Fuckin Melt!.aiff' -vn -acodec libmp3lame '-q:a' 5 'file:01-Deboned - Fuckin Melt!.mp3'
Deleting original file 01-Deboned - Fuckin Melt!.aiff (pass -k to keep)
[ffmpeg] Adding metadata to '01-Deboned - Fuckin Melt!.mp3'
[debug] ffmpeg command line: avconv -y -i 'file:01-Deboned - Fuckin Melt!.mp3' -c copy -metadata 'purl=https://deboned.bandcamp.com/track/fuckin-melt' -metadata 'artist=Deboned' -metadata 'title=Fuckin Melt!' 'file:01-Deboned - Fuckin Melt!.temp.mp3'
[download] Downloading video 2 of 5
[Bandcamp] decaying-rotten-insides: Downloading webpage
[Bandcamp] 1108131875: Downloading free downloads page
[Bandcamp] 1108131875: Downloading alac JSON
[Bandcamp] 1108131875: Downloading aac-hi JSON
[Bandcamp] 1108131875: Downloading mp3-v0 JSON
[Bandcamp] 1108131875: Downloading mp3-320 JSON
[Bandcamp] 1108131875: Downloading flac JSON
[Bandcamp] 1108131875: Downloading wav JSON
[Bandcamp] 1108131875: Downloading vorbis JSON
[Bandcamp] 1108131875: Downloading aiff-lossless JSON
[debug] Invoking downloader on u'http://popplers5.bandcamp.com/download/track?enc=aiff-lossless&fsig=ac85da38eb46066a7c7dbf3adeeb3c2b&id=1108131875&ts=1504412221.3505618781'
[download] Destination: 02-Deboned - Decaying Rotten Insides.aiff
[download]   4.7% of 10.72MiB at 685.82KiB/s ETA 00:15^C
ERROR: Interrupted by user

...
<end of log>

Description of your issue, suggested solution and other information

I run a script using youtube-dl, which I will post below. The issue is the fact that youtube-dl announces a download of every file format even though I limit it to mp3, as can be seen in the script. The file size is of course way larger than it would be when only downloading a single mp3. I do end up with only the mp3. So I'm wandering if youtube-dl is actually first downloading all these different file formats or that it produces the output above for other reasons.

Script

echo $1 | awk -F / '{print $3.$5 }' | sed 's/.bandcamp.com/./' | xargs mkdir

cd `echo $1 | awk -F / '{print $3.$5 }' | sed 's/.bandcamp.com/./'`

youtube-dl --ignore-errors -v -x --audio-format mp3 -continue -o "%(autonumber)02d-%(title)s.%(ext)s" --add-metadata "${1}"
dstftw commented 7 years ago

It does not download formats, it download formats' metadata.

sf55 commented 7 years ago

Ok. Thanks