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

Best way to generate both, the best video and audio file in one go in specific output formats #24628

Closed
frispete opened this issue Apr 5, 2020 · 1 comment
Labels

Comments

@frispete
Copy link

@frispete frispete commented Apr 5, 2020

Checklist

  • I'm asking a question
  • I've looked through the README and FAQ for similar questions
  • I've searched the bugtracker for similar questions including closed ones

Question

What's the best way to generate both, the best video (merged with best audio) and the best audio file in one go, converting to specific output formats without leaving intermediate files behind?

First, thank you for this awesome program. It's been a reliable companion for quite some time now, and has proven its fitness in a lot of situations.

I also see, that it goes to great length solve this issue, but I haven't found a good way to success without downloading the video twice, and using the --extract-audio switch once, or leaving intermediate files behind (with --keep-video).

As an example, the net result should be generating a mp4 as well as a mp3 file in one go? E.g. I would like to combine these options:

youtube-dl --recode-video mp4 --extract-audio --audio-format mp3 --audio-quality 0 --output '%(title)s.%(ext)s'

but this results in an audio stream, encoded as mp4. Hmm.

In the README, there's an example:

# Download the best video format and the best audio format without merging them
$ youtube-dl -f 'bestvideo,bestaudio' -o '%(title)s.f%(format_id)s.%(ext)s'

that almost acts, like what I have in mind, but it should combine them, and convert the result in both requested formats. Is that possible somehow?

@frispete frispete added the question label Apr 5, 2020
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 5, 2020

Not possible in one pass.

@dstftw dstftw closed this Apr 5, 2020
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.