Skip to content

Play Youtube video chunks

Hi there, I was wondering if there is a way to play continually chunks of youtube videos using VLC. In particular YouTube now needs a &range=start-end to be specified in the URL of the videos to get the different chunks to play in a fast way and avoid throttling.

So for example for a direct youtube URL like this one, I have to request it in chunks like in this example:

  1. First chunk (&range=0-66097)

https://rr10---sn-8vq54voxpu-ca9e.googlevideo.com/videoplayback?expire=1678379019&ei=q7MJZLrEL8C9x_APrvOxiA0&ip=109.116.104.178&id=o-AErJwY410dNiyPGv2LmFGyzk7EkK2AawHcW6YivnNThd&itag=251&source=youtube&requiressl=yes&mh=Nh&mm=31%2C29&mn=sn-8vq54voxpu-ca9e%2Csn-8vq54voxpu-hm2s&ms=au%2Crdu&mv=m&mvi=10&pl=19&ctier=A&pfa=5&gcr=it&initcwndbps=2187500&hightc=yes&spc=H3gIho3rnorkdi1ZXATNLP08GhkYQRH3TWhTKDtDtMpt&vprv=1&mime=audio%2Fwebm&ns=9fWpuzUkxl2c4w1S2shSmy4L&gir=yes&clen=2984866&dur=175.261&lmt=1661930986879647&mt=1678357031&fvip=6&keepalive=yes&fexp=24007246&c=WEB_REMIX&txp=2318224&n=Hn3Fs0SQXr_Nvw&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cctier%2Cpfa%2Cgcr%2Chightc%2Cspc%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgGByjEsEyIxeXq8sb9gDWach0ITpKMnfbrZqPdArLPFcCIQC9kEOwbd85GuTk70iXxBc9Lx1er5u9Ib3w_yEfPIRn5w%3D%3D&alr=yes&sig=AOq0QJ8wRQIhAOE36RbIYrgdRA6kkwA7pf2OKP7nceTOgUcAPXXV0ogQAiBsfyRiVqsg6xyv3qqqQqYt-oTJI9LHNBMzJkBa25D-Ag%3D%3D&cpn=eTAfYBVNTw7yYFgn&cver=1.20230306.01.00&range=0-66097&rn=1&rbuf=0&pot=D6KMP1kjOBTJorRDAPwlUKZGPbsCp68r2aU81x2mQMFvAIOrT9Zu8tB7KBj4VlFFFCq5ROqFxkQqifqlS2tdE_eLEPcwwefZAmAI32IVp2w3v1xO2h-y2nQdbOQ=

  1. Second chunk (&range=66098-131826)

https://rr10---sn-8vq54voxpu-ca9e.googlevideo.com/videoplayback?expire=1678379019&ei=q7MJZLrEL8C9x_APrvOxiA0&ip=109.116.104.178&id=o-AErJwY410dNiyPGv2LmFGyzk7EkK2AawHcW6YivnNThd&itag=251&source=youtube&requiressl=yes&mh=Nh&mm=31%2C29&mn=sn-8vq54voxpu-ca9e%2Csn-8vq54voxpu-hm2s&ms=au%2Crdu&mv=m&mvi=10&pl=19&ctier=A&pfa=5&gcr=it&initcwndbps=2187500&hightc=yes&spc=H3gIho3rnorkdi1ZXATNLP08GhkYQRH3TWhTKDtDtMpt&vprv=1&mime=audio%2Fwebm&ns=9fWpuzUkxl2c4w1S2shSmy4L&gir=yes&clen=2984866&dur=175.261&lmt=1661930986879647&mt=1678357031&fvip=6&keepalive=yes&fexp=24007246&c=WEB_REMIX&txp=2318224&n=Hn3Fs0SQXr_Nvw&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cctier%2Cpfa%2Cgcr%2Chightc%2Cspc%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgGByjEsEyIxeXq8sb9gDWach0ITpKMnfbrZqPdArLPFcCIQC9kEOwbd85GuTk70iXxBc9Lx1er5u9Ib3w_yEfPIRn5w%3D%3D&alr=yes&sig=AOq0QJ8wRQIhAOE36RbIYrgdRA6kkwA7pf2OKP7nceTOgUcAPXXV0ogQAiBsfyRiVqsg6xyv3qqqQqYt-oTJI9LHNBMzJkBa25D-Ag%3D%3D&cpn=eTAfYBVNTw7yYFgn&cver=1.20230306.01.00&range=66098-131826&rn=2&rbuf=3431&pot=D6KMP1kjOBTJorRDAPwlUKZGPbsCp68r2aU81x2mQMFvAIOrT9Zu8tB7KBj4VlFFFCq5ROqFxkQqifqlS2tdE_eLEPcwwefZAmAI32IVp2w3v1xO2h-y2nQdbOQ=

till the last chunk.

Do you have any idea how can I modify VLC so that it asks for those chunks and play them? It is something similar to the header **Range bytes=start-end ** but directly inside the URL.

I am avaialble also to pay someone that helps me in implementing this in VLC.

Thank you!

Edited by marf
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information