Could I do this in my Android phone too?

Chat about just about anything else
Forum rules
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 30 days after creation.
Locked
kayeng

Could I do this in my Android phone too?

Post by kayeng »

Hello,

I've been using youtube-dl in Linuxmint recently with success.

http://xmodulo.com/how-to-save-youtube- ... linux.html

I was just wondering if this could be done in my Android phone as well, using a terminal app.

thank you
Last edited by LockBot on Wed Dec 07, 2022 4:01 am, edited 1 time in total.
Reason: Topic automatically closed 30 days after creation. New replies are no longer allowed.
User avatar
smurphos
Level 18
Level 18
Posts: 8501
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Could I do this in my Android phone too?

Post by smurphos »

Check out Termux app on the play store.

Tutorial for setting it up with youtube-dl- https://forum.xda-developers.com/androi ... e-t3602492

Installing Hackers Keyboard is also highly recommended to go with Termux. Makes using apps like nano much easier.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
User avatar
Portreve
Level 13
Level 13
Posts: 4882
Joined: Mon Apr 18, 2011 12:03 am
Location: Within 20,004 km of YOU!
Contact:

Re: Could I do this in my Android phone too?

Post by Portreve »

I've simply used pwnyoutube and have never needed any specialized software.

To be fair, I've never tried to do that on my phone.
Flying this flag in support of freedom 🇺🇦

Recommended keyboard layout: English (intl., with AltGR dead keys)

Podcasts: Linux Unplugged, Destination Linux

Also check out Thor Hartmannsson's Linux Tips YouTube Channel
User avatar
smurphos
Level 18
Level 18
Posts: 8501
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Could I do this in my Android phone too?

Post by smurphos »

pwnyoutube won't work for vids viewed in the Youtube Android app. In theory it will work if you set the phone up to open Youtube in a browser

The Termux, youtube-dl combo basically adds a download video item to the share menu. Termux is great for lots of stuff - it's a bit more than a terminal emulator - it's effectively a cut-down CLI only Debian for your phone.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
kayeng

Re: Could I do this in my Android phone too?

Post by kayeng »

smurphos wrote: Tue May 15, 2018 11:40 am Check out Termux app on the play store.

Tutorial for setting it up with youtube-dl- https://forum.xda-developers.com/androi ... e-t3602492
thank you for the link. I'm having trouble with number 8.

--no-mtime -o /data/data/com.termux/files/home/storage/shared/Youtube/%(title)s.%(ext)s -f "best[height<=480]"

That is one line of command, right?

I'm getting this error in Termux:
bash: syntax error near unexpected token '('

Hope you can enlighten me some more.
Thank you
User avatar
smurphos
Level 18
Level 18
Posts: 8501
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Could I do this in my Android phone too?

Post by smurphos »

Nope, they are 3 separate lines that need to be added to the file ~/.config/youtube-dl/config

Number 7 - nano ~/.config/youtube-dl/config should open the empty file in the terminal text editor nano. You add the 3 separate lines in 8 and then save the file - on a desktop machine it's Ctrl-X and then Y to save. On a phone you can use the same if you are using the Hackers Keyboard. if not use the volume key shortcuts as outlined in the tutorial.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
kayeng

Re: Could I do this in my Android phone too?

Post by kayeng »

I think I got it, however I have to point out that I needed to use Hackers Keyboard; the volume button method doesn't seem to work on my phone, or maybe I'm not doing it right.

I think I've managed to download a video from youtube but I don't know where it's saved. I can't find it anywhere. I tried to download it again but termux says it has already been downloaded.

Any ideas?

by the way, in the tutorial https://forum.xda-developers.com/androi ... e-t3602492

in 7 and 8, I'm supposed to save it as "config" (without quotes), correct? Just like in number 10 where I should save it as termux-url-opener ?

Thank you
User avatar
smurphos
Level 18
Level 18
Posts: 8501
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Could I do this in my Android phone too?

Post by smurphos »

Downloaded videos should be in data/data/com.termux/files/home/storage/shared/Youtube/ on the phone....

Yep - config without quotes...
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
kayeng

Re: Could I do this in my Android phone too?

Post by kayeng »

smurphos wrote: Fri Jun 01, 2018 1:11 am Downloaded videos should be in data/data/com.termux/files/home/storage/shared/Youtube/ on the phone....

Yep - config without quotes...
When I open my file explorer (ES File Explorer) and go to /data, it's empty. There's no a/data/com.termux/files/home/storage/shared/Youtube/
But if I open termux app, I can cd into the YouTube folder.
Also, if I download a video, it doesn't save to the YouTube folder, but to the home folder. Either way, I can't access the video thru a video app. I'll see if I can copy it to external storage.

Just did. Cannot copy to external storage. Permission denied.
Locked

Return to “Open Chat”