[qtube] Webif front end for youtube-dl

Black Hole

May contain traces of nut
Yeah, so I discovered. I got an error message that the source file couldn't be found to be deleted.

As to kill or pkill, I need to investigate how they work (particularly within an abduco session).
 
Just added this to my second Humax Fox-T2 (it has more available space)

Problem, all downloads are placed at 'My Video' root level, so

Tried this [ -o "/media/My Video/YouTube/%(title)s.%(ext)s" ] in the process options box, everything is now downloaded to a folder named YouTube, don't worry, if folder YouTube is not present on first run, it will be created

To make a regular option, add it to the /mod/etc/youtube-dl.conf file, right clicking this link opens in a new window the file ready to be amended, don't forget to add a new line after the last line

Great when processing a playlist which contain many files
 

Black Hole

May contain traces of nut
OK, so here's my youtube-dl.conf file:
Code:
--prefer-ffmpeg
-f "best[height<=?1080]"
-o "/media/My Video/YouTube/%(title)s.%(ext)s"
...and yes, it does have blank lines at the end... so why didn't it work? Downloads made with these defaults went to My Video the same as usual.
 
OP
MymsMan

MymsMan

Ad detector
OK, so here's my youtube-dl.conf file:
Code:
--prefer-ffmpeg
-f "best[height<=?1080]"
-o "/media/My Video/YouTube/%(title)s.%(ext)s"
...and yes, it does have blank lines at the end... so why didn't it work? Downloads made with these defaults went to My Video the same as usual.
I suspect it is because the -o option has been hardcoded into youtube-dl, so I am not sure how @Andrea Edwards has got it working
 

prpr

Well-Known Member
What is the point of /mod/webif/plugin/qtube/qtube.jim ?
It seems to contain a load of stuff relating to detectads and/or chaseget.
 

prpr

Well-Known Member
I suspect it is because the -o option has been hardcoded into youtube-dl
It has into youtube not youtube-dl .
And as qtube seems to call youtube then...
Downloads made with these defaults went to My Video the same as usual.
Try using just "-o" in the Process options box (without the quotes). Then it should default to what's in the config. file.
 
OP
MymsMan

MymsMan

Ad detector
What is the point of /mod/webif/plugin/qtube/qtube.jim ?
It seems to contain a load of stuff relating to detectads and/or chaseget.
Lazy copy and paste when creating package and not cleaning up redundant :poop_:
😭
 

/df

Active Member
I suspect it is because the -o option has been hardcoded into youtube-dl, so I am not sure how @Andrea Edwards has got it working
Yes, the logic is that, if the output location is specified to /mod/bin/youtube, that is passed to /mod/bin/youtube-dl, and otherwise an output option is passed specifying the platform's Video directory. Arguably that should have been put as a default in the /mod/etc/youtube-dl.conf, but that would have needed some per-platform logic in the package installation.

/mod/bin/youtube-dl can be run directly, either by patching the initial "#!/usr/bin/env" to "#!/bin/env " or "#!/mod/bin/env" (with coreutils), or using some mount --bind trickery to magic up a /usr/bin/env. In that case @Andrea Edwards's configuration would work.

...
Try using just "-o" in the Process options box (without the quotes). Then it should default to what's in the config. file.
Provided it's the last option (otherwise the next option would be parsed as the value of -o).
 
Last edited:

Black Hole

May contain traces of nut
So... as we are becoming used to, the OP is onto something but not investigating the whole picture and therefore posting misleading information. I shall remove my 😍.

To make a regular option, add it to the /mod/etc/youtube-dl.conf file, right clicking this link opens in a new window the file ready to be amended, don't forget to add a new line after the last line
As it stands, this does not work.
 
hello, I'm over here, here is my youtube-dl.conf file

- - - - -
--prefer-ffmpeg
-f "best[height<=?1080]"
-o "/media/My Video/YouTube/%(title)s.%(ext)s"

- - - - -

sorry readers, I've just seen this thread update and have tried to repeat my previous tests

when [ -o "/media/My Video/YouTube/%(title)s.%(ext)s" ] is placed in the options line under the file path, it does get saved in to the sub folder, but seems to be ignored when placed in the config file, I've tried reversing the lines and making two lines in to one, but the downloaded file is still downloading to the root level of [ My Video ]

