Hi all
This is a similar issue to something I was working with before, but a completely new topic all together, so I thought be worth opening a new thread.
I'm trying to decrypt a stream in order to pass the URL to my PVR software.
I have a flask plugin thanks to members here, which is able to fetch the encrypted URL. I also have a key which should in theory open the channels to allow to be re-streamed. I've had feedback that what was provided works fine in apps like Tivimate, but as I have different IPTV servers in different countries which deal with geoblocking, and then pass the channels back to me (all for my personal use), moving to a DRM app simply isn't feasible for me, so my only option is to decrypt what is encrypted, to a URL on the server such as 127.0.0.1:5988/ITV1, I'll then create a playlist with all those endpoints, and then will import them on my main NextPVR server.
BUt before that's done, I find the right commands.
So the way the flask server is set up is that http://127.0.0.1:1984/itvx?channel=ITV redirects to the proper URL whenever it is requested so it redirects toCode:https://csm-e-ceitvaeuw1lived204-013ebcbd74ab15d84.play.dar.itv.com/csm/live/248438629/1.mpd;jsessionid=23B843C56CB39CB72B0A161024EFF584.csm-e-ceitvaeuw1lived204-013ebcbd74ab15d84.play.dar.itv.com?source=simulcast&size=pattern&supertag=dflt,sim&hmod=126.0&service=itv.x&generic=1fb2beef-2fd4-44e9-bf13-b0ac9ee90d75&pv=browser.4.1&player=html5.desktop&yo.ap=https%3A%2F%2Fdar-live-red-irdeto-ms.fastly.content.itv.com%2Fprdsda%2F&default=defaultpattern&vfunapod=true&yo.t.jt=500&yo.up=https%3A%2F%2Fdar-live-red-irdeto-ms.fastly.content.itv.com%2Fplayout%2Fpc01%2Fitv1%2Fcenc.isml%2F&tppm=x&pm=free&random=8580429205&yo.eb.fb=aHR0cHM6Ly9saXZlLXJlZC1pcmRldG8tbXMuZmFzdGx5LmNvbnRlbnQuaXR2LmNvbS9wbGF5b3V0L3BjMDEvaXR2MS9jZW5jLW5vZGFyLmlzbWwvLm1wZD9Qb2xpY3k9ZXlKVGRHRjBaVzFsYm5RaU9sdDdJbEpsYzI5MWNtTmxJam9pS2pvdkx5b3VhWFIyTG1OdmJTOXdiR0Y1YjNWMEwzQmpNREV2YVhSMk1TOWpaVzVqTFc1dlpHRnlMbWx6Yld3dktpSXNJa052Ym1ScGRHbHZiaUk2ZXlKRVlYUmxUR1Z6YzFSb1lXNGlPbnNpUVZkVE9rVndiMk5vVkdsdFpTSTZNVGN5TXpJeE1URXdNSDE5ZlYxOSZTaWduYXR1cmU9SFU4d3VtcFZ5Nk5CUHdtblgwRzVZQUs0STZROWh1b240UFpENUl4clFtWWFSc21%2BZTdkVlR3WXlnWEYtWnhiNmY1dGg3N29vV0pDS1l1NFRHZ2drMEpkSmJQQTZCVmVTTEd1VlZhWFdHdHgtdUlXLWxGVm9BZGRORlZGQ3NtNmR2UDlPYlRJT0lDYnRmaGtJMHlFN2ZIdFJyNHBxdzlNNHZ2R2J3RmQzay0zWVZqQko0RG91NXJWSjRqdzQxOEF3Nmg5Sm91flVjZmJ%2Ban5qTVVXREwxNjllTFcwM2JDTEJsVmYydVVneWV3SmJ5dGRmUXRyVkY3SVNETGtTR1hjMWlyRE5UVn5vNU9CUH5iSGdwMnJjWmRZd1dCQjJmckVBNDlzTFZUWm9Zb0N0NHRRN1BBMFBJeko4dHNxTzJ6SXo0aGpibDJnZlVEWUFrelVKblpaQVJ3X18mS2V5LVBhaXItSWQ9QVBLQUpCN1BDRlpBWkhXWlZJQkE%3D&area=itvplayer.simulcast.simadreplacement&rh=x&yo.br=false&subserv=x&us=ano&site=itv&osver=10.15&conttier=x&chanbrand=itv1&os=mac.os&yo.tracking=true&plfcid=simadreplacement&plist=simadreplacement&yo.ad=false&yo.ch=true&yo.ac=true&dm=x&hman=firefox&viewid=0.1fb2beef-2fd4-44e9-bf13-b0ac9ee90d75&hdevid=x&tdur=21600&tparts=1&arp=x&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiKjovLyouaXR2LmNvbS9jc20vZXh0bGl2ZS8qIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzIzMjExMTAwfX19XX0_&Signature=QVGc482l7Oy82QNm1Tx4E3VLNrsjfl1nCWzGvKuwk~bqhPRj43DFKsLSCZPhsHfvmR7qLSRJ3d1J04hZuGe9SfWyzGga0YIe6e2eca75f0KCCUGCJ3bSXh4uZyYKKaNuY1gtJD4Ec2jwVA~BpJnvyPlSZD8aZuVJbUhpd1HnNMBg5qjze-3FmXk--wOZxfE~eIQgUi7LNyPr5Zo1Mfs7NxlDlMyS4hzwovbVG7v~SvHJXdRdT6abdXFZj-ymBHxrEdtiKf~P4LJNIh-sEP-24cyZyFaCzVgnl4ZhYfdxj8WQpVa3Xm2QLICHpwNK2G-QvTGH~8yfxbdYotvwIVjDFw__&Key-Pair-Id=APKAJB7PCFZAZHWZVIBA&externalId=itv1-dotcom-dash-proda-multicdn
I have the keys, so it should (at least in my mind) be easy, I've spend honestly the past two days struggling, and I haven't even implemented what I wanted to implement. Once I've finished testing, or I can see I'm getting somewhere I will then implement this on my infrastructure.
I've attempted this
but all I get is errors.Code:python -m XstreamDL_CLI.cli \ --key 2cd55e22f9bf46a0bb543ae9a0d7fd24:06153ec0f57fce3444b29e0f1a3534fa \ --proxy http://localhost:8080 \ --headers headers.json \ --live \ https://csm-e-ceitvaeuw1lived204-0fbbd9ca013111458.play.dar.itv.com/csm/live/248438629/1.mpd;jsessionid=FDCAB25AEC1C332033EBC560D3BE6243.csm-e-ceitvaeuw1lived204-0fbbd9ca013111458.play.dar.itv.com?source=simulcast&size=pattern&supertag=dflt,sim&hmod=126.0&service=itv.x&generic=1fe40131-a549-439b-a547-142ea48ac1d2&pv=browser.4.1&player=html5.desktop&yo.ap=https%3A%2F%2Fdar-live-red-irdeto-ms.fastly.content.itv.com%2Fprdsda%2F&default=defaultpattern&vfunapod=true&yo.t.jt=500&yo.up=https%3A%2F%2Fdar-live-red-irdeto-ms.fastly.content.itv.com%2Fplayout%2Fpc01%2Fitv1%2Fcenc.isml%2F&tppm=x&pm=free&random=0393814030&yo.eb.fb=aHR0cHM6Ly9saXZlLXJlZC1pcmRldG8tbXMuZmFzdGx5LmNvbnRlbnQuaXR2LmNvbS9wbGF5b3V0L3BjMDEvaXR2MS9jZW5jLW5vZGFyLmlzbWwvLm1wZD9Qb2xpY3k9ZXlKVGRHRjBaVzFsYm5RaU9sdDdJbEpsYzI5MWNtTmxJam9pS2pvdkx5b3VhWFIyTG1OdmJTOXdiR0Y1YjNWMEwzQmpNREV2YVhSMk1TOWpaVzVqTFc1dlpHRnlMbWx6Yld3dktpSXNJa052Ym1ScGRHbHZiaUk2ZXlKRVlYUmxUR1Z6YzFSb1lXNGlPbnNpUVZkVE9rVndiMk5vVkdsdFpTSTZNVGN5TXpJd01UZ3dNSDE5ZlYxOSZTaWduYXR1cmU9ZXBGVTE0NmFXTjc1RVJsUWs0RXp4ZnlvRjUxOThiWjl2LWIyUWRucXFaQ0ItODBMSUpPNWZQc2tLeWo0QWowSHpySllwTTg4RX56UX5xUDgzNWVxU2l0TWRTd2xpWDhNTVp5YUI1REtmVEgtQ0VjUG1mT2VWVktuWE1PYjZZSllrV1R2Qm96d3lZemZRVExya3h1OHFTQlNTa2hxQjF6T292Skp3YWhlbkJscEY5RVRuTmM3ZzQ0WU42Vn5ETEFMdmM4YVk1UlY2Y1h4ZzQ1Qi1SSFJxSFliZWxDQlQ0Z3ZPckt3cVFjdVhCcFdVN0NMWFYzSFdCNWhET1NidDAyWmsyczU2WH53MVc0YkRlekcxdm9tV0hRQTVyRkpjSFBDZm10bzh5aml3emVSeVhkTUk2WHpBaGJWRHVwby10UFpVbjNFQWZJSzF3TGFzZDNlbFZoOHRBX18mS2V5LVBhaXItSWQ9QVBLQUpCN1BDRlpBWkhXWlZJQkE%3D&area=itvplayer.simulcast.simadreplacement&rh=x&yo.br=false&subserv=x&us=ano&site=itv&osver=10.15&conttier=x&chanbrand=itv1&os=mac.os&yo.tracking=true&plfcid=simadreplacement&plist=simadreplacement&yo.ad=false&yo.ch=true&yo.ac=true&dm=x&hman=firefox&viewid=0.1fe40131-a549-439b-a547-142ea48ac1d2&hdevid=x&tdur=21600&tparts=1&arp=x&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiKjovLyouaXR2LmNvbS9jc20vZXh0bGl2ZS8qIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzIzMjAxODAwfX19XX0_&Signature=BGsCjY4sHTyQjymqukRM3ZKVZFTLWxPRptUIemP-TtVdZ1xHkk2KZQS~i9xLXhjdQNZuL2ekpSXGKYKo9munt4iH5tv-2egBDEB3Z~30l8Evk2ohaiP21mw1eHIDPtYwAzLha9yb3Lgct1bXZVtQH1kxFDQnaRE1gbPW1yoJMH4cXq3e1p2ltzYmTCfl8Y5A3rbU0~zTaEXTui9g6sVP5D5po32mkxGe0aIEHiNmrNHTF-SePbeHXRqrJ-HU8XSGz9QxKpWBy1VWHpwfZ3yx95JOFLrRXqLG2nZwTXumIUBAyOsnqdyXe0LnMnZInuwem-D-iBvtt7qhGrRNitZ8cA__&Key-Pair-Id=APKAJB7PCFZAZHWZVIBA&externalId=itv1-dotcom-dash-proda-multicdn
I've been advised that only the accept header is required so I placed this in my headers.json file
The flask code was provided by stupid.345, if I need share it let me know - all credit goes to him...Code:{ "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:126.0) Gecko/20100101 Firefox/126.0", "Accept": "application/vnd.itv.online.playlist.sim.v3+json", "Accept-Language": "en-GB,en;q=0.5", "Referer": "https://www.itv.com/", "Origin": "https://www.itv.com", "DNT": "1", "Connection": "keep-alive", "Sec-Fetch-Dest": "empty", "Sec-Fetch-Mode": "no-cors", "Sec-Fetch-Site": "same-site", "Priority": "u=4", "Pragma": "no-cache", "Cache-Control": "no-cache", "Content-Type": "application/x-www-form-urlencoded"
I now need to get the decryption working..
Thanks
		
			+ Reply to Thread
			
		
		
		
			
	
	
				Results 1 to 18 of 18
			
		- 
	
- 
	how about: 
 Code:ffplay.exe "<itv1 mpd url>" -cenc_decryption_key 06153ec0f57fce3444b29e0f1a3534fa 
 [Attachment 81350 - Click to enlarge]Bypass HMACs, One-time-tokens and Lic.Wrapping: https://github.com/DevLARLEY/WidevineProxy2
- 
	
- 
	Yes, it does work on linux, but I've noticed that it will always play the currently running period which could be an ad, and if it is then it will try to keep playing this period even if it ends (aka. the ad stops), which will freeze the video and give 404 Not Found errors in the cmd Bypass HMACs, One-time-tokens and Lic.Wrapping: https://github.com/DevLARLEY/WidevineProxy2
- 
	1. Find an option in ffmpeg that automatically switches Periods 
 2. Use a completely different 'streamer'
 (3. Modify ffmpeg and compile it yourself)Bypass HMACs, One-time-tokens and Lic.Wrapping: https://github.com/DevLARLEY/WidevineProxy2
- 
	The MPD file eventually expires, and needs to be renewed so will put a script in place which automatically does this. 
- 
	Would FFplay be able to transcode the stream so I could potentially open it with another media player on the network, or does it just open it on that PC? Either way it's a step in the right direction. I've heard something about gyan.dev's ffmpeg build being better at this kind of thing, but seems to be Windows based, and would need to recompile it for Linux. 
- 
	In VLC:Code:"<itv1 mpd url>" -cenc_decryption_key 06153ec0f57fce3444b29e0f1a3534fa -re -f mpegts udp://<target machine ip>:8080 
 Open Network stream -> udp://@:8080
 
 Can't test it right nowBypass HMACs, One-time-tokens and Lic.Wrapping: https://github.com/DevLARLEY/WidevineProxy2
- 
	So I've had some success with FFplay. The stream plays (not all that well, but at least I now know it's working) It's a big step up from nothing for the past few days. 
 
 
 Using ChatGPT, I asked it to convert the stream to FFMPEG which gives me this outputand all the playback gives me is a grey pixellated picture which means assuming is the DRM which hasn't been removed.Code:ffmpeg -i "https://csm-e-ceitvaeuw1lived204-0c555d06bcaa67a80.play.dar.itv.com/csm/live/248438629/1.mpd;jsessionid=4BB3C6D0F71A7B5E06824D9F74457B22.csm-e-ceitvaeuw1lived204-0c555d06bcaa67a80.play.dar.itv.com?source=simulcast&size=pattern&supertag=dflt,sim&hmod=126.0&service=itv.x&generic=1f777197-9a16-4995-8654-8f6b4e28b3da&pv=browser.4.1&player=html5.desktop&yo.ap=https%3A%2F%2Fdar-live-red-irdeto-ms.fastly.content.itv.com%2Fprdsda%2F&default=defaultpattern&vfunapod=true&yo.t.jt=500&yo.up=https%3A%2F%2Fdar-live-red-irdeto-ms.fastly.content.itv.com%2Fplayout%2Fpc01%2Fitv1%2Fcenc.isml%2F&tppm=x&pm=free&random=7174232179&yo.eb.fb=aHR0cHM6Ly9saXZlLXJlZC1pcmRldG8tbXMuZmFzdGx5LmNvbnRlbnQuaXR2LmNvbS9wbGF5b3V0L3BjMDEvaXR2MS9jZW5jLW5vZGFyLmlzbWwvLm1wZD9Qb2xpY3k9ZXlKVGRHRjBaVzFsYm5RaU9sdDdJbEpsYzI5MWNtTmxJam9pS2pvdkx5b3VhWFIyTG1OdmJTOXdiR0Y1YjNWMEwzQmpNREV2YVhSMk1TOWpaVzVqTFc1dlpHRnlMbWx6Yld3dktpSXNJa052Ym1ScGRHbHZiaUk2ZXlKRVlYUmxUR1Z6YzFSb1lXNGlPbnNpUVZkVE9rVndiMk5vVkdsdFpTSTZNVGN5TXpJek5URXdNSDE5ZlYxOSZTaWduYXR1cmU9S0tYVDM4UU5OMm9zVWNYVnM1VEdkQlpoYWZsRHdDbms5RnN5NU56d3dra2pvSko2RHV%2BU25FRFUyM2oyeVM2cFc2VTNPaG1IczE2SVpIcWVJWThtckc3aH5qZlVoczhpbDlaRWR4djlHbEJHVU9GMHV5YVl5YVVBUkhGTEFucGxyaVNTVjRRR0FpLXNDeGEwMEtmNjRWbGhFTTlUN3djbWZGSlV%2BRldIQVpiN3UxTmVXTG1TVEotSmxqUHA1Mmp3V2xlcVhMdkxELTRvVkR0elQzaUtSLTJsYlNDMDFJd2kxa0ZXbXRsRk02MTdVU1FtMmhQN0RSNGl2ck1lMTdoajNheGVPc0std0RFcUswLVdUeGJXWTUyUDI0WnlSMFFISWtsT1p%2Bb1c3MmlCdlZpMHcxfk9KVXRJak1NS09CTTlyYzhldFo3S2RyYXgxSWEyWENTSXN3X18mS2V5LVBhaXItSWQ9QVBLQUpCN1BDRlpBWkhXWlZJQkE%3D&area=itvplayer.simulcast.simadreplacement&rh=x&yo.br=false&subserv=x&us=ano&site=itv&osver=10.15&conttier=x&chanbrand=itv1&os=mac.os&yo.tracking=true&plfcid=simadreplacement&plist=simadreplacement&yo.ad=false&yo.ch=true&yo.ac=true&dm=x&hman=firefox&viewid=0.1f777197-9a16-4995-8654-8f6b4e28b3da&hdevid=x&tdur=21600&tparts=1&arp=x&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiKjovLyouaXR2LmNvbS9jc20vZXh0bGl2ZS8qIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzIzMjM1MTAwfX19XX0_&Signature=A7l3YNQeO-hn5t-LR4iBEB6I6AmRUTRx-Tfy9FMHxzgKjjSXAo0G9Tur3-~tQLkiMKenUK7B8tmjDpk1lkx5dCrJeuilABN~sMUKU5pthGaxQ7zVvP5tk8Ms9VAqqXBtLUVNdurblgps1Nv3Y3YkNtmAPZ13H0POslRNiFUakctDBsns2YL9l~DjJL8gg4AyabZRn0i~NFkyW817MQ4Au~5bqhi13bqp3ChBwacQNpweMtqjCcc5GrQdvgmropVMVlUPbRvd9pUJ~IWiGRXOYR~7Dq4sXOWte1DdM20uuFbxmgmyN0y-0LO-9YuXW82HsYBFQEwGILK94y3YGAymIw__&Key-Pair-Id=APKAJB7PCFZAZHWZVIBA&externalId=itv1-dotcom-dash-proda-multicdn" -cenc_decryption_key 06153ec0f57fce3444b29e0f1a3534fa -c copy test.mp4 
 
 My plan eventually would be to have a script deals with automatically fetches the latest mpd file. The flask script automatically fetches the correct MPD when http://127.0.0.1:1984/itvx?channel=ITV is called. so should be as simple has having the flask scripts automatically being refreshed which should allow uninterrupted viewing.
 
 However before any of this is done, I need to be able to view with ffmpeg. Being able to finally view the stream in FFplay is a step in the right direction. Next step is FFmpeg.
 
 Thanks so much
