Skip to content

[Suggestion] Youtube fetcher #53

Open

Description

@christopher-fu

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.

Activity

  1. andremeireles commented on Mar 30, 2019

    @andremeireles

    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!

  2. SriramKid commented on May 13, 2019

    @SriramKid

    @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.

  3. andremeireles commented on May 17, 2019

    @andremeireles

    @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.

    The script: mpv "$(cat radios_and_youtube.txt | dmenu -l 10)" & will:

    1. Show a menu with 10 lines available for you choose one url to hear.
    2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions