#+TITLE: Collection of recipes for various tools * syncthing ** connection to the remote UI The web UI for syncthing is binded to localhost. To access the UI of a remote host, create a SSH tunnel: #+begin_src sh ssh -L 1235:localhost:8384 -N -f 192.168.0.106 #+end_src * yt-dlp - use =--merge-output-format=mkv= - check what's the best audio and video for a video - prefer =mp4= for the audio over =webm= ** List of supported formats #+begin_src sh :results verbatim yt-dlp --list-formats https://www.youtube.com/watch?v=igH-NgcuW2M #+end_src #+RESULTS: #+begin_example [youtube] igH-NgcuW2M: Downloading webpage [youtube] igH-NgcuW2M: Downloading android player API JSON [info] Available formats for igH-NgcuW2M: ID EXT RESOLUTION FPS | FILESIZE TBR PROTO | VCODEC VBR ACODEC ABR ASR MORE INFO --- ---- ---------- --- - ---------- ----- ----- - ----------- ----- --------- ---- ------- ----------------- 139 m4a audio only | 15.00MiB 47k https | mp4a.40.5 47k 22050Hz low, m4a_dash 249 webm audio only | 15.28MiB 48k https | opus 48k 48000Hz low, webm_dash 250 webm audio only | 19.58MiB 62k https | opus 62k 48000Hz low, webm_dash 140 m4a audio only | 40.06MiB 127k https | mp4a.40.2 127k 44100Hz medium, m4a_dash 251 webm audio only | 39.20MiB 124k https | opus 124k 48000Hz medium, webm_dash 17 3gp 176x144 12 | 24.81MiB 78k https | mp4v.20.3 78k mp4a.40.2 0k 22050Hz 144p 160 mp4 256x144 12 | 34.44MiB 109k https | avc1.4d400c 109k 144p, mp4_dash 278 webm 256x144 12 | 28.61MiB 90k https | vp9 90k 144p, webm_dash 133 mp4 426x240 24 | 77.23MiB 244k https | avc1.4d4015 244k 240p, mp4_dash 242 webm 426x240 24 | 72.41MiB 229k https | vp9 229k 240p, webm_dash 134 mp4 640x360 24 | 178.23MiB 565k https | avc1.4d401e 565k 360p, mp4_dash 18 mp4 640x360 24 | 231.71MiB 734k https | avc1.42001E 734k mp4a.40.2 0k 44100Hz 360p 243 webm 640x360 24 | 137.73MiB 436k https | vp9 436k 360p, webm_dash 135 mp4 854x480 24 | 329.98MiB 1046k https | avc1.4d401e 1046k 480p, mp4_dash 244 webm 854x480 24 | 244.94MiB 776k https | vp9 776k 480p, webm_dash 136 mp4 1280x720 24 | 638.05MiB 2023k https | avc1.4d401f 2023k 720p, mp4_dash 22 mp4 1280x720 24 | 2150k https | avc1.64001F 2150k mp4a.40.2 0k 44100Hz 720p 247 webm 1280x720 24 | 490.14MiB 1554k https | vp9 1554k 720p, webm_dash 137 mp4 1920x1080 24 | 1.13GiB 3685k https | avc1.640028 3685k 1080p, mp4_dash 248 webm 1920x1080 24 | 893.45MiB 2833k https | vp9 2833k 1080p, webm_dash #+end_example ** Best audio and video #+begin_src sh yt-dlp -f 'bv*+ba' https://www.youtube.com/watch?v=igH-NgcuW2M -o '%(id)s.%(ext)s' #+end_src ** Download a playlist Save into =channel_id/playlist_id= directory with the video added to an archive text file: #+begin_src sh yt-dlp -f 'bv*[height=1080]+ba' --download-archive videos.txt https://www.youtube.com/playlist?list=PLlVlyGVtvuVnUjA4d6gHKCSrLAAm2n1e6 -o '%(channel_id)s/%(playlist_id)s/%(id)s.%(ext)s' #+end_src ** Download a channel #+begin_src sh yt-dlp -f 'bv*[height=720]+ba' --download-archive videos.txt https://www.youtube.com/c/FootheFlowerhorn/videos -o '%(channel)s/%(title)s.%(ext)s' #+end_src * exiftool ** Copy media based on the creation date #+begin_src sh exiftool -v -o . '-Directory=