Saturday, July 13, 2013

youtube: The uploader has not made this video available in your country.

   Sometimes, youtube link will not play in your country, but in other country it will play.  This is becausethe  up loader  has restricted the video to play in your country. In other wards they have allowed to access with in few countries.  In this case, you will get the  error as "The uploader has not made this video available in your country".

Depending on the gateway IP address, youtube application will figure out in which country you are in? And it will check whether up loader has provided  the access for this country. If yes it will play. Otherwise it will not play.

Don't worry. you can still play this video but with the cost of low speed.  The below steps explains in detail.

WINDOWS OS

1.  Please make sure the error is related to country specific.

2. Go to internet settings and LAN. check for the proxy settings. It will be blank  or your country specific proxy will be there.

3. Now go to "http://www.hidemyass.com/proxy-list/search-408711"

4. Check for most probable allowed country of the you tube link(trial and error method). Filter out that country. You may get multiple IP addresses and ports.

5.  Select long connection time IP address and port.

6. Configure  this in the proxy settings in internet settings.

7.  Re-launch  the  browser  and try with youtube link. It will work fine. sometimes connection will get dropped. we need to bare with that.

Linux OS

Because of  the issue of connection dropping with these free proxy servers, we can download the youtube video from youtube-dl application and then watch. I have not explored these tools in windows, But in lLnux I tried with youtube-dl  application which is youtube downloader.

1. First install youtube-dl package in Linux and make sure it is working properly. Sometime, it will throw some errors. Fix these errors and check that youtube-dl is working properly.

2. Follow the steps 3-5 of windows OS to get the proxy server IP  address  and  port.

3. Export this proxy in the terminal as

      %  export HTTP_PROXY="http://<selected IP address>:<port>/"

  e.g:
       %  export HTTP_PROXY="http://182.72.238.81:80/"

Please note that this will not set the proxy for the whole system. Instead it will set only for the terminal. This is very helpfull in case of downloading the youtube video.  Still you can set the configuration system wide. But as I told earlier it will slow down the network, because of all the requests will pass through this proxy and makes the internet slow.

4.  now you are set to download. You can run the youtube-dl command as  below:
   
      %  youtube-dl  <YOUTUBE URL>

Please note that  the connection will get dropped in between the download. hence I have written the script as a work around for this issue.

#!/bin/sh

export HTTP_PROXY="http://182.72.238.81:80/"

while read line
do

url=`echo $line`
echo "downloading $url"
exit_status=1
while [ $exit_status -ne 0 ];
do
youtube-dl  "$url"
exit_status=`echo $?`
done
done < links.txt

links.txt file is having the one youtube link per line.


Thanks
Shivu