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

Extracting audio from a Python script #10628

Closed
CRImier opened this issue Sep 12, 2016 · 1 comment
Closed

Extracting audio from a Python script #10628

CRImier opened this issue Sep 12, 2016 · 1 comment

Comments

@CRImier
Copy link

@CRImier CRImier commented Sep 12, 2016

  • I've verified and I assure that I'm running youtube-dl 2016.09.11.1
  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Question

Hi! I'm trying to extract audio from downloading video while embedding youtube-dl into a Python script. How do I go about that? It doesn't seem to be described in options.py, I've tinkered with postprocessor_args etc. but nothing would help. Is it even possible while keeping youtube_dl embedded? If it's not, how do I go about fixing it? Any pointers?

Best regards,
Arsenijs.

@CRImier
Copy link
Author

@CRImier CRImier commented Sep 12, 2016

Never mind, solved. Added this to "opts":

  "postprocessors":[
{"key":'FFmpegExtractAudio', "preferredcodec":"mp3", "preferredquality":"0"}]

Will soon send a pull request - there's a bug where you can't send an int as "preferredquality", and though it's certainly something intuitively possible, the error message is anything but helpful.

@CRImier CRImier closed this Sep 12, 2016
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
1 participant
You can’t perform that action at this time.