how to download youtube video from command line

C++
# This will get the latest version. Also, if you use a different
# pip for a specific version of Python (such as pip3.9), be sure to 
# use that one instead.
pip install youtube-dl

# Basic Usage:
youtube-dl <Video URL>
Source

Also in C++: