Gangmax Blog

自由之思想,独立之精神

A Video Downloader: You-get

| Comments

You-Get is a tiny command-line utility to download media contents (videos, audios, images) from the Web, in case there is no other handy way to do it. From here. And, it’s written in Python.

Download YouTube video

1
2
3
4
5
6
7
8
9
10
11
# 1. Make sure you installed "ffmpeg" and "Python3".
apt-cache policy ffmpeg
# 2. Install.
pip install you-get
# 3. see all available quality and formats:
you-get -i 'https://www.youtube.com/watch?v=2_feqHI5n1g'
# 4. Download by default.
you-get 'https://www.youtube.com/watch?v=2_feqHI5n1g'
# 5. Download specific format/quality(the itag value is gotten
# from the output of the "you-get -i [URL]" command):
you-get --itag=247 'https://www.youtube.com/watch?v=2_feqHI5n1g'

A full list of the supported website by “you-get” can be found from here.

Get mp3 Audio from mp4 file

From here.

1
ffmpeg -i foo.mp4 bar.mp3

Play the mp3 file via command line

From here and here.

1
2
3
4
5
6
7
8
# On Linux.
sudo apt-get install mpg123
mpg123 bar.mp3

# On MacOS.
afplay bar.mp3
# If you want to stop before it's over, run:
killall afplay

Comments