Convert Figma logo to code with AI

mps-youtube logoyewtube

yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.

8,072
645
8,072
213

Top Related Projects

82,065

A feature-rich command-line audio/video downloader

131,248

Command-line program to download videos from YouTube.com and other video sites

31,014

A libre lightweight streaming front-end for Android.

16,025

Invidious is an alternative front-end to YouTube

Downloads videos and playlists from YouTube

12,083

A lightweight, dependency-free Python library (and command-line utility) for downloading YouTube Videos.

Quick Overview

Yewtube (formerly mps-youtube) is a terminal-based YouTube player and downloader. It allows users to search, stream, and download YouTube videos directly from the command line, offering a lightweight and efficient alternative to web-based YouTube interfaces.

Pros

  • Lightweight and resource-efficient, ideal for low-end systems or servers
  • Offers a distraction-free, ad-free YouTube experience
  • Supports both streaming and downloading of videos and audio
  • Highly customizable with various playback options and configurations

Cons

  • Requires command-line proficiency, which may be challenging for non-technical users
  • Limited visual experience compared to the official YouTube web interface
  • Dependent on external players (e.g., mplayer, mpv) for video playback
  • May occasionally face issues due to changes in YouTube's API or structure

Getting Started

To install and run Yewtube:

# Install using pip
pip install yewtube

# Run Yewtube
yewtube

Basic usage:

// Search for videos
/coldplay

// Play a video (replace X with the video number)
X

// Download a video (replace X with the video number)
d X

// Show help
h

For more detailed instructions and advanced usage, refer to the project's documentation on GitHub.

Competitor Comparisons

82,065

A feature-rich command-line audio/video downloader

Pros of yt-dlp

  • More comprehensive video downloading capabilities, supporting a wider range of websites and formats
  • Actively maintained with frequent updates and bug fixes
  • Offers advanced features like throttling, format selection, and metadata manipulation

Cons of yt-dlp

  • Command-line interface may be less user-friendly for some users
  • Lacks built-in playback functionality
  • Requires more system resources for complex operations

Code Comparison

yewtube:

def play_audio(self, video_id, seek=None, delay=None):
    # Play audio implementation

yt-dlp:

def download(self, url_list):
    # Download video implementation

Summary

yt-dlp is a powerful and versatile tool for downloading videos from various platforms, offering extensive features and regular updates. It excels in flexibility and format support but may have a steeper learning curve due to its command-line interface.

yewtube, on the other hand, provides a more streamlined experience for YouTube content, focusing on audio playback and a simpler user interface. It's better suited for users primarily interested in listening to YouTube content without the need for extensive downloading options.

The choice between the two depends on the user's specific needs: yt-dlp for comprehensive downloading capabilities, or yewtube for a more focused YouTube audio experience.

131,248

Command-line program to download videos from YouTube.com and other video sites

Pros of youtube-dl

  • More versatile, supporting a wide range of video platforms beyond YouTube
  • Offers more advanced features like playlist downloading and format selection
  • Actively maintained with frequent updates and bug fixes

Cons of youtube-dl

  • Command-line interface may be less user-friendly for some users
  • Lacks built-in playback functionality
  • Requires additional software for audio extraction or conversion

Code Comparison

youtube-dl:

youtube-dl https://www.youtube.com/watch?v=dQw4w9WgXcQ

yewtube:

mpsyt
> /dQw4w9WgXcQ
> 1

Key Differences

yewtube is a terminal-based YouTube player and downloader, while youtube-dl is a more comprehensive video downloader supporting multiple platforms. yewtube offers a more interactive, user-friendly interface for searching and playing YouTube content directly in the terminal. youtube-dl, on the other hand, focuses on downloading capabilities and provides more options for extracting media from various sources.

yewtube is better suited for users who primarily want to stream YouTube content in a lightweight, terminal-based environment. youtube-dl is ideal for those who need a powerful, flexible tool for downloading videos from multiple platforms and have some command-line experience.

Both tools have their strengths, and the choice between them depends on the user's specific needs and preferences.

31,014

A libre lightweight streaming front-end for Android.

Pros of NewPipe

  • User-friendly graphical interface for Android devices
  • Supports background playback and picture-in-picture mode
  • Offers additional features like subscriptions and playlists without account

Cons of NewPipe

  • Limited to Android platform
  • Requires manual updates as it's not available on Google Play Store
  • May have occasional compatibility issues with YouTube API changes

Code Comparison

NewPipe (Java):

@Override
protected void onCreateInitial(Bundle savedInstanceState) {
    if (DEBUG)
        Log.d(TAG, "onCreate() called with: savedInstanceState = [" + savedInstanceState + "]");
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
}

Yewtube (Python):

def main():
    init_screen()
    init_readline()
    g.update_check = check_update() if g.check_updates else "no"
    if os.path.exists(g.CFFILE):
        g.PAFY_OPTS = json.load(open(g.CFFILE))

Both projects aim to provide alternative YouTube clients, but they differ in their approach and target platforms. NewPipe focuses on Android users with a feature-rich graphical interface, while Yewtube is a command-line based application primarily for desktop users. The code snippets highlight the different programming languages and initialization processes used in each project.

16,025

Invidious is an alternative front-end to YouTube

Pros of Invidious

  • Web-based interface accessible from any browser, no installation required
  • Supports multiple instances for improved privacy and load balancing
  • Offers additional features like video downloading and API access

Cons of Invidious

  • Requires server setup and maintenance
  • May experience occasional downtime or performance issues
  • Limited customization options compared to command-line tools

Code Comparison

Invidious (Crystal):

get "/api/v1/videos/:id" do |env|
  id = env.params.url["id"]
  region = env.params.query["region"]?

  begin
    video = get_video(id, region: region)
  rescue ex
    env.response.status_code = 500
    next error_json(500, ex)
  end

  video.to_json(env.params.query["fields"]?)
end

Yewtube (Python):

def show_video(video):
    """Show video details."""
    cols, _ = screen_size()
    out = ""
    details = [
        ("Title", video.title),
        ("Author", video.channel_title),
        ("Duration", video.duration),
        ("Uploaded", video.publish_date),
        ("Views", video.views)
    ]
    for name, value in details:
        out += fmt("  {0}: {1}\n", name, value)
    g.content = out

Both projects aim to provide alternative interfaces for YouTube, but they differ in their approach and implementation. Invidious offers a web-based solution with a focus on privacy, while Yewtube provides a command-line interface for a more lightweight and customizable experience.

Downloads videos and playlists from YouTube

Pros of YoutubeDownloader

  • Graphical user interface, making it more user-friendly for non-technical users
  • Supports batch downloading of multiple videos or entire playlists
  • Offers a wide range of output formats and quality options

Cons of YoutubeDownloader

  • Limited to Windows operating system
  • Lacks advanced features like search functionality within the application
  • No built-in playback capabilities

Code Comparison