- 
	assuming you mean 
 
 Code:"ffplay <itv1 mpd url>" -cenc_decryption_key 06153ec0f57fce3444b29e0f1a3534fa -re -f mpegts udp://<target machine ip>:8080 No worries about to head off to bed, will check back tomorrow - just glad something is working....can't test it right now
 
 Thanks so much for the help thus far.
- 
	Bypass HMACs, One-time-tokens and Lic.Wrapping: https://github.com/DevLARLEY/WidevineProxy2
- 
	entering the command gives meCode:ffmpeg "https://csm-e-ceitvaeuw1lived204-00750893566ae798d.play.dar.itv.com/csm/live/248438629/1.mpd;jsessionid=0C169C2B4881158C0A73D1D46B58AD7A.csm-e-ceitvaeuw1lived204-00750893566ae798d.play.dar.itv.com?source=simulcast&size=pattern&supertag=dflt,sim&hmod=126.0&service=itv.x&generic=a0e09a97-5c1f-4626-9284-f90a9a671000&pv=browser.4.1&player=html5.desktop&yo.ap=https%3A%2F%2Fdar-live-red-irdeto-ms.fastly.content.itv.com%2Fprdsda%2F&default=defaultpattern&vfunapod=true&yo.t.jt=500&yo.up=https%3A%2F%2Fdar-live-red-irdeto-ms.fastly.content.itv.com%2Fplayout%2Fpc01%2Fitv1%2Fcenc.isml%2F&tppm=x&pm=free&random=8876687436&yo.eb.fb=aHR0cHM6Ly9saXZlLXJlZC1pcmRldG8tbXMuZmFzdGx5LmNvbnRlbnQuaXR2LmNvbS9wbGF5b3V0L3BjMDEvaXR2MS9jZW5jLW5vZGFyLmlzbWwvLm1wZD9Qb2xpY3k9ZXlKVGRHRjBaVzFsYm5RaU9sdDdJbEpsYzI5MWNtTmxJam9pS2pvdkx5b3VhWFIyTG1OdmJTOXdiR0Y1YjNWMEwzQmpNREV2YVhSMk1TOWpaVzVqTFc1dlpHRnlMbWx6Yld3dktpSXNJa052Ym1ScGRHbHZiaUk2ZXlKRVlYUmxUR1Z6YzFSb1lXNGlPbnNpUVZkVE9rVndiMk5vVkdsdFpTSTZNVGN5TXpJMk16a3dNSDE5ZlYxOSZTaWduYXR1cmU9SkhUN0ZuVjBFWVJFNXFSZnVMSFZNdmVxSmxNOTFmWUsycWlUVzRmaHBmb25zVkJ0dk5EQUczalhadnBJNWxld3pHd01QT0FUYTdhUG1OZFNOUjcweUFNdS15OU1uRTZob2s1NVgyUDZXdVBHSVQ3eTg2c1luNzNqUm5HLU1lWHZ1blU4My1sVUNmbDEzNU1DVlRoVn5DeUJNTFlsUDdlY2ZLWXRmbzdCNTI4UnNFT3p1QkVQRTFxRzNRZjZ0blFGcVI5dmpLbHg4NzBJRjVVUHY5a2c4Sm1jaVdVQndTcXpReEROUnlvVVdELS1nbTFZbURDbnNieS1YTkxTZUFBZHhhU2F0dkYzeGlVODdPckFyVk5kNXA5Z2J5U2tpLXBocTZ3WVhSTThvem1PVDFzZWdMU0R5cnJhVXRTbjMwYWJ6MURtSTdvLUlwc2ZKQ0Nmc0Z6NUlRX18mS2V5LVBhaXItSWQ9QVBLQUpCN1BDRlpBWkhXWlZJQkE%3D&area=itvplayer.simulcast.simadreplacement&rh=x&yo.br=false&subserv=x&us=ano&site=itv&osver=10.15&conttier=x&chanbrand=itv1&os=mac.os&yo.tracking=true&plfcid=simadreplacement&plist=simadreplacement&yo.ad=false&yo.ch=true&yo.ac=true&dm=x&hman=firefox&viewid=0.a0e09a97-5c1f-4626-9284-f90a9a671000&hdevid=x&tdur=21600&tparts=1&arp=x&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiKjovLyouaXR2LmNvbS9jc20vZXh0bGl2ZS8qIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzIzMjYzOTAwfX19XX0_&Signature=RbwBrmVHnZr1Bra88qMq-gzZ1FGeim5QnybhjhgoTO-LC7VPllCrDYGcJNRayrDpshQ7uEtchMxN8vfHjBqiuxTZZ-cF91L~9QIlxdpFIa6jNVBEQbaOoX-ldIZNCIHYL9IluC7ASp1VU8F-SYUTBG-kF0CvUx~-VIfD6mV0nCJexcuOQJvxXENqX5qFmapxc~zSy2U1XrWB~bgestOQZlGi5~~rxPLkagGDVP73FKYd~aiSHYRGa7Nfo9XKX5fx909aBeyBbLWHDI3Kl8zzvy7xCK9GyWj~iz73ymKYP8jX~8eERLgu14-o89bg7bl3W87p7oyjCPAo~rzomOuCuw__&Key-Pair-Id=APKAJB7PCFZAZHWZVIBA&externalId=itv1-dotcom-dash-proda-multicdn" -cenc_decryption_key 06153ec0f57fce3444b29e0f1a3534fa -re -f mpegts udp://127.0.0.1:8080 I await feedback as to how to resolve this..Code:Error opening output files: Invalid argument 
 
 Thanks again.
