LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-18-2019, 04:02 AM   #1
zetrotrack000
Member
 
Registered: Dec 2011
Posts: 401

Rep: Reputation: Disabled
Download error with youtube-dl and axel


Hi
I am trying to download following video:
Code:
https://www.youtube.com/watch?v=pQWj2Fgxdrc
by combining 'youtube-dl' and 'axel'. I am trying to download this video in such a way that I want these two softwares (youtube-dl and axel) to not only save this video as "interview.mp4" but also limit download speed to 200KB. For this purpose, I used following command:
Code:
youtube-dl -f 22 -c -i --external-downloader /usr/bin/axel -o 'interview.mp4' -s 200000 https://www.youtube.com/watch?v=pQWj2Fgxdrc
Here I am using following options:
-f 22 for video format
-c for resume download
-i for ignore errors
-o for output file name
-s 200000 for limit download speed to 200KB
However, instead of downloading the video at 200KB and saving it as "interview.mp4", it is giving following error:
Code:
ERROR: fixed output name but more than one file to download
I have also tried following variation of command:
Code:
youtube-dl -f 22 -c -i --external-downloader /usr/bin/axel -s 200000 -o 'interview.mp4'  https://www.youtube.com/watch?v=pQWj2Fgxdrc
and
Code:
youtube-dl -f 22 -c -i --external-downloader /usr/bin/axel -o 'interview.mp4' https://www.youtube.com/watch?v=pQWj2Fgxdrc -s 200000
and
Code:
youtube-dl -f 22 -c -i -o 'interview.mp4' --external-downloader /usr/bin/axel -s 200000 https://www.youtube.com/watch?v=pQWj2Fgxdrc
But still same error is appearing. However, if I remove the option (-s 200000), the error disappear and the video starts to download. But I want to use (-s 200000) option so that it should not eat all the bandwidth.
Kindly guide me that what mistake I am doing here and how can I fix it.
Regards
 
Old 02-18-2019, 04:39 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,241

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
I think you're putting axel in the wrong place. You have it as an operand, in the case of youtube-dl, an object to be downloaded. By the time youtube-dl sees axel, it will have established it's connection, negotiated speed, etc.

I think you want to get axel in control before youtube-dl establishes a connection. You have axel, and I don't know it. Look up options & examples. It will probably be

axel --<options> youtube-dl <blah>.
 
Old 02-18-2019, 04:45 AM   #3
zetrotrack000
Member
 
Registered: Dec 2011
Posts: 401

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
I think you're putting axel in the wrong place. You have it as an operand, in the case of youtube-dl, an object to be downloaded. By the time youtube-dl sees axel, it will have established it's connection, negotiated speed, etc.

I think you want to get axel in control before youtube-dl establishes a connection. You have axel, and I don't know it. Look up options & examples. It will probably be

axel --<options> youtube-dl <blah>.
youtube-dl has an option (--external-downloader) which incorporates axel with it. Moreover, following commands works fine:
Code:
youtube-dl -f 22 -c -i --external-downloader /usr/bin/axel -o 'interview.mp4' https://www.youtube.com/watch?v=pQWj2Fgxdrc
the error only appears when I introduce (-s 200000) option. So, it means that without (-s) option, the sequence of command is correct because it is working. It is (-s) option which is creating problem, and I don't know how and where to incorporate this option.
 
Old 02-18-2019, 10:24 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,241

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Irritating. Have you tried
Code:
youtube-dl -f 22 -c -i --external-downloader '/usr/bin/axel -o interview.mp4'
The output file has nothing funny about it' name. Whast's the '-d 200000' option an option to? youtube-dl? axel? Include it as appropriate after it's executable.
 
Old 02-18-2019, 10:28 AM   #5
zetrotrack000
Member
 
Registered: Dec 2011
Posts: 401

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
Irritating. Have you tried
Code:
youtube-dl -f 22 -c -i --external-downloader '/usr/bin/axel -o interview.mp4'
The output file has nothing funny about it' name. Whast's the '-d 200000' option an option to? youtube-dl? axel? Include it as appropriate after it's executable.
The command you have mentioned works. But I want to incorporate (-s 200000) option. This option is for 'axel' and it instructs 'axel' to limit download speed to 200K.
 
Old 02-18-2019, 10:53 AM   #6
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
youtube-dl interprets '-s' as 'simulate' and therefore thinks '200000' is an argument.

Try using '--external-downloader-args' to pass the '-s 200000' option to axel.

Last edited by snowday; 02-18-2019 at 10:57 AM.
 
1 members found this post helpful.
Old 02-18-2019, 11:01 AM   #7
zetrotrack000
Member
 
Registered: Dec 2011
Posts: 401

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by snowpine View Post
youtube-dl interprets '-s' as 'simulate' and therefore thinks '200000' is an argument.

Try using '--external-downloader-args' to pass the '-s 200000' option to axel.
Thanks. The problem is solved and following command worked for me:
Code:
youtube-dl -f 22 -c -i --external-downloader-args '-s 200000' --external-downloader /usr/bin/axel -o 'interview.mp4' https://www.youtube.com/watch?v=pQWj2Fgxdrc
 
Old 02-18-2019, 01:52 PM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
i wonder why an external downloade is deemed necessary for this?
youtube-dl can limit the download speed all by itself:
Quote:
Originally Posted by man youtube-dl
-r, --limit-rate RATE
Maximum download rate in bytes per second (e.g. 50K or 4.2M)
 
Old 02-18-2019, 11:44 PM   #9
zetrotrack000
Member
 
Registered: Dec 2011
Posts: 401

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
i wonder why an external downloade is deemed necessary for this?
youtube-dl can limit the download speed all by itself:
Does youtube-dl have any option to specify output? Like "interview.mp4" in my case.
 
Old 02-19-2019, 02:38 AM   #10
l0f4r0
Member
 
Registered: Jul 2018
Location: Paris
Distribution: Debian
Posts: 900

Rep: Reputation: 290Reputation: 290Reputation: 290
^ Of course, there is a -o switch for output.
You can even specify a pattern/template.
 
1 members found this post helpful.
Old 02-19-2019, 04:10 AM   #11
zetrotrack000
Member
 
Registered: Dec 2011
Posts: 401

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by l0f4r0 View Post
^ Of course, there is a -o switch for output.
You can even specify a pattern/template.
Thanks a lot.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can axel or wget download a file through ssh? rob_r Linux - Software 3 04-12-2016 03:06 PM
LXer: An Interview With Gallium Nine Project Developer Axel Davy LXer Syndicated Linux News 0 02-18-2015 11:23 PM
unable to install axel in debian 6.0 i386 Verion venu5b8 Linux - Newbie 1 03-23-2011 01:00 AM
why is axel downloading .php files? switch10 Linux - Software 2 02-08-2010 01:03 PM
Segmentation fault shown by axel (download accelerator) deepumnit Linux - Software 9 11-07-2007 05:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration