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

video or audio url #11621

Closed
vasvasvas opened this issue Jan 6, 2017 · 7 comments
Closed

video or audio url #11621

vasvasvas opened this issue Jan 6, 2017 · 7 comments

Comments

@vasvasvas
Copy link

@vasvasvas vasvasvas commented Jan 6, 2017

Hi!
I would like to ask the following questions:

  1. Is it possible to get the video link (e.g. http://......... .mpeg) without downloading the video file? I want to use this link in order to stream YouTube videos through Winamp. Winamp does not have any related plug-in. Furthermore I am not interested in using any other player (like VLC).
  2. Is it possible to get the audio link(e.g. http://......... .mp3) without downloading the audio file?

If yes, which commands I have to use?
Thank you

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jan 6, 2017

You can use -g to get URLs and use -f to choose from video/audio.

@yan12125 yan12125 closed this Jan 6, 2017
@vasvasvas
Copy link
Author

@vasvasvas vasvasvas commented Jan 6, 2017

Hi!
I only get the YouTube link (https://www.youtube.com/watch?....) and not the video link or any audio link. Please write a code example to get the audio link.
Thank you

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jan 6, 2017

For example, to get URL of the video stream,

youtube-dl -f bestvideo -g "https://www.youtube.com/watch?v=4uU8PmWPfMM"

And audio:

youtube-dl -f bestaudio -g "https://www.youtube.com/watch?v=4uU8PmWPfMM"

Or you can combine both:

youtube-dl -f bestvideo+bestaudio -g "https://www.youtube.com/watch?v=4uU8PmWPfMM"

As -f bestvideo+bestaudio is the default, it can be simplified as:

youtube-dl -g "https://www.youtube.com/watch?v=4uU8PmWPfMM"
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 6, 2017

YouTube does not serve mp3.

@vasvasvas
Copy link
Author

@vasvasvas vasvasvas commented Jan 6, 2017

Hi!
…any other direct link?
“mp3” was an example.

Thank you

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 6, 2017

Select any other format.

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
3 participants
You can’t perform that action at this time.