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

--audio-format doesn't work when -o is set #12069

Closed
kraxarn opened this issue Feb 10, 2017 · 2 comments
Closed

--audio-format doesn't work when -o is set #12069

kraxarn opened this issue Feb 10, 2017 · 2 comments

Comments

@kraxarn
Copy link

@kraxarn kraxarn commented Feb 10, 2017

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 that [x])
  • Use Preview tab to see how your issue will actually look like

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

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

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

The following sections concertize 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 -v flag to your command line you run youtube-dl with, 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 -x -v --audio-format vorbis https://www.youtube.com/watch?v=QCel4cmihUQ -o output.ogg
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-x', '-v', '--audio-format', 'vorbis', 'https://www.youtube.com/watch?v=QCel4cmihUQ', '-o', 'output.ogg']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2017.02.10
[debug] Python version 3.4.4 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg 2.8.4, ffprobe N-80219-g153ab83
[debug] Proxy map: {}
[youtube] QCel4cmihUQ: Downloading webpage
[youtube] QCel4cmihUQ: Downloading video info webpage
[youtube] QCel4cmihUQ: Extracting video information
[youtube] QCel4cmihUQ: Downloading MPD manifest
[debug] Invoking downloader on 'https://r2---sn-c5ioiv45c-hhme.googlevideo.com/videoplayback?id=4027a5e1c9a28544&itag=251&source=youtube&requiressl=yes&ms=au&pl=22&mv=m&initcwndbps=4411250&mn=sn-c5ioiv45c-hhme&mm=31&ratebypass=yes&mime=audio/webm&gir=yes&clen=2450112&lmt=1477884594723684&dur=148.481&mt=1486740087&signature=5117C73775B2FB38EAF1CBEC6AD0F082A2DCFBE0.2AD839D84EF09018ACB6020CFCAB7ABC8B6D7C31&key=dg_yt0&upn=y_znsvQv-WA&ip=79.136.74.52&ipbits=0&expire=1486761714&sparams=ip,ipbits,expire,id,itag,source,requiressl,ms,pl,mv,initcwndbps,mn,mm,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: output.ogg
[download] 100% of 2.34MiB in 00:00
[debug] ffmpeg command line: ffprobe -show_streams file:output.ogg
[ffmpeg] Post-process file output.ogg exists, skipping
...
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

When downloading any (at least what I tested) using -o to define an output file together with defining --audio-format (and ofc -x), the --audio-format tag seems to be ignored and it just uses the default format. For example, in the current code, if I skip the "-o output.ogg" tag, it correctly downloads an ogg file with a vorbis codec, but with it, it downloads an ogg file with the opus codec.
I also tried this on Linux (OpenSUSE 42.2 x64) with Python 2.7.12 and FFmpeg 3.2 and it results in the same bug.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 10, 2017

Do not hardcode extension in output template rather use %(ext)s.

@dstftw dstftw closed this Feb 10, 2017
@kraxarn
Copy link
Author

@kraxarn kraxarn commented Feb 10, 2017

My bad, sorry, but thanks.

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.