I know I can use the following command to get a direct link to the video audio by using:
youtube-dl -f 139 --get-url https://www.youtube.com/watch?v=dQw4w9WgXcQ
Which will give me the URL
However, this link is only accessible on the machine that the command ran on. I tried changing out the IP with the client's IP, but it still does not work. The client cannot run the command themselves, so it has to be done somewhere else.
Is there a way to generate a direct link that can be used by clients?
This is answered in the youtube-dl FAQ in detail.
For some of the websites youtube-dl supports, you can simply give the link to the client. For others, it may be possible to change something. For instance, there was a time when you could send requests to YouTube via IPv6 and you'd be given an IP-unrestricted download URL.
Since all the links YouTube hands out are limited to the IP address of the client which requested the link, there is no way to get a link that works on a machine with a different IP address.