Skip to content

How to download audio from Youtube on Android

Hello friends,

I’m a music lover and I’m usually listen to music on

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:
  • Then run downloaded script by:
    • Open the termux app
    • Run command to enable tumux using storage:
    • Run command to setup remaining things: sh storage/downloads/
    • 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.

Published inInterestingLinuxProgramming

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *