Download Termux from F-Droid. Note that a rooted device is not necessary.
Optionally, download Termux:API to provide termux-media-player
, and other command you may want to use. Or download play-audio link
[Important] Give Termux permissions to access storage, if access has not been previously granted:
termux-setup-storage
Run the script:
curl -L --proto '=https' --tlsv1.2 -sSf https://git.io/JEqID | bash -s -- REPLACEME
REPLACEME
must be changed to the name of another forked repo which is also under my github. (REPLACEME
is not ytdl
for certain. Please search.)
More optional steps:
Base on this
pip install cplay-ng
to install cplay-ng
which is a text-base ui to select files. It tries to use mpv
player by default. We need to override this. I override it by editing the script file directly.
The reddit post mentioned /data/data/com.termux/files/usr/lib/python3.8/site-packages/cplay/cplay.py
. Change python3.8 with the actual python version. Use nano
to edit that file. Search for the phrase mpv
using ctrl-w. That should bring you to here
This is a python list showing the command line to invoke mpv
. You can comment out this list and insert your own python list to invoke play-audio
or termux-media-player
. For examle, I replace
[
'mpv',
'--audio-display=no',
'--start=%i' % self.position,
'--volume=100',
'--replaygain=track',
self.path,
],
with
['play-audio', self.path],
for play-audio
. Make sure indentation matches the surrounding code. (Python!)