Hijack popular video hosting sites and get stream with youtube-dl.
+-----------+ +------------+
| | youtube.com | /etc/hosts |
| browser +-------1--------> bind, |
| <-------2--------+ dnsmasq... |
+--^--+-----+ 127.0.0.2 +------------+
| |
| | +---------------+ +--------------+
| | | http server +----5---> youtube-dl |
| +--3--> 127.0.0.2:443 <----6---+ original url |
+-----4--+ | stream | |
204 +-------------+-+ +--------------+
|
|
+----7---> mpv/mplayer
-
- Browser issues DNS request for youtube.com.
-
- DNS request is intercepted with your local DNS daemon.
-
- http(s) request is transfered to 127.0.0.2.
-
- http response 204 (no content) is issued immediately.
-
- Original url is passed to youtube-dl.
-
- url of the stream is sent back to http server.
-
- Server starts your favorite player.
Server needs (self signed) certificate.
127.0.0.2 youtube.com
run http-video-server.bat