YoutubeDownloader (C#):

var youtube = new YoutubeClient();
var video = await youtube.Videos.GetAsync("https://youtube.com/watch?v=...");
var streamManifest = await youtube.Videos.Streams.GetManifestAsync(video.Id);
var streamInfo = streamManifest.GetMuxedStreams().GetWithHighestVideoQuality();
await youtube.Videos.Streams.DownloadAsync(streamInfo, $"{video.Title}.{streamInfo.Container}");

yewtube (Python):

from mps_youtube import main
main.main()
# User interacts with CLI to search, play, and download videos

Note: The code comparison highlights the difference in approach. YoutubeDownloader provides a programmatic way to download videos, while yewtube offers a command-line interface for user interaction.

12,083

A lightweight, dependency-free Python library (and command-line utility) for downloading YouTube Videos.

Pros of pytube

  • Lightweight library focused solely on downloading YouTube videos
  • Simple API for easy integration into other Python projects
  • Supports both progressive and adaptive streams

Cons of pytube

  • Limited to downloading functionality only
  • No built-in player or command-line interface
  • Requires additional libraries for audio extraction or conversion

Code comparison

pytube

from pytube import YouTube

yt = YouTube('https://www.youtube.com/watch?v=dQw4w9WgXcQ')
stream = yt.streams.get_highest_resolution()
stream.download()

yewtube

from mps_youtube import main

main.main(['playurl', 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'])

Key differences

  • pytube is a library for downloading YouTube videos, while yewtube is a full-featured command-line application for searching, playing, and downloading YouTube content
  • yewtube offers a text-based user interface and integrates with media players, whereas pytube is designed to be used programmatically
  • pytube focuses on providing a simple API for video downloads, while yewtube offers a broader range of features including playlists, local playback, and audio-only mode

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

STOP GENOCIDE OF INNOCENT PEOPLE

                      _         _          
                     | |       | |         
  _   _  _____      _| |_ _   _| |__   ___ 
 | | | |/ _ \ \ /\ / / __| | | | '_ \ / _ \
 | |_| |  __/\ V  V /| |_| |_| | |_) |  __/
  \__, |\___| \_/\_/  \__|\__,_|_.__/ \___|
   __/ |                                   
  |___/


yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
Visit this page if you want to support maintainers of this project.

Installation

Stable Version

Using pip

  1. Install using pip install yewtube
  2. Run using, yt. Enjoy!

Using pipx (Recommended)

  1. Install pipx using pip install pipx
  2. Install yewtube using pipx install yewtube
  3. Now, type yt That's it.

Latest Version

Using pip

  1. Install using pip install git+https://github.com/mps-youtube/yewtube.git
  2. Run using, yt. Enjoy!

Using pipx

  1. Install pipx using pip install pipx
  2. Install yewtube using pipx install git+https://github.com/mps-youtube/yewtube.git
  3. Now, type yt That's it.

What's new in yewtube?

  • No Youtube API Key required
  • Run audio in VLC with no GUI

See complete and up-to-date changelog here.

These features are still inherited from mps-youtube.

  • Search and play audio/video from YouTube
  • Search tracks of albums by album title
  • Search and import YouTube playlists
  • Create and save local playlists
  • Download audio/video
  • Convert to mp3 & other formats (requires ffmpeg or avconv)
  • View video comments
  • Works with Python 3.x
  • Works with Windows, Linux and Mac OS X
  • Requires mplayer, mpv or VLC

This project is based on mps-youtube and mps-youtube is based on mps, a terminal based program to search, stream and download music. This implementation uses YouTube as a source of content and can play and download video as well as audio. The pafy library handles interfacing with YouTube.

mps-youtube wiki
yewtube wiki

Screenshots

Search:

A standard search is performed by entering / followed by search terms.

You can play all of the search results by giving 1- as input

Repeating song/songs can be done with song_number[loop], for example: 1[3] or 4-6[2]

Local Playlists:

Search result items can easily be stored in local playlists.

YouTube Playlists:

YouTube playlists can be searched and played or saved as local playlists.

A playlist search is performed by // followed by search term.

Download:

Content can be downloaded in various formats and resolutions.

Comments:

A basic comments browser is available to view YouTube user comments.

Music Album Matching:

An album title can be specified and yewtube will attempt to find matches for each track of the album, based on title and duration. Type help search for more info.

Customisation:

Search results can be customised to display additional fields and ordered by various criteria.

This configuration was set up using the following commands

set order views
set columns user:14 date comments rating likes dislikes category:9 views

Type help config for help on configuration options

Upgrading

If installed using pipx

pipx upgrade yewtube

Optionally with upgrading all dependencies:

pipx runpip yewtube install --upgrade-strategy eager --upgrade yewtube

If installed using pip

pip install --upgrade yewtube

Optionally with upgrading all dependencies:

pip install --upgrade-strategy eager --upgrade yewtube

Usage

yewtube is run on the command line using the command:

yt

Enter h from within the program for help.

Using yewtube with mpris

  1. Install PyGObject, GTK and their dependencies based on this guide https://pygobject.readthedocs.io/en/latest/getting_started.html
  2. Install yewtube with mpris extra
> # recommended
> pipx install 'yewtube[mpris]'
> # or
> pip install 'yewtube[mpris]'
  1. check yewtube version
> yt --version
yewtube version    : 2.8.2
yt_dlp version     : 2022.02.04
Python version     : 3.9.7 (default, Nov  7 2021, 15:17:57)
[GCC 11.2.0]
Processor          : x86_64
Machine type       : x86_64
Architecture       : 64bit, ELF
Platform           : Linux-5.13.0-35-generic-x86_64-with-glibc2.34
sys.stdout.enc     : utf-8
default enc        : utf-8
Config dir         : /home/user/.config/mps-youtube
dbus               : 1.2.18
glib               : True
env:TERM           : tmux-256color
env:SHELL          : /usr/bin/zsh
env:LANG           : en_US.UTF-8

If everything working correctly, dbug and glib would have similar result as above text

  1. run set mpris true on yewtube
  2. check with playerctl
> playerctl -l
mps-youtube.instance567867

Check also the common-issue if you are having problem with yewtube.

How to Contribute

Contributions are warmly welcomed! However, please check out the contribution page before making a contribution.