summaryrefslogtreecommitdiff
path: root/README.md
blob: c44ec97559397f26c0d5639e60d347bdc55400fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# EZown
Build your own digital library.

## Supported Features
- Search videos on **YouTube**, **Odysee** & **PeerTube**.
- Search BitTorrent supported files on **1337x**.
- Search & preview wallpapers on **Wallhaven**.

---

After acquiring a link from the clipboard, by search or the search history you may choose what to do with this link:
- You may choose to **play** or **record** the video/stream using **mpv**.
- You may choose to **clip** the remote video with **FFmpeg**.
- You may choose to **download** the video with **audio** or **video** format using **yt-dlp**.
- You may choose to **torrent** the file using **qBitTorrent**.

---

Once you've downloaded the media files to your offline digital library you can:
- Easily search & open the offline files in the preferred applications.
- Select multiple video files to all be put in a playlist using **mpv**.
- Easily edit both videos & images for tedious tasks using **FFmpeg** & **ImageMagick**:
    - **Strip**, **transcode**, **scale** & **clip** videos using **FFmpeg**.
    - **Extract** & **insert** the chapter metadata file & **split** the video on chapters using **FFmpeg**.
    - **Strip**, **convert format**, **resize**, **trim transparency** & **apply border-radius** using **ImageMagick**.

Workflow specific automation of tasks:
- Easily access a start menu for installed programs.
- Easily search & end processes running on your computer.
- Easily perform system actions, like restarting your computer.

## Dependencies
- dmenu
- sxiv
- mpv
- ffmpeg
- imagemagick
- exiftool
- xclip
- jq
- qbittorrent

#### Recommendation
To create comfortable mpv settings. The command below creates a mpv.conf file that limits the quality of streamed videos to 1080p & always creates a 1440x810 mpv window. This might be good enough, but for the specific settings I use, it's available [here](https://git.exaltedelite.club/mpv-settings).

    mkdir -p ~/.config/mpv && echo -e "ytdl-format='bestvideo[height<=1080]+bestaudio/best[height<=1080]'\ngeometry='1440x810'" > ~/.config/mpv/mpv.conf

All the scripts do require relative file paths to work, except for lcl-start & lcl-kill. Below is an example of how a keybind command might look like.

    sh -c 'cd ~/Desktop/EZown && ./rmt-search'

## Usage
- ./rmt-action [Clipboard Link]
    - **Param Nº1:** Skip dmenu Nº1 (./rmt-action 'Play')
    - **Param Nº2:** Skip clipboard link (./rmt-action 'Play' 'https://invidious.flokinet.to/watch?v=AhZqOYu5BOw')
- ./rmt-search [Acquire Link & Forward To ./rmt-action]
    - **Param Nº1:** Skip dmenu Nº1 (./rmt-search '1337x')
    - **Param Nº2:** Skip dmenu Nº2 (./rmt-search '1337x' 'Collateral 2004')
    - **Param Nº3:** Skip dmenu Nº4 (./rmt-search '1337x' 'Collateral 2004' 'Torrent')
- ./rmt-history [Link History & Forward To ./rmt-action]
    - **Param Nº1:** Skip dmenu Nº1 (./rmt-history 'Record')

---

- ./lcl-find [Local File Search]
- ./lcl-playlist [Multiple File Search]
- ./lcl-edit [Edit Video/Image]
    - **Param Nº1:** Skip dmenu Nº1 (./lcl-edit '[Video]Strip')

---

- ./lcl-start [Start Menu]
- ./lcl-kill [Kill Local Process]
- ./lcl-system [Perform System Action]
    - **Param Nº1:** Skip dmenu Nº1 (./lcl-system 'Shutdown')

## Usage Flow
By default, rmt-action uses links stored in the clipboard when used. But rmt-search & rmt-history can be used to discover links. When using rmt-search without a correctly chosen item from the dmenu list, will automatically search YouTube. Therefore you can skip param Nº1 if you're searching YouTube. The command ./rmt-search 'YouTube' 'BugsWriter' 'Play' could be shortened to ./rmt-search 'BugsWriter' 'Play'. But in case you would search Odysee for example, you would explicitly have to specify the platform (./rmt-search 'Odysee' 'BugsWriter' 'Play').

- You could for example bind Shift+Ctrl+P to play copied video links automatically with the ./rmt-action 'Play' command.
- You could for example bind Shift+Ctrl+B to search local files with the ./lcl-find command.
- You could for example bind Shift+Ctrl+O to perform an action with the ./rmt-action command.
- You could for example bind Super+R to search PeerTube videos with the ./rmt-search 'PeerTube' command.

*This should help you get started & better understand the flow of the program.*

#### RSS
This script may act as another key to the puzzle of unfiltered interactions when used in combination with your RSS feed & its links.

#### Sane Defaults
- yt-dlp downloads in the .mp4 format & has a max quality of 1080p.
- Notifications are shown upon errors & not upon appropriate behaviour.
- Magnet links are opened with qBitTorrent & may easily be modified in lib/action/Torrent.
- You may easily change the default downloads directory & Invidious instance, in util/dpath & lib/search/YouTube.
- You may modify the "find" command within the different scripts, it looks for files in ~/Desktop & ~/Downloads.
- ext/ytfzf & ext/waldl are slightly modified, search for "MODIFIED" in these files to see the changes.

## Why
You may never use these services, but a lot of good content is hosted on them created by good people, as discovery & revenue is easier than supplying independent content with your own digital infrastructure. But this dependence on a third-party service platform limits interactions with the hosted files. For security reasons- fearing abuse, legal reasons- fearing to support piracy on their platforms or business incentives that may not be inline with your values or use of the platform. One thing generally appreciated is the ability to store digital media offline, you might be going away on a trip without reliable internet or fear the site may not share your enthusiasm for the files being uploaded to their services. But this is made difficult & when available, is most always provided in a janky format that may not be very robust or censorship resistant. Streaming in its essence is interesting when you consider how it works, you stream files to your computer, but you're never supposed to download them to file, fearing you'll not need their services anymore, not use their platform as much or concerns around piracy of copyrighted material. To battle this, these services apply digital rights management or DRM making it as difficult as possible for you to regain this control of ownership of the files you stream to view.

Without the proper knowledge of the great projects, run by good people that create specific software to bypass these restrictions, will supply most people with a grave challenge. I've therefore composed a collection of scripts that make this process easier, gathering & gluing together some extremely powerful programs & scripts, configuring them to work easily bound to keys, searching for links, downloading the material contained within these links & maintaining a local history of these links. After downloading your own files, there are scripts to locate these files & play them offline instead. This is all possible by scraping these sites & bypassing restrictions. Avoiding even the need to open these sites & therefore avoiding the need for accounts, monthly subscriptions, identity verification, excessive bandwidth usage, ads & tracking.

In the past more people may have served content by their own distribution, but centralization makes things easy, & less technical people are attracted to create & distribute their works on platforms that are seemingly becoming more & more restrictive over time, with their increased size, nurtured dependence of their services & larger impact on peoples daily lives. These services & a lot of the major technology platforms are changing with the times of the world, moving their services into an ever more controlled & predictable environment for them over their users.

Building your own digital library is easier than ever before, the tools are there for you to use. It will minimize the dependence on these services, provide more flexibility how these files are used or shared, whether it is online or offline & regaining the control & subsequent power that was given up for the convenience these now very large services provide.

## Credits
- https://github.com/Bugswriter/notflix
- https://github.com/pystardust/ytfzf
- https://github.com/pystardust/waldl
- https://odysee.com/@bugswriter:8/stream-any-movie-show-in-5-sec.-rip:9
- https://odysee.com/@bugswriter:8/dmenu-is-killing-my-programs-and-it-s:8
- https://odysee.com/@bugswriter:8/download-wallhaven-wallpapers-with-waldl:8