Crates.io | yt-mirror |
lib.rs | yt-mirror |
version | 1.0.1 |
source | src |
created_at | 2023-02-26 22:30:28.139604 |
updated_at | 2023-02-26 22:30:28.139604 |
description | Loads browser bookmarks, and downloads all youtube videos converting them to music files |
homepage | |
repository | https://github.com/team-borygo/yt-mirror |
max_upload_size | |
id | 795525 |
size | 88,122 |
Do you use YouTube to listen to music, and you save it in bookmarks? I do. It would be cool to have all this music on your local PC as a backup or just offline access, wouldn't it?
yt-mirror
parses your browser bookmarks, looks for YouTube URLs, downloads movies, and converts them to a music file.
It runs incrementally, so you can synchronize videos as they are added up - only new bookmarks will be downloaded.
This tool is still in active development
Currently it works only on Linux (dependency on mv
command - for Windows change mv
to move
in Downloader.hs
).
Download binary from GitHub Release page or build from source using Cabal.
Start by preparing bookmarks to synchronize (places.sqlite
is treated as Firefox bookmarks, Bookmarks[.json]
is treated as Chromium-alike bookmarks):
yt-mirror prepare -p ./process.sqlite -b ./places.sqlite
Then run synchronization:
yt-mirror synchronize -p ./process.sqlite -t ~/music/synchronized --tmp /tmp
(you can quit synchronization pretty display by pressing CTRL+C or ESC - it may quit after a short while)
--tmp
defaults to /tmp
and describes where youtube-dl
temporary files will be stored.
To show failed synchronizations:
yt-mirror failed -p ./process.sqlite [-s/--short]
-s
/--short
prints only failed YouTube ids without any decorations
Because prepare
step is separated, and videos to synchronize are stored with video id, you can use multiple sources of bookmarks to prepare, just by
running prepare
step multiple times. For example to synchronize bookmarks from Firefox and Chrome:
yt-mirror prepare -p ./process.sqlite -b [...]/places.sqlite
yt-mirror prepare -p ./process.sqlite -b [...]/Bookmarks
Using --filter
user can utilise full power of youtube-dl --match-filter.
It is useful to skip some videos, like those annoying 10h music videos that are sometimes added to bookmarks.
If video is filtered its process will be marked as "skipped".
Example - to download only videos with duration lower than 1000s:
yt-mirror synchronize -p ./process.sqlite -t ~/music/synchronized --filter "duration < 1000"
. | Linux | Windows |
---|---|---|
Firefox | ~/.mozilla/firefox/*/places.sqlite |
%appdata%\Mozilla\Firefox\Profiles\*\places.sqlite |
Chrome | ~/.config/google-chrome/Default/Bookmarks |
%appdata%\..\Local\Google\Chrome\User Data\Default\Bookmarks |
Chromium | ~/.config/chromium/Default/Bookmarks |
? |
Brave | ~/.config/BraveSoftware/Brave-Browser/Default/Bookmarks |
? |