Skip to main content

Simple yet useful Termux GUI for yt-dlp.

Project description

required python version required python version

Simple yet useful Termux GUI for yt-dlp.

preview 1

Watch the GUI in action

Why create this?

To answser the question:

"Why not use Seal, YTDLnis or yt-dlp directly in Termux instead?"

This tool was created due to limitations of existing yt-dlp Android APK wrappers (eg. Seal, YTDLnis), where yt-dlp would failing to download videos from websites with heavy bot protection.

On Termux even after installing yt-dlp with pip install yt-dlp[default,curl_cffi] on Android, curl_cffi would still not recognize the curl-impersonate binaries.

That limitation would cause:

  • curl_cffi not being able to find the correct curl-impersonate binaries.
  • downloading videos from websites with bot protection would typically fail with a 403 error.

Caveats

  • The GUI is lightweight with only a subset of features.
  • The curl-impersonate binaries only works with chrome impersonation at the moment (others haven't been tested).
  • The GUI is not optimized for concurrent downloads.

Installation

Prerequisites

These must be installed before using yt-dlp-termux-gui:

Install using pip

pip install yt-dlp-termux-gui --upgrade

How to use (declarative)

check if required dependencies are installed

import yt_dlp_termux_gui

# force=True -> Overwrite 'curl-impersonate' compiled binaries if they already exist
yt_dlp_termux_gui.ensure_packages(force=True)

create Termux:Widget shortcut (optional)

# task=True -> Make the widget a Termux:Widget task to allow it to run in the background
#
# WARNING:
# the plugins 'Termux:GUI' and 'Termux:Widget'
# must be installed the same way as Termux was installed
# Termux:GUI --> https://github.com/termux/termux-gui
# Termux:Widget --> https://github.com/termux/termux-widget
yt_dlp_termux_gui.ensure_termux_widget(force=True, task=True)

launch the GUI

# launch the GUI
yt_dlp_termux_gui.launch()

manage settings

# get settings
settings = yt_dlp_termux_gui.get_settings()

# reset settings
yt_dlp_termux_gui.reset_settings()

# get settings file path (~/.config/yt_dlp_termux_gui/settings.json)
settings_path = yt_dlp_termux_gui.SETTINGS_PATH

get widget information

# get widget name (yt-dlp-gui.sh)
widget_name = yt_dlp_termux_gui.WIDGET_SCRIPT_NAME

# get widget title (YT-DLP TERMUX GUI)
widget_title = yt_dlp_termux_gui.WIDGET_TITLE

How to use (CLI)

Usage: yt-dlp-termux-gui [OPTIONS...] [COMMAND]

Commands:
deps --> Ensure dependencies (install missing packages)
launch --> Launch the GUI
widget --> Ensure Termux:Widget shortcut for the GUI

Options:
--verbose <silent|debug|info|warning|error|critical> --> Set logging level
--silent --> Disable ALL GUI logs in Termux
--widget-name --> Print widget name
--widget-script-name --> Print widget script filename
--settings --> Print current settings
--settings-path --> Print settings path
--settings-reset --> Reset settings
-h, --help --> Show this help message
-v, -V, --version --> Print version

Options [deps]:
--force --> Overwrite 'curl-impersonate' compiled binaries if they already exist

Options [launch]:
--no-activity-logs --> Disable GUI activity logs in Termux
--init-logs --> Enable GUI initialization logs in Termux by the GUI

Options [widget]:
--force --> Overwrite existing widget if it already exist
--task --> Make the widget a Termux:Widget task to allow it to run in the background

Tools

Terminal

CLI

Binaries

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yt_dlp_termux_gui-1.2.12.tar.gz (421.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yt_dlp_termux_gui-1.2.12-py3-none-any.whl (420.7 kB view details)

Uploaded Python 3

File details

Details for the file yt_dlp_termux_gui-1.2.12.tar.gz.

File metadata

  • Download URL: yt_dlp_termux_gui-1.2.12.tar.gz
  • Upload date:
  • Size: 421.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for yt_dlp_termux_gui-1.2.12.tar.gz
Algorithm Hash digest
SHA256 06933f9796b79f07976dda81af43cbbf47af5a2b586f400305be377c93697165
MD5 613b673bf501e71c46cbd720b15758d7
BLAKE2b-256 bcb28df3fa979e9d856f9ddc48786f3ebf11f2ec47bba1f49a2d8beb1cbf6147

See more details on using hashes here.

File details

Details for the file yt_dlp_termux_gui-1.2.12-py3-none-any.whl.

File metadata

File hashes

Hashes for yt_dlp_termux_gui-1.2.12-py3-none-any.whl
Algorithm Hash digest
SHA256 a5d953dd1f63cf24ae9053fea2013ba0ecf0ac573783c64aa15a536f6bbac4eb
MD5 aa4f3f9bbd66eaa049b4a23d9b74d09d
BLAKE2b-256 a3f52a506e21db92faa3020f47f3651c3f7284e8e7815240df4365b3993eda3c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page