Skip to content

he2a/av-dl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 

Repository files navigation

av-dl - A Simple Audio/Video Downloader Script

av-dl screenshot

Overview

Small script to download audio or video off youtube as well as other sites supported by yt-dlp. Made for use in WSL environment in windows, but should work in any linux distro (including termux in android) without any problem.

Features

This script has two basic behaviours for different content.

  • For video, downloads the best possible quality available and embeds subtitle if possible.
  • For audio, selectively downloads the best possible audio stream, either generates its own cover art or crops the thumbnail to 1:1 ratio while trimming any black bars, then embeds it in V0 MP3 output.
  • All features are customizable using the script settings.

Requirement

  • yt-dlp for downloading video/audio.
  • ffmpeg for media conversion.

Installation

Make sure you have yt-dlp and ffmpeg already installed and updated. Clone this repo using git clone https://github.com/he2a/av-dl av-dl. Inside you will find av-dl.sh file. Run chmod +x av-dl.sh inside the directory to make it executable. Now, open the script using your text editor and change the download path to your choice and you are ready to use it.

Settings

# Set output path for music.
music=~/storage/music

# Set output path for video.
video=~/storage/movies

# Number of retry attempts.
attempt=3

# Force default choice of download. Set to 'audio' for audio / 'video' for video / blank for manual choice.
defchoice=

# Set true to embed cover for audio download.
embedcover=true

# Set true to use thumbnail as cover for audio download or false to use default cover.
coverthumb=true

# Set true to autotrim youtube thumbnail to square for audio download.
autotrimthumb=true

# Set true to detect black bars in youtube thumbnail.
smartcrop=true

# Set true to embed subtitles for video download.
embedsubs=true

# Set true to embed auto translated subtitles for youtube videos.
autosubs=true

# Set false to show a text instead of logo.
showlogo=true

# Set true to speed up output but without fancy logo.
fastout=false

# Set true to enable verbose mode mainly for debugging the script.
verbose=false

About

A simple bash script to download audio or video off youtube or other sources.

Topics

Resources

License

Stars

Watchers

Forks

Languages