my apologies
 

mihaid

Active Member
I was reticent to use getiplayer because I thought it complicated. Now i bit the bullet I wonder why it took me so long. Whole programmes downloaded in minutes, having to use your computer by enlarge for qtube dl anyway makes it for me a no brainer. Getiplayer wins every time
 

/df

Active Member
... the downloaded file is still downloading to the root level of [ My Video ]
Adding the output template to the configuration file did seem like a plausible approach.

Did you try with the output template in the configuration file and -o (or possibly -o --) as the last items in the qtube Options box?

Otherwise, there is the following modification to /mod/webif/plugin/qtube/queue.hook (ie, replace line 28, prefixed -, with the one below, prefixed +)
Code:
--- /mod/webif/plugin/qtube/queue.hook
+++ /mod/webif/plugin/qtube/queue.hook.new
@@ -25,7 +25,7 @@
     qlog "Starting queued download URL $url Options $opts QID $::Qid" 0
     log  "See $logfile for details" 0
 
-    set cmd "youtube --newline $opts $url"
+    set cmd "python /mod/bin/youtube-dl --config-location /mod/etc/youtube-dl.conf --restrict-filenames --newline $opts $url"
     if {[catch {exec {*}$cmd \
             | awk {{print strftime("%d/%m/%Y %H:%M:%S -"), $0; fflush(); }} \
             >@$::qlogfd } msg catchopts]
 

Black Hole

May contain traces of nut
having to use your computer by enlarge for qtube dl anyway
I presume you meant "by and large".

What do you mean "having to use your computer"? I don't use my PC to access WebIF (much), and you can fire off a qtube download from wherever WebIF is available (iPad) and leave it to get on with it. I used to use get_iplayer, but now I exclusively use qtube – and the result is displayable on TV without having to relocate it.

BTW: it's qtube or youtube-dl, not "qtube dl". qtube is the GUI that has been built for youtube-dl.
 
Last edited:

/df

Active Member
But you still need to use a computer. So why stick with the inferior thing? Obvs you like tinkering with code to see what's possible, but noncoders?
But you don't need a computer capable of running get_iplayer to use the Webif or telnet for youtube-dl.

Given the choice of get_iplayer on my laptop vs youtube-dl on the laptop or HD/R, I find I nowadays tend to go for yt-dl on HD/R even though I know that get_iplayer is more capable for iPlayer content. De gustibus, etc.

If get_iplayer had been a goer, its web interface could have been accessed through Webif, which would have been nice, as with the existing Mediatomb and Transmission packages.
 

mihaid

Active Member
I presume you meant "by and large".

What do you mean "having to use your computer"? I don't use my PC to access WebIF (much), and you can fire off a qtube download from wherever WebIF is available (iPad) and leave it to get on with it. I used to use get_iplayer, but now I exclusively use qtube – and the result is displayable on TV without having to relocate it.

BTW: it's qtube or youtube-dl, not "qtube dl". qtube is the GUI that has been built for youtube-dl.
Obvsly.

Are you really telling me that iPad is not a computer?
 

mihaid

Active Member
But you don't need a computer capable of running get_iplayer to use the Webif or telnet for youtube-dl.

Given the choice of get_iplayer on my laptop vs youtube-dl on the laptop or HD/R, I find I nowadays tend to go for yt-dl on HD/R even though I know that get_iplayer is more capable for iPlayer content. De gustibus, etc.

If get_iplayer had been a goer, its web interface could have been accessed through Webif, which would have been nice, as with the existing Mediatomb and Transmission packages.
I get it. However look at post #74 . probably not many non coders are gonna get involved with.

I would really like to see bhole have a go at that on his iPad.
 

mihaid

Active Member
I presume you meant "by and large".

What do you mean "having to use your computer"? I don't use my PC to access WebIF (much), and you can fire off a qtube download from wherever WebIF is available (iPad) and leave it to get on with it. I used to use get_iplayer, but now I exclusively use qtube – and the result is displayable on TV without having to relocate it.

BTW: it's qtube or youtube-dl, not "qtube dl". qtube is the GUI that has been built for youtube-dl.
Btw. No need to relocate files with getiplayer either
 
Top