I’m a music lover and I’m usually listen to music on youtube.com.
However, I have a problem with Youtube that is I want to listen to music on my phone without open Youtube app, I don’t want to see the video at all, just music.
=> Youtube doesn’t allow this, so that I can not find any app on Play Store to download and listen to music.
Although there are some apps on the internet would allow me to break Youtube’s prohibit, but it’s not on the store therefore I can’t trust these apps.
Luckily, I have found 1 solution that allow me to download youtube videos as audios only and also totally safe for my phone.
Easy install step by step:
- First of all, you would need to download an app that allow to write and run command as linux terminal directly on your phone. It’s termux app, you can found it on the play store.
- Next: download this script file: https://drive.google.com/file/d/1S5-vrYQ1XDpYzK-D2PWOklSPQMIVjA4m/view?usp=sharing
- Then run downloaded script by:
- Open the termux app
- Type command: sh storage/downloads/ytdownload.sh
- If you see the message “INSTALL FINISHED” then you’re done.
- Open Youtube app on your phone => select a video or an album (multiple videos) => select share option => browse and choose termux app => waiting for the video downloaded and convert to mp3 => Convert done, press ENTER to exit termux.
Deep in tech:
I have used 2 open source libraries:
- youtube-dl: this is for download video from youtube and convert the video to audio
- ffmpeg: this is for convert video to mp3 format
All done, have fun with your music.