zlacker

[parent] [thread] 3 comments
1. 0x38B+(OP)[view] [source] 2019-11-28 21:04:19
I can share to Termux from the YouTube app on my Pixel and download an entire playlist to my music folder - Ffmpeg handles any audio.

It's quicker than any of the YouTube downloader apps I've tried!

How it works: in ~/bin there's a termux-url-opener script that handles what you share:

"#!/bin/bash

case "$1" in

  *youtu*)

    echo "$1 is a YouTube URL,
      downloading"

    sh ~/shortcuts/dl_yt.sh $1

    ..."
(dl_yt just calls youtube-dl -x)

I love it and am still finding new uses for Termux. I've got neovim and all my dotfiles loaded, so in a pinch I can ssh into my phone to do some work.

replies(2): >>chrono+Ta >>Ycros+0h
2. chrono+Ta[view] [source] 2019-11-28 23:27:28
>>0x38B+(OP)
Would it not be nicer to save a whole lot on bandwidth by using "youtube-dl -f bestaudio[ext=m4a]" instead of "youtube-dl -x"?
replies(1): >>0x38B+fF
3. Ycros+0h[view] [source] 2019-11-29 01:12:30
>>0x38B+(OP)
Ah, nice to see I'm not the only one running youtube-dl on a phone via Termux.
◧◩
4. 0x38B+fF[view] [source] [discussion] 2019-11-29 07:27:17
>>chrono+Ta
Good point! My command line looks like this:

youtube-dl -f bestaudio -x --no-progress -o "~/storage/music/YouTube/%(title)s.%(ext)s" "$1"

This generally gives me .opus files, which play OK but my player can't change the tags.

[go to top]