Try printing ( with log) the command you are trying to execute, run it in a seperate command line to see if it's working properly.
since it's related to input I am suspecting the problem is with the youtube url you are providing
why the site told me that no rerefer and i did that
is this wrong
Try to make the transition in a normal browser and look at the data of the "referer" header, perhaps you make a mistake in them (for example, specifying a slash at the end of the link)