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

use --audio-format mp3 and -o test.mp3 together cause youtube-dl fail to convert the file #16357

Closed
5 of 9 tasks
mmis1000 opened this issue May 2, 2018 · 3 comments
Closed
5 of 9 tasks
Labels

Comments

@mmis1000
Copy link

mmis1000 commented May 2, 2018

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.05.01. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2018.05.01

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

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 ```):

$ youtube-dl -v --prefer-ffmpeg -x --audio-format mp3 https://www.youtube.com/watch?v=AmDqeXFejlQ -o testk.mp3 
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--prefer-ffmpeg', u'-x', u'--audio-format', u'mp3', u'https://www.youtube.com/watch?v=AmDqeXFejlQ', u'-o', u'testk.mp3']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.05.01
[debug] Python version 2.7.13 (CPython) - Linux-4.9.0-3-amd64-x86_64-with-debian-9.1
[debug] exe versions: ffmpeg 3.2.7-1, ffprobe 3.2.7-1
[debug] Proxy map: {}
[youtube] AmDqeXFejlQ: Downloading webpage
[youtube] AmDqeXFejlQ: Downloading video info webpage
[youtube] AmDqeXFejlQ: Extracting video information
[debug] Invoking downloader on u'https://r2---sn-npoeenez.googlevideo.com/videoplayback?source=youtube&clen=4870942&signature=5322CD07A076B210B5643AE4DD1095FF4F4BBD23.6762EC338A1DC601B8B5BC9793C299FDFCBDF7BD&ei=y7npWo7fO6KQz7sP3qeXmA8&key=yt6&c=WEB&ipbits=0&itag=171&ms=au%2Conr&initcwndbps=198750&mv=m&dur=290.561&mt=1525266773&id=o-APYixFEQTIxOKTR5EzXRekNA4KuRp6XYQgCgHqplGcQw&fexp=23724337&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&pl=22&mn=sn-npoeenez%2Csn-i3belne6&ip=188.166.180.85&mm=31%2C26&lmt=1449554428276624&expire=1525288492&keepalive=yes&fvip=2&gir=yes&mime=audio%2Fwebm&requiressl=yes&ratebypass=yes'
[download] testk.mp3 has already been downloaded
[download] 100% of 4.75MiB
[debug] ffmpeg command line: ffprobe -show_streams 'file:testk.mp3'
[ffmpeg] Post-process file testk.mp3 exists, skipping
...
<end of log>

Description of your issue, suggested solution and other information

What happened?

When I use --audio-format mp3 and -o test.mp3 at same time.
the downloader will download the other format as test.mp3 and failed to convert the file because it can't override the file itself.

What did you expect?

The downloader should make a temporary file first to later convert it to mp3 instead of downloader other format directly as mp3 and get stuck.

@dstftw
Copy link
Collaborator

dstftw commented May 2, 2018

Do not hardcode extension in output template.

@dstftw dstftw closed this as completed May 2, 2018
@dstftw dstftw added the invalid label May 2, 2018
@mmis1000
Copy link
Author

mmis1000 commented May 2, 2018

@dstftw
There is no reason to use extension name place holder while you only want mp3?
It also makes little sense such behavior should happen when you only want a single file

@dstftw
Copy link
Collaborator

dstftw commented May 2, 2018

Output template specifies the name of file being downloaded not an mp3 file. You can't just download mp3 cause there is no mp3 exists. You can only convert if from another format. So again: do not mess with output template if you have no idea what are you doing.

@ytdl-org ytdl-org locked as resolved and limited conversation to collaborators May 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants