Stream audio from youtubeIs there a way to stream audio/video to an Apple Airplay Device?How can I download...
Origin of the word “pushka”
How to install round brake pads
How do spaceships determine each other's mass in space?
Short scifi story where reproductive organs are converted to produce "materials", pregnant protagonist is "found fit" to be a mother
Are all players supposed to be able to see each others' character sheets?
Can the Witch Sight warlock invocation see through the Mirror Image spell?
Trocar background-image com delay via jQuery
Can I negotiate a patent idea for a raise, under French law?
Sampling from Gaussian mixture models, when are the sampled data independent?
Why aren't there more Gauls like Obelix?
How do I increase the number of TTY consoles?
Writing text next to a table
Why is there an extra space when I type "ls" on the Desktop?
What can I do if someone tampers with my SSH public key?
Movie: boy escapes the real world and goes to a fantasy world with big furry trolls
Finding the minimum value of a function without using Calculus
Will expression retain the same definition if particle is changed?
Is "cogitate" used appropriately in "I cogitate that success relies on hard work"?
What would be the most expensive material to an intergalactic society?
What do you call someone who likes to pick fights?
Is it appropriate to ask a former professor to order a book for me through an inter-library loan?
Is divide-by-zero a security vulnerability?
Difference between `nmap local-IP-address` and `nmap localhost`
Translation of 答えを知っている人はいませんでした
Stream audio from youtube
Is there a way to stream audio/video to an Apple Airplay Device?How can I download Youtube videos?download from YouTube using youtube-dlYoutube doesn't stream videos when accessed from the Youtube portalHow to get the highest quality audio with the smallest download size using youtube-dl?How to play YouTube videos in VLC Player?Downloading and playing audio from cacheyoutube-dl unable to download audio how to resolve that issue?How to force command line VLC to stream youtube videos of specific quality?How to download newly uploaded videos from a youtube channel?
I just want to stream (whitout downloading) a youtube video.
Is there an easy way to do this with python or exists a script to do that?
Or i must download in a temporany file the video, convert it and play?
python youtube streaming
add a comment |
I just want to stream (whitout downloading) a youtube video.
Is there an easy way to do this with python or exists a script to do that?
Or i must download in a temporany file the video, convert it and play?
python youtube streaming
I imagine it would be tricky because Youtube is flash... however, there are some online services that let you convert the video into audio... have you thought about that? My favorite is keepvid.com
– ilarsona
Sep 1 '14 at 22:33
add a comment |
I just want to stream (whitout downloading) a youtube video.
Is there an easy way to do this with python or exists a script to do that?
Or i must download in a temporany file the video, convert it and play?
python youtube streaming
I just want to stream (whitout downloading) a youtube video.
Is there an easy way to do this with python or exists a script to do that?
Or i must download in a temporany file the video, convert it and play?
python youtube streaming
python youtube streaming
asked Sep 1 '14 at 22:32
Wet WaterWet Water
13115
13115
I imagine it would be tricky because Youtube is flash... however, there are some online services that let you convert the video into audio... have you thought about that? My favorite is keepvid.com
– ilarsona
Sep 1 '14 at 22:33
add a comment |
I imagine it would be tricky because Youtube is flash... however, there are some online services that let you convert the video into audio... have you thought about that? My favorite is keepvid.com
– ilarsona
Sep 1 '14 at 22:33
I imagine it would be tricky because Youtube is flash... however, there are some online services that let you convert the video into audio... have you thought about that? My favorite is keepvid.com
– ilarsona
Sep 1 '14 at 22:33
I imagine it would be tricky because Youtube is flash... however, there are some online services that let you convert the video into audio... have you thought about that? My favorite is keepvid.com
– ilarsona
Sep 1 '14 at 22:33
add a comment |
3 Answers
3
active
oldest
votes
pafy
is a Python library that can be used to retrieve URLs to pass to VLC or mplayer, etc. You can specify audio only. It's well documented here and can be installed with sudo apt-get install python-pafy
.
Note it comes with a command line tool called ytdl
which seems similar to youtube-dl
and, as such, won't really do what you want. You'll have to write some python. I assume by the nature of your question this is no problem, but let me know if you need further help.
1
This is so cool, just one file which do what i want. Thank you! :)
– Wet Water
Sep 2 '14 at 12:29
add a comment |
If you have vlc and the text-based browser lynx (both available from Ubuntu's repositories), there is a neat trick you can use to stream video from a commandline. The command I use will do a search and create a playlist of the first page of results which will play in vlc.
I created a simple script to handle the tricky syntax. The script is:
#!/bin/bash
lynx -dump "https://www.youtube.com/results?search_query="$1"" | egrep -o "http.*watch.*" | vlc -
So, if you name the script, say stream_youtube
, you can just enter "stream_youtube "search term"
I just tried it out after not using it in a while, and noticed a couple of errors popping up in a window that I never saw before, but in spite of that annoyance, it still worked. Someone might find it useful, or at least interesting. :-)
add a comment |
This is not the perfect solution for your problem, but it will maybe help you.
youtube-dl
There is a command line tool called youtube-dl
, which offers many options. I think it will first download the full video and then convert to audio. I'm not sure whether there is a possibility to only download an audio stream, but I guess not. Also, youtube-dl
is written in python, but it's not only a simple script.
If you take a look at the manpage, look for the post-processing options. --extract-audio
for example will convert the video file to an audio file. You can also set the --audio-format
and the --audio-quality
. You can also run any custom command after downloading with --exec CMD
.
Get it from the Ubuntu Software Center:sudo apt install youtube-dl
Get it from Github: Then update it withsudo youtube-dl -U
VLC steaming
Alternatively, you can use VLC to stream the video and just ignore or turn off the video function.
It should work to copy the url, open vlc and press CTRL+V or open a network steam (CTRL+N) and paste the url. Then click on Video->Videotrack->deactivate.
Note that this will still stream the whole video, but it will not display it.
A useful alias:alias youtube-dl-audio='youtube-dl --ignore-errors --output "%(title)s.%(ext)s" --extract-audio --audio-format mp3 --audio-quality 0'
– Pablo Bianchi
12 mins ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f518932%2fstream-audio-from-youtube%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
pafy
is a Python library that can be used to retrieve URLs to pass to VLC or mplayer, etc. You can specify audio only. It's well documented here and can be installed with sudo apt-get install python-pafy
.
Note it comes with a command line tool called ytdl
which seems similar to youtube-dl
and, as such, won't really do what you want. You'll have to write some python. I assume by the nature of your question this is no problem, but let me know if you need further help.
1
This is so cool, just one file which do what i want. Thank you! :)
– Wet Water
Sep 2 '14 at 12:29
add a comment |
pafy
is a Python library that can be used to retrieve URLs to pass to VLC or mplayer, etc. You can specify audio only. It's well documented here and can be installed with sudo apt-get install python-pafy
.
Note it comes with a command line tool called ytdl
which seems similar to youtube-dl
and, as such, won't really do what you want. You'll have to write some python. I assume by the nature of your question this is no problem, but let me know if you need further help.
1
This is so cool, just one file which do what i want. Thank you! :)
– Wet Water
Sep 2 '14 at 12:29
add a comment |
pafy
is a Python library that can be used to retrieve URLs to pass to VLC or mplayer, etc. You can specify audio only. It's well documented here and can be installed with sudo apt-get install python-pafy
.
Note it comes with a command line tool called ytdl
which seems similar to youtube-dl
and, as such, won't really do what you want. You'll have to write some python. I assume by the nature of your question this is no problem, but let me know if you need further help.
pafy
is a Python library that can be used to retrieve URLs to pass to VLC or mplayer, etc. You can specify audio only. It's well documented here and can be installed with sudo apt-get install python-pafy
.
Note it comes with a command line tool called ytdl
which seems similar to youtube-dl
and, as such, won't really do what you want. You'll have to write some python. I assume by the nature of your question this is no problem, but let me know if you need further help.
answered Sep 1 '14 at 23:28
wxlwxl
438218
438218
1
This is so cool, just one file which do what i want. Thank you! :)
– Wet Water
Sep 2 '14 at 12:29
add a comment |
1
This is so cool, just one file which do what i want. Thank you! :)
– Wet Water
Sep 2 '14 at 12:29
1
1
This is so cool, just one file which do what i want. Thank you! :)
– Wet Water
Sep 2 '14 at 12:29
This is so cool, just one file which do what i want. Thank you! :)
– Wet Water
Sep 2 '14 at 12:29
add a comment |
If you have vlc and the text-based browser lynx (both available from Ubuntu's repositories), there is a neat trick you can use to stream video from a commandline. The command I use will do a search and create a playlist of the first page of results which will play in vlc.
I created a simple script to handle the tricky syntax. The script is:
#!/bin/bash
lynx -dump "https://www.youtube.com/results?search_query="$1"" | egrep -o "http.*watch.*" | vlc -
So, if you name the script, say stream_youtube
, you can just enter "stream_youtube "search term"
I just tried it out after not using it in a while, and noticed a couple of errors popping up in a window that I never saw before, but in spite of that annoyance, it still worked. Someone might find it useful, or at least interesting. :-)
add a comment |
If you have vlc and the text-based browser lynx (both available from Ubuntu's repositories), there is a neat trick you can use to stream video from a commandline. The command I use will do a search and create a playlist of the first page of results which will play in vlc.
I created a simple script to handle the tricky syntax. The script is:
#!/bin/bash
lynx -dump "https://www.youtube.com/results?search_query="$1"" | egrep -o "http.*watch.*" | vlc -
So, if you name the script, say stream_youtube
, you can just enter "stream_youtube "search term"
I just tried it out after not using it in a while, and noticed a couple of errors popping up in a window that I never saw before, but in spite of that annoyance, it still worked. Someone might find it useful, or at least interesting. :-)
add a comment |
If you have vlc and the text-based browser lynx (both available from Ubuntu's repositories), there is a neat trick you can use to stream video from a commandline. The command I use will do a search and create a playlist of the first page of results which will play in vlc.
I created a simple script to handle the tricky syntax. The script is:
#!/bin/bash
lynx -dump "https://www.youtube.com/results?search_query="$1"" | egrep -o "http.*watch.*" | vlc -
So, if you name the script, say stream_youtube
, you can just enter "stream_youtube "search term"
I just tried it out after not using it in a while, and noticed a couple of errors popping up in a window that I never saw before, but in spite of that annoyance, it still worked. Someone might find it useful, or at least interesting. :-)
If you have vlc and the text-based browser lynx (both available from Ubuntu's repositories), there is a neat trick you can use to stream video from a commandline. The command I use will do a search and create a playlist of the first page of results which will play in vlc.
I created a simple script to handle the tricky syntax. The script is:
#!/bin/bash
lynx -dump "https://www.youtube.com/results?search_query="$1"" | egrep -o "http.*watch.*" | vlc -
So, if you name the script, say stream_youtube
, you can just enter "stream_youtube "search term"
I just tried it out after not using it in a while, and noticed a couple of errors popping up in a window that I never saw before, but in spite of that annoyance, it still worked. Someone might find it useful, or at least interesting. :-)
answered Sep 1 '14 at 23:35
Marty FriedMarty Fried
13.7k53947
13.7k53947
add a comment |
add a comment |
This is not the perfect solution for your problem, but it will maybe help you.
youtube-dl
There is a command line tool called youtube-dl
, which offers many options. I think it will first download the full video and then convert to audio. I'm not sure whether there is a possibility to only download an audio stream, but I guess not. Also, youtube-dl
is written in python, but it's not only a simple script.
If you take a look at the manpage, look for the post-processing options. --extract-audio
for example will convert the video file to an audio file. You can also set the --audio-format
and the --audio-quality
. You can also run any custom command after downloading with --exec CMD
.
Get it from the Ubuntu Software Center:sudo apt install youtube-dl
Get it from Github: Then update it withsudo youtube-dl -U
VLC steaming
Alternatively, you can use VLC to stream the video and just ignore or turn off the video function.
It should work to copy the url, open vlc and press CTRL+V or open a network steam (CTRL+N) and paste the url. Then click on Video->Videotrack->deactivate.
Note that this will still stream the whole video, but it will not display it.
A useful alias:alias youtube-dl-audio='youtube-dl --ignore-errors --output "%(title)s.%(ext)s" --extract-audio --audio-format mp3 --audio-quality 0'
– Pablo Bianchi
12 mins ago
add a comment |
This is not the perfect solution for your problem, but it will maybe help you.
youtube-dl
There is a command line tool called youtube-dl
, which offers many options. I think it will first download the full video and then convert to audio. I'm not sure whether there is a possibility to only download an audio stream, but I guess not. Also, youtube-dl
is written in python, but it's not only a simple script.
If you take a look at the manpage, look for the post-processing options. --extract-audio
for example will convert the video file to an audio file. You can also set the --audio-format
and the --audio-quality
. You can also run any custom command after downloading with --exec CMD
.
Get it from the Ubuntu Software Center:sudo apt install youtube-dl
Get it from Github: Then update it withsudo youtube-dl -U
VLC steaming
Alternatively, you can use VLC to stream the video and just ignore or turn off the video function.
It should work to copy the url, open vlc and press CTRL+V or open a network steam (CTRL+N) and paste the url. Then click on Video->Videotrack->deactivate.
Note that this will still stream the whole video, but it will not display it.
A useful alias:alias youtube-dl-audio='youtube-dl --ignore-errors --output "%(title)s.%(ext)s" --extract-audio --audio-format mp3 --audio-quality 0'
– Pablo Bianchi
12 mins ago
add a comment |
This is not the perfect solution for your problem, but it will maybe help you.
youtube-dl
There is a command line tool called youtube-dl
, which offers many options. I think it will first download the full video and then convert to audio. I'm not sure whether there is a possibility to only download an audio stream, but I guess not. Also, youtube-dl
is written in python, but it's not only a simple script.
If you take a look at the manpage, look for the post-processing options. --extract-audio
for example will convert the video file to an audio file. You can also set the --audio-format
and the --audio-quality
. You can also run any custom command after downloading with --exec CMD
.
Get it from the Ubuntu Software Center:sudo apt install youtube-dl
Get it from Github: Then update it withsudo youtube-dl -U
VLC steaming
Alternatively, you can use VLC to stream the video and just ignore or turn off the video function.
It should work to copy the url, open vlc and press CTRL+V or open a network steam (CTRL+N) and paste the url. Then click on Video->Videotrack->deactivate.
Note that this will still stream the whole video, but it will not display it.
This is not the perfect solution for your problem, but it will maybe help you.
youtube-dl
There is a command line tool called youtube-dl
, which offers many options. I think it will first download the full video and then convert to audio. I'm not sure whether there is a possibility to only download an audio stream, but I guess not. Also, youtube-dl
is written in python, but it's not only a simple script.
If you take a look at the manpage, look for the post-processing options. --extract-audio
for example will convert the video file to an audio file. You can also set the --audio-format
and the --audio-quality
. You can also run any custom command after downloading with --exec CMD
.
Get it from the Ubuntu Software Center:sudo apt install youtube-dl
Get it from Github: Then update it withsudo youtube-dl -U
VLC steaming
Alternatively, you can use VLC to stream the video and just ignore or turn off the video function.
It should work to copy the url, open vlc and press CTRL+V or open a network steam (CTRL+N) and paste the url. Then click on Video->Videotrack->deactivate.
Note that this will still stream the whole video, but it will not display it.
edited 11 mins ago
Pablo Bianchi
2,89521535
2,89521535
answered Sep 1 '14 at 22:56
verpfeiltverpfeilt
1,38421841
1,38421841
A useful alias:alias youtube-dl-audio='youtube-dl --ignore-errors --output "%(title)s.%(ext)s" --extract-audio --audio-format mp3 --audio-quality 0'
– Pablo Bianchi
12 mins ago
add a comment |
A useful alias:alias youtube-dl-audio='youtube-dl --ignore-errors --output "%(title)s.%(ext)s" --extract-audio --audio-format mp3 --audio-quality 0'
– Pablo Bianchi
12 mins ago
A useful alias:
alias youtube-dl-audio='youtube-dl --ignore-errors --output "%(title)s.%(ext)s" --extract-audio --audio-format mp3 --audio-quality 0'
– Pablo Bianchi
12 mins ago
A useful alias:
alias youtube-dl-audio='youtube-dl --ignore-errors --output "%(title)s.%(ext)s" --extract-audio --audio-format mp3 --audio-quality 0'
– Pablo Bianchi
12 mins ago
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f518932%2fstream-audio-from-youtube%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I imagine it would be tricky because Youtube is flash... however, there are some online services that let you convert the video into audio... have you thought about that? My favorite is keepvid.com
– ilarsona
Sep 1 '14 at 22:33