This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Israel-Lopes
To download music and videos from youtube via command line is very simple.
First we have to install youtube-dl
sudo apt install youtube-dl
If you want to listen to music directly through the terminal, you can also install mplayer
or mvp
.
Once installed, just do:
youtube-dl -x --audio-format mp3 <URL_VIDEO>
To listen to it, you can use mplayer <file_name>
If you want to change the audio directly through the terminal, you can use this macro I made, just add it to your zsh
file
# Muted sound on/off
alias sound_off="amixer -D pulse sset Master mute"
alias sound_on="amixer -D pulse sset Master unmute"
Outras macros:
increase
amixer -D pulse sset Master 20%+
decreases
amixer -D pulse sset Master 20%-
If you prefer, you can use alsamixer
directly as well, as it comes with a text interface.
machine@machine~: alsamixer
If it is necessary to configure the sound card, just press f6 and select it.
after select
This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Israel-Lopes

Israel-Lopes | Sciencx (2022-12-11T23:08:53+00:00) Download videos and music from youtube via command line: youtube-dl. Retrieved from https://www.scien.cx/2022/12/11/download-videos-and-music-from-youtube-via-command-line-youtube-dl/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.