This may help:
http://joeywhelan.blogspot.com/2015/04/taming-youtube.html
This is for networks though, and assumes your router runs Cisco IOS.
If this is for an individual machine, something like this may work:
http://lartc.org/howto/lartc.ratelimit.single.html
The...