Advertisement
albspirit86

Video Resolution Locker for Squid

Oct 5th, 2014
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. Version 1.10 - August 28th 2014
  2.  
  3. The Video Resolution Locker for Squid is a free API in order to lock the resolution on YouTube, Vevo and DailyMotion.
  4. The API takes into account all YouTube, Vevo and DailyMotion video formats, all resolutions (144p to 2160p).
  5. For YouTube, if the selected resolution does not exist, the API will reply with the original resolution.
  6. With Vevo and DailyMotion, the API will always reply with the lowest resolution (Vevo: 360p, DailyMotion: 144p)
  7.  
  8. Edit the .PHP file to fix the resolution with 'resol=240p' or anything else.
  9. Disable or enable Vevo ('vevo=0 or 1') and DailyMotion ('dm=0 or 1'), by default they are both enabled if not precised.
  10. All flv/ts/mp4/webm/3gp parts will be locked to the selected resolution or lowest resolution.
  11.  
  12. Note: If you change the resolution when watching a video on the YouTube player, the video will freeze during few seconds, that's normal.
  13. The YouTube player will need to reload the video part in the correct resolution.
  14. With Vevo and DailyMotion, the lowest resolution is fixed at the start of the videos, so no freeze.
  15.  
  16. Requierements:
  17. - Squid 2.7 minimal
  18. - PHP 5.x
  19. - Curl
  20.  
  21. Installation:
  22. - Uncompress ut-ytresol.1.10.tgz to /etc/squid or /etc/squid3 depending your compilation options
  23. - Verify the script /etc/squid3/ut-ytresol.php is permissions 0755
  24. - Then, edit your squid.conf or squid3.conf and add this:
  25. # ---------------------------------------------------- #
  26. # YouTube Resolution Locker
  27. url_rewrite_program /etc/squid3/ut-ytresol.php
  28. url_rewrite_children 20
  29.  
  30. - Finally, reload Squid with "squid -k reconfigure" and test by yourself...
  31.  
  32.  
  33.  
  34. link : wget http://sourceforge.net/projects/youtuberesolutionlocker/files/ut-ytresol.1.10.tgz
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement