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

How to get audio when watching partially downloaded file #26754

Open
student-sx opened this issue Sep 30, 2020 · 2 comments
Open

How to get audio when watching partially downloaded file #26754

student-sx opened this issue Sep 30, 2020 · 2 comments
Labels

Comments

@student-sx
Copy link

@student-sx student-sx commented Sep 30, 2020

  • 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

If I download a video using youtube-dl I often want to watch the video already before the download finished. However if I just play the *.part file, there is no audio.

So how should I initiate the download process such that the partial downloaded file also contains the correct audio stream?

If I already initiated a download "the wrong way", i.e. such that the part file doesn't contain audio, is there a way to fix this while the download continues?

@student-sx student-sx added the question label Sep 30, 2020
@pukkandan
Copy link

@pukkandan pukkandan commented Oct 17, 2020

youtube-dl by default downloads the best video and best audio separately and merges them. There are a few workarounds to your issue though:

  1. Use -f best. This restricts the download to formats containing both video and audio inside. For youtube, it is only 720p and 360p.
    OR
  2. If your player supports "external audio", you can download the audio separately using -f bestaudio and load it as external audio in the player
@student-sx
Copy link
Author

@student-sx student-sx commented Oct 17, 2020

Thanks, that helps!

For future readers I may add that if you use mpv, then the second method works via something like

mpv video.mp4 --audio-file=audio.m4a
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.