You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One particular use case that I have for ncmpcpp is that sometimes while listening to an internet radio stream I come across a song that I want to listen to again, so I'll hop onto Youtube and search it up. I'm wondering if there's any interest in implementing a feature in ncmpcpp that will allow the user to search and play audio streams from Youtube.
It's unrelated to ncmpcpp but my suggestion is to use mpv + youtube-dl combo for stream a audio.
Plumbing the url for xsel and make a shortcut is very handy!
@andremeireles I am a new linux user so could you please explain what you meant by using xsel? Also, I would like to set up ncmpcpp so I can have both local files and songs from youtube (in red color) present and playable in the same playlist on ncmpcpp. Could you help with this? I use Arch linux and Mopidy+ncmpcpp, and I have local files as white and spotify files as green, but have been unable to find a solution to adding and streaming audio from youtube.
@SriramKid, xsel -i grabs the content and store it on primary selection (clipboard).
You can use cat or sed to send contents to xsel
For example: sed -n 2p youtube.txt | xsel -i will copy the second line from the file youtube.txt.
This is the basic usage but will not help with your problem.
To hear a specific audio from youtube channels, i store some urls, one by line, inside a file and pipe it through dmenu and finally, play the stream on mpv.
Show a menu with 10 lines available for you choose one url to hear.
Play the url choosed with mpv
You can use mpv "$(cat radios_and_youtube.txt | dmenu -l 10)" --no-video --player-operation-mode=pseudo-gui & to disable video and play just audio with a black screen.
This approach works with youtube urls and streaming radio channels.
Sorry to messy the OP suggestion. I don't know if ncmpcpp can do it nowadays and i was searching this functionality too. I felt like suggesting an alternative while don't have answers to ncmpcpp.
Activity
andremeireles commentedon Mar 30, 2019
It's unrelated to ncmpcpp but my suggestion is to use mpv + youtube-dl combo for stream a audio.
Plumbing the url for xsel and make a shortcut is very handy!
SriramKid commentedon May 13, 2019
@andremeireles I am a new linux user so could you please explain what you meant by using xsel? Also, I would like to set up ncmpcpp so I can have both local files and songs from youtube (in red color) present and playable in the same playlist on ncmpcpp. Could you help with this? I use Arch linux and Mopidy+ncmpcpp, and I have local files as white and spotify files as green, but have been unable to find a solution to adding and streaming audio from youtube.
andremeireles commentedon May 17, 2019
@SriramKid,
xsel -igrabs the content and store it on primary selection (clipboard).You can use
catorsedto send contents toxselFor example:
sed -n 2p youtube.txt | xsel -iwill copy the second line from the file youtube.txt.This is the basic usage but will not help with your problem.
To hear a specific audio from youtube channels, i store some urls, one by line, inside a file and pipe it through dmenu and finally, play the stream on mpv.
The script:
mpv "$(cat radios_and_youtube.txt | dmenu -l 10)" &will:You can use
mpv "$(cat radios_and_youtube.txt | dmenu -l 10)" --no-video --player-operation-mode=pseudo-gui &to disable video and play just audio with a black screen.This approach works with youtube urls and streaming radio channels.
Sorry to messy the OP suggestion. I don't know if ncmpcpp can do it nowadays and i was searching this functionality too. I felt like suggesting an alternative while don't have answers to ncmpcpp.