![A user video conferences via tablet. [teleconference / online meeting / digital event]](https://images.idgesg.net/images/article/2020/09/user_video_conferencing_via_tablet_teleconference_online_meeting_digital_event_participant_by_alvarez_gettyimages-1218764252_2400x1600-100858484-large.jpg)
Who would have imagined that there’s a Linux tool available for downloading YouTube videos? Well, there is and it works for Linux as well as for other operating systems. So, if you need to watch some of the available videos even when your internet connection is flaky or you need to be offline for a while, this tool can be especially handy.
The tool for downloading videos is called youtube-dl. (The “dl” portion undoubtedly means “download”.) It’s very easy to use and drops webm or mp4 files onto your system. Both formats provide compressed, high-quality video files that you can watch whenever you like.
The youtube-dl tool is a Python-based command-line tool. On Linux, it requires Python (2.6, 2.7, or 3.2+). The command to install it on Ubuntu and related systems is:
Once installed, you can use a command like this to download a video after selecting the URL from YouTube or some other source:
Here is an example that can serve as a quick test:
After you successfully run the test you can try downloading a video of your own choosing. Depending on the size of the file, the download might take a couple of minutes or longer. If you watch the screen, you’ll see updates on the expected time remaining.
Once a video is downloaded, you can play it by double-clicking on the icon in your file manager or you can kick it off on the command line using totem. Totem is a GNOME desktop movie player based on GStreamer and likely already on your system.
Note that youtube-dl works not just for youtube videos, but videos from many sources. A very short Crazy Frog mp4 video could be downloaded with a command like this one. Notice that this short download only took eight seconds.
While downloaded videos can prove very useful, you should probably be wary of potential legal issues should you go beyond the most modest use of them. You must be careful to avoid copying, reproducing, distributing, transmitting, broadcasting, displaying, selling, licensing, or otherwise exploiting any content without the prior written consent of the owner(s). These constraints are fairly typical, though some videos may not involve copyrights or legal restrictions.
No comments :
Post a Comment