yt-dlp – a verstatile video downloader tool

yt-dlp is a command-line tool for which allows a user to download audio/video from thousands of sites. The project is a fork of youtube-dl, which is based on the now inactive youtube-dlc.

yt-dlp can be installed using official releases or via package manager.

Unix-like operating system

curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o ~/.local/bin/yt-dlp
chmod a+rx ~/.local/bin/yt-dlp  # Make executable

To update yt-dlp in Unix-like operating system

yt-dlp -U

Homebrew MacOS

brew install yt-dlp

Ubuntu

sudo add-apt-repository ppa:tomtomtom/yt-dlp # Add ppa repo to apt
sudo apt update # Update package list
sudo apt install yt-dlp # Install yt-dlp

Snap

sudo snap install --edge yt-dlp

Windows operating system

yt-dlp is also available for Windows operating system by using, winget:

winget install yt-dlp

Microsoft Windows binary package

The binary package for Microsoft Windows binary package can be downloaded from yt-dlp GitHub release page

Note that yt-dlp requires ffmpeg windows binaries which can be obtained from gyan.dev’s Codex FFMPEG Build

Please refer to this post for more information on the tips and tricks on using yt-dlp.

How to extract Audio from Youtube Flash Video (FLV) in Ubuntu Linux

First you need youtube-dl tool or ‘cclive’ to download the Youtube .FLV file.

Then, download the Youtube stream.
python youtube-dl http://www.youtube.com/watch?v=lee7a55401e

Alternatively, you can use ‘cclive’ to download the youtube stream.
cclive http://www.youtube.com/watch?v=lee7a55401e

After that, use ffmpeg to extract the audio and encode it to MP3
ffmpeg -i lee7a55401e.flv vn -acodec libmp3lame -ab 128000 -ar 44100 lee7a55401e.mp3

Note: You need to install the restricted codecs in order to extract MP3 audio files.

Thanks Mohammad Bahathir Hashim for the tip!

FFMpeg based FLV to 3gp batch converter scripts

A friend from #fakap asks me to create a dead simple FLV to 3gp batch converter for him to port youtube clips to mobile phone.

As a result I complied, and created flvto3gp bash script for the job.

Usage
Using it is simple, just run this script inside a directory full of FLV (or any video files supported by ffmpeg) and execute it using this command :

sh flvto3gp.sh *

The script will convert all video files to 3gp file format one by one. The script requires
ffmpeg in order to run.

Ubuntu users might have to refer to this post before using this utility : Enable mp3 and amr support in ffmpeg ( Ubuntu )

[tags]ubuntu,flv,linux,ffmpeg,open source[/tags]