aboutsummaryrefslogtreecommitdiff
path: root/locale/eo/LC_MESSAGES/_articles/2018-12-21-using-youtube-dl-to-manage-youtube-subscriptions.po
blob: 52b5a40aa6d070b2a6cdec119f4eaa5191e70115 (about) (plain) (blame)
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
#
msgid ""
msgstr ""

msgid ""
"title: Using \"youtube-dl\" to manage YouTube subscriptions\n"
"date: 2018-12-21\n"
"layout: post\n"
"lang: en\n"
"ref: using-youtube-dl-to-manage-youtube-subscriptions"
msgstr ""

msgid ""
"I've recently read the "
"[announcement](https://www.reddit.com/r/DataHoarder/comments/9sg8q5/i_built_a_selfhosted_youtube_subscription_manager/)"
" of a very nice [self-hosted YouTube subscription "
"manager](https://github.com/chibicitiberiu/ytsm). I haven't used YouTube's "
"built-in subscriptions for a while now, and haven't missed it at all. When I"
" saw the announcement, I considered writing about the solution I've built on"
" top of [youtube-dl](https://youtube-dl.org/)."
msgstr ""

msgid "Background: the problem with YouTube"
msgstr ""

msgid ""
"In many ways, I agree with [André Staltz's view on data ownership and "
"privacy](https://staltz.com/what-happens-when-you-block-internet-"
"giants.html):"
msgstr ""

msgid ""
"I started with the basic premise that \"I want to be in control of my "
"data\". Sometimes that meant choosing when to interact with an internet "
"giant and how much I feel like revealing to them. Most of times it meant not"
" interacting with them at all. I don't want to let them be in full control "
"of how much they can know about me. I don't want to be in autopilot mode. "
"(...) Which leads us to YouTube. While I was able to find alternatives to "
"Gmail (Fastmail), Calendar (Fastmail), Translate (Yandex Translate), *etc.* "
"YouTube remains as the most indispensable Google-owned web service. It is "
"really really hard to avoid consuming YouTube content. It was probably the "
"smartest startup acquisition ever. My privacy-oriented alternative is to "
"watch YouTube videos through Tor, which is technically feasible but not "
"polite to use the Tor bandwidth for these purposes. I'm still scratching my "
"head with this issue."
msgstr ""

msgid ""
"Even though I don't use most alternative services he mentions, I do watch "
"videos from YouTube. But I also feel uncomfortable logging in to YouTube "
"with a Google account, watching videos, creating playlists and similar "
"things."
msgstr ""

msgid ""
"Using the mobile app is worse: you can't even block ads in there. You're in "
"less control on what you share with YouTube and Google."
msgstr ""

msgid "youtube-dl"
msgstr ""

msgid ""
"youtube-dl is a command-line tool for downloading videos, from YouTube and "
"[many other sites](https://rg3.github.io/youtube-dl/supportedsites.html):"
msgstr ""

msgid ""
"It can be used to download individual videos as showed above, but it also "
"has some interesting flags that we can use:"
msgstr ""

msgid ""
"`--output`: use a custom template to create the name of the downloaded file;"
msgstr ""

msgid ""
"`--download-archive`: use a text file for recording and remembering which "
"videos were already downloaded;"
msgstr ""

msgid ""
"`--prefer-free-formats`: prefer free video formats, like `webm`, `ogv` and "
"Matroska `mkv`;"
msgstr ""

msgid ""
"`--playlist-end`: how many videos to download from a \"playlist\" (a "
"channel, a user or an actual playlist);"
msgstr ""

msgid ""
"`--write-description`: write the video description to a `.description` file,"
" useful for accessing links and extra content."
msgstr ""

msgid "Putting it all together:"
msgstr ""

msgid ""
"This will download the latest 20 videos from the selected channel, and write"
" down the video IDs in the `youtube-dl-seen.conf` file. Running it "
"immediately after one more time won't have any effect."
msgstr ""

msgid ""
"If the channel posts one more video, running the same command again will "
"download only the last video, since the other 19 were already downloaded."
msgstr ""

msgid ""
"With this basic setup you have a minimal subscription system at work, and "
"you can create some functions to help you manage that:"
msgstr ""

msgid ""
"With these functions, you now can have a subscription fetching script to "
"download the latest videos from your favorite channels:"
msgstr ""

msgid ""
"Now, whenever you want to watch the latest videos, just run the above script"
" and you'll get all of them in your local machine."
msgstr ""

msgid "Tradeoffs"
msgstr ""

msgid "I've made it for myself, with my use case in mind"
msgstr ""

msgid "Offline"
msgstr ""

msgid ""
"My internet speed it somewhat reasonable[^internet-speed], but it is really "
"unstable. Either at work or at home, it's not uncommon to loose internet "
"access for 2 minutes 3~5 times every day, and stay completely offline for a "
"couple of hours once every week."
msgstr ""

msgid ""
"Working through the hassle of keeping a playlist on disk has payed off many,"
" many times. Sometimes I even not notice when the connection drops for some "
"minutes, because I'm watching a video and working on some document, all on "
"my local computer."
msgstr ""

msgid ""
"There's also no quality adjustment for YouTube's web player, I always pick "
"the higher quality and it doesn't change during the video. For some types of"
" content, like a podcast with some tiny visual resources, this doesn't "
"change much. For other types of content, like a keynote presentation with "
"text written on the slides, watching on 144p isn't really an option."
msgstr ""

msgid ""
"If the internet connection drops during the video download, youtube-dl will "
"resume from where it stopped."
msgstr ""

msgid ""
"This is an offline first benefit that I really like, and works well for me."
msgstr ""

msgid "Sync the \"seen\" file"
msgstr ""

msgid ""
"I already have a running instance of Nextcloud, so just dumping the "
"`youtube-dl-seen.conf` file inside Nextcloud was a no-brainer."
msgstr ""

msgid ""
"You could try putting it in a dedicated git repository, and wrap the script "
"with an autocommit after every run. If you ever had a merge conflict, you'd "
"simply accept all changes and then run:"
msgstr ""

msgid "to tidy up the file."
msgstr ""

msgid "Doesn't work on mobile"
msgstr ""

msgid ""
"My primary device that I use everyday is my laptop, not my phone. It works "
"well for me this way."
msgstr ""

msgid ""
"Also, it's harder to add ad-blockers to mobile phones, and most mobile "
"software still depends on Google's and Apple's blessing."
msgstr ""

msgid ""
"If you wish, you can sync the videos to the SD card periodically, but that's"
" a bit of extra manual work."
msgstr ""

msgid "The Good"
msgstr ""

msgid "Better privacy"
msgstr ""

msgid ""
"We don't even have to configure the ad-blocker to keep ads and trackers "
"away!"
msgstr ""

msgid ""
"YouTube still has your IP address, so using a VPN is always a good idea. "
"However, a timing analysis would be able to identify you (considering the "
"current implementation)."
msgstr ""

msgid "No need to self-host"
msgstr ""

msgid "There's no host that needs maintenance. Everything runs locally."
msgstr ""

msgid ""
"As long as you keep youtube-dl itself up to date and sync your \"seen\" "
"file, there's little extra work to do."
msgstr ""

msgid "Track your subscriptions with git"
msgstr ""

msgid ""
"After creating a `subscriptions.sh` executable that downloads all the "
"videos, you can add it to git and use it to track metadata about your "
"subscriptions."
msgstr ""

msgid "The Bad"
msgstr ""

msgid "Maximum playlist size is your disk size"
msgstr ""

msgid ""
"This is a good thing for getting a realistic view on your actual \"watch "
"later\" list. However I've run out of disk space many times, and now I need "
"to be more aware of how much is left."
msgstr ""

msgid "The Ugly"
msgstr ""

msgid ""
"We can only avoid all the bad parts of YouTube with youtube-dl as long as "
"YouTube keeps the videos public and programmatically accessible. If YouTube "
"ever blocks that we'd loose the ability to consume content this way, but "
"also loose confidence on considering YouTube a healthy repository of videos "
"on the internet."
msgstr ""

msgid "Going beyond"
msgstr ""

msgid ""
"Since you're running everything locally, here are some possibilities to be "
"explored:"
msgstr ""

