How to play .MP3 files from command line with Termux
What Will I Learn?
- How to play
.MP3
files from command line with Termux
Requirements
- Termux
You can download Termux Here
Difficulty
- Intermediate
What Is Termux?
Just before we proceed to the steps taken to play .mp3
files with Termux, Its best adviced to actually know which of the folders the mp3 file is located. So lets check where the mp3 file we are going to use is stored.
The audio file we are going to play via Termux comand line is Goodlife.mp3
And it's saved in this directory \Home\SD card\music
Since we've located the file, lets check out the steps.
STEPS
1: Install and launch Termux. Type this command clear
to delete every initial text on the screen.
2: Install mpv
by typing this command pkg install mpv
Mpv is simply a music player.
3: After typing the above command line, while its running, you will be told that some specific amount of disk space will be used. In my case it required 26.2mb. So reply y
to grant it access.
Download in progress.
4: Once it has downloaded successfully, type this command cd /
to set your Termux environment to root storage.
5: Now type ls
to list the available files and folders in the root storage. Then type cd storage
to open storage folder.
6: Now its time to select which of the storage folder our audio file ( goodlife.mp3) is located. since its located in sdcard1 now type cd storage
7: Type ls
to list the available files and folders in the storage folder, Then type cd sdcard1
to open sdcard1 folder.
8: Type ls
to list the available files and folders in the sdcard folder, Now type cd music
to access the music folder. Because we saved our audio file in there.
9: This is the final stage. Type ls
to list the files in the music folder as usual. After i typed it, i was able to see our mp3 file Goodlife.mp3. To play this file, we have to call the mpv we downloaded at the beginning of this tutorial to play the audio file by typing mpv goodlife.mp3
10: The audio file should start playing after that command.
Curriculum
This is the first tutorial i'm contributing using Ternmux.
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
mmmh, i won't talk, i will keep shut. ☺
Hey @rufans I am @utopian-io. I have just upvoted you!
Achievements
Suggestions
Get Noticed!
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x