gamdl
A Python CLI app for downloading Apple Music songs, music videos and post videos.
Top Related Projects
A feature-rich command-line audio/video downloader
Command-line program to download videos from YouTube.com and other video sites
A libre lightweight streaming front-end for Android.
yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
Web GUI for youtube-dl
Quick Overview
GAMDL (GitHub Actions Markdown Link) is a GitHub Action that automatically updates markdown links in your repository. It scans your markdown files for broken links, updates them if possible, and creates a pull request with the changes. This tool helps maintain the integrity of documentation and README files in GitHub repositories.
Pros
- Automatically detects and fixes broken links in markdown files
- Creates pull requests for easy review and merging of changes
- Customizable through various input parameters
- Supports both relative and absolute links
Cons
- May require additional configuration for complex repository structures
- Could potentially create unnecessary pull requests for temporary link issues
- Limited to GitHub-hosted repositories
- Might not handle all types of markdown link formats
Getting Started
To use GAMDL in your GitHub repository, add the following workflow file to your .github/workflows
directory:
name: Update Markdown Links
on:
schedule:
- cron: '0 0 * * 0' # Run weekly
workflow_dispatch: # Allow manual triggering
jobs:
update-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update Markdown Links
uses: glomatico/gamdl@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
This workflow will run weekly and can also be triggered manually. Customize the cron
schedule and other input parameters as needed for your project.
Competitor Comparisons
A feature-rich command-line audio/video downloader
Pros of yt-dlp
- More comprehensive support for various video platforms and formats
- Actively maintained with frequent updates and bug fixes
- Extensive documentation and community support
Cons of yt-dlp
- Larger codebase and potentially more complex to use
- May have more dependencies and system requirements
Code Comparison
yt-dlp:
from yt_dlp import YoutubeDL
ydl_opts = {}
with YoutubeDL(ydl_opts) as ydl:
ydl.download(['https://www.youtube.com/watch?v=dQw4w9WgXcQ'])
gamdl:
import gamdl
gamdl.download('https://www.youtube.com/watch?v=dQw4w9WgXcQ')
yt-dlp offers more configuration options and flexibility, while gamdl provides a simpler interface for basic downloading tasks. yt-dlp's extensive feature set and active development make it suitable for more complex use cases, whereas gamdl might be preferable for users seeking a lightweight solution with minimal setup.
Command-line program to download videos from YouTube.com and other video sites
Pros of youtube-dl
- Extensive support for a wide range of websites and platforms
- Well-established project with a large community and frequent updates
- Robust features including playlist downloading and format selection
Cons of youtube-dl
- Written in Python, which may be slower than Go for some operations
- More complex installation process, especially on Windows
- Larger codebase, potentially making it harder to maintain or contribute to
Code Comparison
youtube-dl (Python):
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
title = self._html_search_regex(r'<title>([^<]+)</title>', webpage, 'title')
return {'id': video_id, 'title': title, 'url': url}
gamdl (Go):
func (e *Extractor) Extract(url string) (*Video, error) {
id := e.extractID(url)
page, err := e.fetchPage(url)
if err != nil {
return nil, err
}
title := e.extractTitle(page)
return &Video{ID: id, Title: title, URL: url}, nil
}
The code comparison shows that both projects follow similar patterns for extracting video information, but gamdl's Go implementation may be more concise and potentially faster. However, youtube-dl's Python code might be more accessible to a wider range of contributors due to Python's popularity.
A libre lightweight streaming front-end for Android.
Pros of NewPipe
- More comprehensive feature set, including background playback and downloads
- Larger community and more active development
- Better UI/UX with a polished, native Android look and feel
Cons of NewPipe
- Larger app size due to more features and dependencies
- May be overwhelming for users who only need basic YouTube functionality
- Requires more frequent updates to maintain compatibility with YouTube changes
Code Comparison
NewPipe (Java):
@Override
protected void onCreateMainFragment() {
if (getIntent().hasExtra(Constants.KEY_OPEN_SEARCH)) {
addFragment(new SearchFragment());
} else {
addFragment(new MainFragment());
}
}
gamdl (Python):
def download_video(url, output_path):
ydl_opts = {
'outtmpl': output_path,
'format': 'bestaudio/best',
'postprocessors': [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '192',
}],
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download([url])
NewPipe is a full-featured YouTube client for Android, while gamdl is a simpler command-line tool for downloading YouTube videos. NewPipe offers a richer user experience but comes with a larger footprint, whereas gamdl is more lightweight and focused on a single task.
yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
Pros of yewtube
- More mature project with a larger community and longer development history
- Offers a text-based interface for browsing and playing YouTube content
- Supports playlists and user subscriptions
Cons of yewtube
- Limited to YouTube content only
- Requires more system resources due to its broader feature set
- Less focused on audio-only downloads compared to gamdl
Code comparison
yewtube:
def play_audio(vid, seek=None, repeat=False, override=False):
""" Play audio. Return status of play. """
if not override:
if g.preload_disabled:
screen.writestatus("preload disabled")
else:
preload(vid, audio=True)
return _play(vid, seek=seek, repeat=repeat, audio=True)
gamdl:
def download_audio(url, output_dir):
ydl_opts = {
'format': 'bestaudio/best',
'postprocessors': [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '192',
}],
'outtmpl': os.path.join(output_dir, '%(title)s.%(ext)s'),
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download([url])
Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
Pros of spotify-downloader
- More mature project with a larger community and more frequent updates
- Supports downloading entire playlists and albums in addition to individual tracks
- Offers a web UI option for easier use by non-technical users
Cons of spotify-downloader
- Slower download speeds compared to gamdl
- Requires more dependencies and has a more complex setup process
- Limited to Spotify as the sole music source
Code Comparison
spotify-downloader:
from spotdl import Spotdl
spotdl = Spotdl(client_id="your_client_id", client_secret="your_client_secret")
songs = spotdl.search(["song_name"])
spotdl.download_songs(songs)
gamdl:
from gamdl import Downloader
downloader = Downloader()
downloader.download("song_name")
The code comparison shows that gamdl has a simpler API and requires less setup, while spotify-downloader offers more flexibility in searching and downloading multiple songs at once.
Both projects aim to provide easy access to music downloads, but they differ in their approach and feature set. spotify-downloader focuses exclusively on Spotify and offers more comprehensive playlist and album support, while gamdl is designed for simplicity and faster downloads across multiple platforms.
Web GUI for youtube-dl
Pros of AllTube
- More comprehensive web interface for video downloading
- Supports a wider range of video hosting platforms
- Better documentation and user guides
Cons of AllTube
- Larger codebase, potentially more complex to maintain
- Requires a web server to run, less portable than GAMDL
- May have higher resource requirements due to web interface
Code Comparison
AllTube (PHP):
public function getVideo(string $url, string $format = null, string $password = null, string $username = null)
{
$video = new Video($url, $format, $password, $username);
$video->getJson();
return $video;
}
GAMDL (Python):
def download_video(url, output_path=None):
ydl_opts = {'outtmpl': output_path or '%(title)s.%(ext)s'}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download([url])
The code snippets show different approaches: AllTube uses a Video class for handling downloads, while GAMDL directly utilizes youtube-dl for a more straightforward download process. AllTube's approach allows for more flexibility in handling various video sources, while GAMDL's implementation is simpler and more focused on YouTube downloads.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Glomaticoâs Apple Music Downloader
A Python CLI app for downloading Apple Music songs, music videos and post videos.
Join our Discord Server: https://discord.gg/aBjMEZ9tnq
Features
- High-Quality Songs: Download songs in AAC 256kbps and other codecs.
- High-Quality Music Videos: Download music videos in resolutions up to 4K.
- Synced Lyrics: Download synced lyrics in LRC, SRT, or TTML formats.
- Artist Support: Download all albums or music videos from an artist using their link.
- Highly Customizable: Extensive configuration options for advanced users.
Prerequisites
- Python 3.9 or higher installed on your system.
- The cookies file of your Apple Music browser session in Netscape format (requires an active subscription).
- Firefox: Use the Export Cookies extension.
- Chromium-based Browsers: Use the Open Cookies.txt extension.
- FFmpeg on your system PATH.
- Windows: Download from AnimMouseâs FFmpeg Builds.
- Linux: Download from John Van Sickleâs FFmpeg Builds.
Optional dependencies
The following tools are optional but required for specific features. Add them to your systemâs PATH or specify their paths using command-line arguments or the config file.
- mp4decrypt: Required for
mp4box
remux mode, music video downloads, and experimental song codecs. - MP4Box: Required for
mp4box
remux mode. - N_m3u8DL-RE: Required for
nm3u8dlre
download mode.
Installation
- Install the package
gamdl
using pippip install gamdl
- Set up the cookies file.
- Move the cookies file to the directory where youâll run Gamdl and rename it to
cookies.txt
. - Alternatively, specify the path to the cookies file using command-line arguments or the config file.
- Move the cookies file to the directory where youâll run Gamdl and rename it to
Usage
Run Gamdl with the following command:
gamdl [OPTIONS] URLS...
Supported URL types
- Song
- Album
- Playlist
- Music video
- Artist
- Post video
Examples
- Download a Song:
gamdl "https://music.apple.com/us/album/never-gonna-give-you-up-2022-remaster/1624945511?i=1624945512"
- Download an Album:
gamdl "https://music.apple.com/us/album/whenever-you-need-somebody-2022-remaster/1624945511"
- Download from an Artist:
gamdl "https://music.apple.com/us/artist/rick-astley/669771"
Interactive prompt controls
- Arrow keys: Move selection
- Space: Toggle selection
- Ctrl + A: Select all
- Enter: Confirm selection
Configuration
Gamdl can be configured by using the command-line arguments or the config file.
The config file is created automatically when you run Gamdl for the first time at ~/.gamdl/config.json
on Linux and %USERPROFILE%\.gamdl\config.json
on Windows.
Config file values can be overridden using command-line arguments.
Command-line argument / Config file key | Description | Default value |
---|---|---|
--disable-music-video-skip / disable_music_video_skip | Don't skip downloading music videos in albums/playlists. | false |
--save-cover , -s / save_cover | Save cover as a separate file. | false |
--overwrite / overwrite | Overwrite existing files. | false |
--read-urls-as-txt , -r / - | Interpret URLs as paths to text files containing URLs separated by newlines. | false |
--save-playlist / save_playlist | Save a M3U8 playlist file when downloading a playlist. | false |
--synced-lyrics-only / synced_lyrics_only | Download only the synced lyrics. | false |
--no-synced-lyrics / no_synced_lyrics | Don't download the synced lyrics. | false |
--config-path / - | Path to config file. | <home>/.gamdl/config.json |
--log-level / log_level | Log level. | INFO |
--no-exceptions / no_exceptions | Don't print exceptions. | false |
--cookies-path , -c / cookies_path | Path to .txt cookies file. | ./cookies.txt |
--language , -l / language | Metadata language as an ISO-2A language code (don't always work for videos). | en-US |
--output-path , -o / output_path | Path to output directory. | ./Apple Music |
--temp-path / temp_path | Path to temporary directory. | ./temp |
--wvd-path / wvd_path | Path to .wvd file. | null |
--nm3u8dlre-path / nm3u8dlre_path | Path to N_m3u8DL-RE binary. | N_m3u8DL-RE |
--mp4decrypt-path / mp4decrypt_path | Path to mp4decrypt binary. | mp4decrypt |
--ffmpeg-path / ffmpeg_path | Path to FFmpeg binary. | ffmpeg |
--mp4box-path / mp4box_path | Path to MP4Box binary. | MP4Box |
--download-mode / download_mode | Download mode. | ytdlp |
--remux-mode / remux_mode | Remux mode. | ffmpeg |
--cover-format / cover_format | Cover format. | jpg |
--template-folder-album / template_folder_album | Template folder for tracks that are part of an album. | {album_artist}/{album} |
--template-folder-compilation / template_folder_compilation | Template folder for tracks that are part of a compilation album. | Compilations/{album} |
--template-file-single-disc / template_file_single_disc | Template file for the tracks that are part of a single-disc album. | {track:02d} {title} |
--template-file-multi-disc / template_file_multi_disc | Template file for the tracks that are part of a multi-disc album. | {disc}-{track:02d} {title} |
--template-folder-no-album / template_folder_no_album | Template folder for the tracks that are not part of an album. | {artist}/Unknown Album |
--template-file-no-album / template_file_no_album | Template file for the tracks that are not part of an album. | {title} |
--template-file-playlist / template_file_playlist | Template file for the M3U8 playlist. | Playlists/{playlist_title} |
--template-date / template_date | Date tag template. | %Y-%m-%dT%H:%M:%SZ |
--exclude-tags / exclude_tags | Comma-separated tags to exclude. | null |
--cover-size / cover_size | Cover size. | 1200 |
--truncate / truncate | Maximum length of the file/folder names. | null |
--codec-song / codec_song | Song codec. | aac-legacy |
--synced-lyrics-format / synced_lyrics_format | Synced lyrics format. | lrc |
--codec-music-video / codec_music_video | Music video codec. | h264 |
--quality-post / quality_post | Post video quality. | best |
--no-config-file , -n / - | Do not use a config file. | false |
Tags variables
The following variables can be used in the template folders/files and/or in the exclude_tags
list:
album
album_artist
album_id
album_sort
artist
artist_id
artist_sort
comment
compilation
composer
composer_id
composer_sort
copyright
cover
date
disc
disc_total
gapless
genre
genre_id
lyrics
media_type
playlist_artist
playlist_id
playlist_title
playlist_track
rating
storefront
title
title_id
title_sort
track
track_total
xid
Remux Modes
ffmpeg
: Default remuxing mode.mp4box
: Alternative remuxing mode (doesnât convert closed captions in music videos).
Download modes
ytdlp
: Default download mode.nm3u8dlre
: Faster thanytdlp
.
Song Codecs
- Supported Codecs:
aac-legacy
: AAC 256kbps 44.1kHz.aac-he-legacy
: AAC-HE 64kbps 44.1kHz.
- Experimental Codecs (not guaranteed to work due to API limitations):
aac
: AAC 256kbps up to 48kHz.aac-he
: AAC-HE 64kbps up to 48kHz.aac-binaural
: AAC 256kbps binaural.aac-downmix
: AAC 256kbps downmix.aac-he-binaural
: AAC-HE 64kbps binaural.aac-he-downmix
: AAC-HE 64kbps downmix.atmos
: Dolby Atmos 768kbps.ac3
: AC3 640kbps.alac
: ALAC up to 24-bit/192 kHz.ask
: Prompt to choose available audio codec.
Music Videos Codecs
h264
: Up to 1080p with AAC 256kbps.h265
: Up to 2160p with AAC 256kpbs.ask
: Prompt to choose available video and audio codecs.
Post videos/extra videos qualities
best
: Up to 1080p with AAC 256kbps.ask
: Prompt to choose available video quality.
Synced lyrics formats
lrc
: Lightweight and widely supported.srt
: SubRip format (has more accurate timestamps).ttml
: Native Apple Music format (unsupported by most media players).
Cover formats
jpg
: Default format.png
: Lossless format.raw
: Raw cover without processing (requiressave_cover
to save separately).
Top Related Projects
A feature-rich command-line audio/video downloader
Command-line program to download videos from YouTube.com and other video sites
A libre lightweight streaming front-end for Android.
yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
Web GUI for youtube-dl
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot