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

Specify default audio format #7058

Closed
danvass opened this issue Oct 4, 2015 · 3 comments
Closed

Specify default audio format #7058

danvass opened this issue Oct 4, 2015 · 3 comments

Comments

@danvass
Copy link

@danvass danvass commented Oct 4, 2015

Hello,

When I try to --extract-audio how can I also specify a number of --audio-formats so that if it is .m4a or .mp3 or .webm it doesn't convert but if it's something else it converts to .mp3?

Additionally, with --extract-audio which formats are kept and which are converted?

Thanks,
Daniel

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 7, 2015

When I try to --extract-audio how can I also specify a number of --audio-formats so that if it is .m4a or .mp3 or .webm it doesn't convert but if it's something else it converts to .mp3?

AFAIK currently it's impossible with the CLI only, while I guess it's possible with this approach. Also, I think such a feature will be never implemented as a CLI option because it's highly customized and rather complicated.

Additionally, with --extract-audio which formats are kept and which are converted?

If there are audio-only files (for example videos on YouTube), youtube-dl will just download the audio-only file and do no conversion. Otherwise, conversion occurs.

@yan12125 yan12125 closed this Oct 7, 2015
@danvass
Copy link
Author

@danvass danvass commented Oct 7, 2015

@yan12125 I understand that conversion doesn't occur if it can download the audio directly but is there any way of knowing what format it will convert to if it can't download just the audio?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 7, 2015

This code segment determines the output codec from the input file codec and the preferred codec option (--audio-format). In short, if the preferred codec is not set, youtube-dl tries to keep the same codec as the input file.

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.