Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can someone please help me? #1630

Closed
ghost opened this issue Oct 19, 2013 · 3 comments
Closed

can someone please help me? #1630

ghost opened this issue Oct 19, 2013 · 3 comments

Comments

@ghost
Copy link

@ghost ghost commented Oct 19, 2013

I am trying to use youtube-dl in this shell script to directly stream YouTube videos to mplayer. Whenever I attempt to do this, I get this error message from youtube-dl saying, "youtube-dl: error: invalid rate limit specified." Could someone please tell me how to correct this error? Thanks in advance.

@phihag
Copy link
Contributor

@phihag phihag commented Oct 19, 2013

Can you post the shell script that you are using? Most likely, the command-line options are incorrect.

@ghost
Copy link
Author

@ghost ghost commented Oct 19, 2013

Sure, here it is:

#!/usr/bin/env bash
if [ "$UID" == "0" ]
then
echo "NOTE: This script is not meant to be run as root"
fi
link=$1
let x=0
if [ "$link" != "" ]
then
if [ "$(echo "$link"|cut -d"=" -f1 -)" != "http://www.youtube.com/watch?v" ]
then
echo -e "\nSimple YouTube to mPlayer streaming Script"
if [ "$link" != "--help" ]
then
echo "ERROR: No such available option: $1!"
let x=1
fi
echo -e "Usage: $0 [OPTION]\n\nSince this script is made by a really dumb person, you can only specify one option at time.\nAvailable options are:\n\n\t\t Plays the supplied YouTube link\n\t--help\t\t Displays this help\n\nBy default, if no option is specified, The script will ask you for a YouTube link.\n"
exit $x
fi
fi
TMPDIR="/tmp/YouTube-to-mPlayer"
while [ "$link" == "" ]
do
echo "Paste your YouTube link below!"
read link
if [ "$(echo "$link"|cut -d"=" -f1 -)" != "https://www.youtube.com/watch?v" ]
then
if [ "$link" == "" ]
then
let x=1
exit $x
fi
echo ""$link" Is not a YouTube Link"
link=""
fi
done
link=$(echo "$link"|cut -d"&" -f1 -)
let x=0
mkdir "$TMPDIR"
mplayer -cookies -cookies-file "$TMPDIR/cookie.txt" $(youtube-dl -verbose -gf 34 --cookies "$TMPDIR/cookie.txt" "$link")
rm -rf "$TMPDIR"
exit $x

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Oct 24, 2013

The problem is that the long options starts with two -, you have to write --verbose, not -verbose.

@jaimeMF jaimeMF closed this Oct 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.