msgid "A playlist that is too long for being downloaded all at once"
msgstr ""

msgid ""
"You can wrap the `download_playlist` function (let's call the wrapper "
"`inc_download`) and instead of passing it a fixed number to the `--playlist-"
"end` parameter, you can store the `$n` in a folder (something like "
"`$HOME/.yt-db/$PLAYLIST_ID`) and increment it by `$step` every time you run "
"`inc_download`."
msgstr ""

msgid ""
"This way you can incrementally download videos from a huge playlist without "
"filling your disk with gigabytes of content all at once."
msgstr ""

msgid "Multiple computer scenario"
msgstr ""

msgid ""
"The `download_playlist` function could be aware of the specific machine that"
" it is running on and apply specific policies depending on the machine: "
"always download everything; only download videos that aren't present "
"anywhere else; *etc.*"
msgstr ""

msgid "Conclusion"
msgstr ""

msgid ""
"youtube-dl is a great tool to keep at hand. It covers a really large range "
"of video websites and works robustly."
msgstr ""

msgid ""
"Feel free to copy and modify this code, and [send me](mailto:{{ "
"site.author.email }}) suggestions of improvements or related content."
msgstr ""

msgid "*Edit*"
msgstr ""

msgid "2019/05/22: Fix spelling."
msgstr ""

msgid ""
"[^internet-speed]: Considering how expensive it is and the many ways it "
"could be better, but also how much it has improved over the last years, I "
"say it's reasonable."
msgstr ""

msgid ""
"$ youtube-dl https://www.youtube.com/watch?v=rnMYZnY3uLA\n"
"[youtube] rnMYZnY3uLA: Downloading webpage\n"
"[youtube] rnMYZnY3uLA: Downloading video info webpage\n"
"[download] Destination: A Origem da Vida _ Nerdologia-rnMYZnY3uLA.mp4\n"
"[download] 100% of 32.11MiB in 00:12\n"
msgstr ""

msgid ""
"$ youtube-dl \"https://www.youtube.com/channel/UClu474HMt895mVxZdlIHXEA\" \\\n"
"             --download-archive ~/Nextcloud/cache/youtube-dl-seen.conf \\\n"
"             --prefer-free-formats \\\n"
"             --playlist-end 20 \\\n"
"             --write-description \\\n"
"             --output \"~/Downloads/yt-dl/%(uploader)s/%(upload_date)s - %(title)s.%(ext)s\"\n"
msgstr ""

msgid ""
"#!/bin/sh\n"
"\n"
"export DEFAULT_PLAYLIST_END=15\n"
"\n"
"download() {\n"
"  youtube-dl \"$1\" \\\n"
"             --download-archive ~/Nextcloud/cache/youtube-dl-seen.conf \\\n"
"             --prefer-free-formats \\\n"
"             --playlist-end $2 \\\n"
"             --write-description \\\n"
"             --output \"~/Downloads/yt-dl/%(uploader)s/%(upload_date)s - %(title)s.%(ext)s\"\n"
"}\n"
"export -f download\n"
"\n"
"\n"
"download_user() {\n"
"  download \"https://www.youtube.com/user/$1\" ${2-$DEFAULT_PLAYLIST_END}\n"
"}\n"
"export -f download_user\n"
"\n"
"\n"
"download_channel() {\n"
"  download \"https://www.youtube.com/channel/$1\" ${2-$DEFAULT_PLAYLIST_END}\n"
"}\n"
"export -f download_channel\n"
"\n"
"\n"
"download_playlist() {\n"
"  download \"https://www.youtube.com/playlist?list=$1\" ${2-$DEFAULT_PLAYLIST_END}\n"
"}\n"
"export -f download_playlist\n"
msgstr ""

msgid ""
"#!/bin/sh\n"
"\n"
"download_user     ClojureTV                            15\n"
"download_channel  \"UCmEClzCBDx-vrt0GuSKBd9g\"           100\n"
"download_playlist \"PLqG7fA3EaMRPzL5jzd83tWcjCUH9ZUsbX\" 15\n"
msgstr ""

msgid "$ uniq youtube-dl-seen.conf > youtube-dl-seen.conf\n"
msgstr ""