- 
	I tried around and got to this command: 
 
 but I'm getting this error in VLC after waiting for ~1 minute:Code:ffmpeg -re -i "<itv1 mpd url>" -cenc_decryption_key 06153ec0f57fce3444b29e0f1a3534fa -c copy -f mpegts udp://127.0.0.1:8080 
 Code:mpg123 error: mpg123_decode_frame error: A generic mpg123 error. Bypass HMACs, One-time-tokens and Lic.Wrapping: https://github.com/DevLARLEY/WidevineProxy2
- 
	I wonder if it would have anything to do with headers. 
 
 This is the flask script which pulls the valid scrambled URL - I wonder if what's required here can't be used to also decrypt. Someone said that only an accept header is needed.
 
 Here's the content of that flask scriptCode:from flask import Blueprint, redirect, request import requests itv_bp = Blueprint('itv', __name__) @itv_bp.route('/itvx') def itvredirect(): channel = request.args.get('channel', 'ITV') proxies = { 'http': 'http://localhost:8080', 'https': 'http://localhost:8080', } cookies = { 'SyrenisCookieFormConsent_Itv.Session': '{"tokens":{"content":{"entitlement":{"purchased":[],"source":"","failed_availability_checks":[]},"email_verified":true,"token_type":"bearer","missingUserData":["NoPlanSelected"]}}', } headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:126.0) Gecko/20100101 Firefox/126.0', 'Accept': 'application/vnd.itv.online.playlist.sim.v3+json', 'Accept-Language': 'en-GB,en;q=0.5', 'Referer': 'https://www.itv.com/', 'Origin': 'https://www.itv.com', 'DNT': '1', 'Connection': 'keep-alive', 'Sec-Fetch-Dest': 'empty', 'Sec-Fetch-Mode': 'no-cors', 'Sec-Fetch-Site': 'same-site', 'Priority': 'u=4', 'Pragma': 'no-cache', 'Cache-Control': 'no-cache', 'Content-Type': 'application/x-www-form-urlencoded', } data = '{"user":{"itvUserId":"{4f129513-1f5b-4dc9-8a2a-b6434e93c938}","entitlements":[],"profile_id":"{4f129513-1f5b-4dc9-8a2a-b6434e93c938}_0"},"device":{"manufacturer":"Firefox","model":"126.0","os":{"name":"Mac OS","version":"10.15","type":"desktop"}},"client":{"version":"4.1","id":"browser","supportsAdPods":true,"service":"itv.x","appversion":"2.228.2"},"variantAvailability":{"player":"dash","featureset":{"min":["mpeg-dash","widevine"],"max":["mpeg-dash","widevine"]},"platformTag":"dotcom"}}' response = requests.post( f'https://simulcast.itv.com/playlist/itvonline/{channel}', cookies=cookies, headers=headers, data=data, proxies=proxies, ).json() url = response['Playlist']['Video']['VideoLocations'][0]['Url'] return redirect(url)
- 
	That someone was me. But any special headers, cookies or request data are only important to get the JSON data from 'simulcast.itv...'. Once that response gets retrieved by the Flask script, it extracts the dynamic url from the JSON and redirects to it. But following that redirect (to the 'play.dar.itv...' url) just means that any browser, player or script can call that url with the standard headers that it would use for any other url. And those headers are all that's needed to get something to play (as with ffplay) as the url to which you are redirected contains a long list of parameters - meaning any credentials needed are then part of that url. 
 
 And to be sure: there is no real 'rotation' of mpd urls, every single requests gets a unique url and you will get a new one if you repeat the request 1 second later. Which means that all requests should pass through the Flask script and follow the redirect that it provides. Only that way are you sure that whatever data is linked to your client, ip address or indeed the itvUserId included in the script is consistent throughout the lifecycle of your request.
- 
	Just a thought here: wouldn't it be easier to try setting up the decryption for a channel that doesn't use dynamic urls and isn't geoblocked? Just to remove those two extra moving parts? I think the RTÉ channels fit that description. 
- 
	
Similar Threads
- 
  How can i decrypt a stream from Joyn?By PyNoob in forum Video Streaming DownloadingReplies: 7Last Post: 29th Jan 2025, 05:48
- 
  Widevine Decrypt Live Stream PlayerBy abaca20 in forum Video Streaming DownloadingReplies: 47Last Post: 28th Dec 2024, 15:22
- 
  Decrypt Widevine stream helpBy duongpro2004 in forum Video Streaming DownloadingReplies: 3Last Post: 16th Apr 2023, 21:13
- 
  Is there a program that can download a stream and decrypt?By Joeyjojos in forum Video Streaming DownloadingReplies: 6Last Post: 18th Sep 2022, 20:38
- 
  Help decrypt MPD Live StreamBy Egn69217j_ in forum Video Streaming DownloadingReplies: 8Last Post: 13th Apr 2021, 08:21


 
		
		 View Profile
				View Profile
			 View Forum Posts
				View Forum Posts
			 Private Message
				Private Message
			 
 
			
			

 Quote
 Quote Visit Homepage
				Visit Homepage
			 
			