Hey,
I need help again. Some time ago Youtube changed something on their servers and now I have some issues with some of the tracks. The biggest mistake is that if I ran my program on PC it runs perfectly but when I ran this same program but on Raspberry Pi v4 some links cause that thread stop on creating Stream from URL:
...
_currentStream = Bass.BASS_StreamCreateURL(track.Url, 0, BASSFlag.BASS_DEFAULT, null, IntPtr.Zero);
...
When I'm copying stream URL and pasting it into the browser, the browser has no problems with playings such files. And of course, when I'm trying to play these tracks on my PC everything goes smoothly and easy. Because the problem is always with some specific files I downloaded it and tried to compare it but they are identical.
Then I remembered that I have a debug version of libbass for raspberry so I tried to collect some logs.
There are logs from trying opening an invalid file:
...
4977[2cf0]: BASS_StreamCreateURL(9b8c394c(4977[2cf0]: nf=9084e0/908630
4977[2cf0]: utf[https://r3---sn-x2pm-3ufk.googlevideo.com/videoplayback?expire=1600138132&ei=NNdfX4vFKMbhyAXLl7HgAw&ip=185.174.112.38&id=o-ADUE-CciW4LBu6gPMxgIFn4X53DChJ9Gk5mKtSrQu52-&itag=251&source=youtube&requiressl=yes&mh=Vc&mm=31%2C29&mn=sn-x2pm-3ufk%2Csn-u2oxu-f5fe6&ms=au%2Crdu&mv=m&mvi=3&pl=22&gcr=pl&initcwndbps=760000&vprv=1&mime=audio%2Fwebm&gir=yes&clen=4119747&dur=217.221&lmt=1580613614122630&mt=1600116401&fvip=3&keepalive=yes&beids=23886209&c=WEB&txp=5531432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgW7codG9-XNwK3o99IgnNRUuuxHxokIQICLGnQkuh3dECIBN3AJdY-FmnD8w6QS26mFnlQlzVDIrSLnbpJotze-oo&sig=AOq0QJ8wRAIgagP7QRIguFPFU_QVpNlELcg8g-o035-hRfBjvfYd8gYCIGU--OELQt0Mzknghv-V7iptf8SvQQSqVSxl1jRZrZbB]
4977[2cf0]: ssl=5e63d8
5045[2cf0]: addr=176.126.58.206
5045[2cf0]: socket=282
5045[2cf0]: connect...
5051[2cf0]: connected
5051[2cf0]: SET_TLSEXT_HOSTNAME = 1
In this case, it is the end of the file. If I'm trying to load other songs I'm getting output:
...
4465[2d71]: BASS_StreamCreateURL(b5211978(https://r8---sn-x2pm-3ufk.googlevideo.com/videoplayback?expire=1600138223&ei=j9dfX4D_EpT-7ATb34CwCw&ip=185.174.112.38&id=o-ABY4xtAl3ti_q1Tsariy_Efowlyy6MCGTgUXUQ8CGMXg&itag=251&source=youtube&requiressl=yes&mh=pr&mm=31%2C29&mn=sn-x2pm-3ufk%2Csn-u2oxu-f5fed&ms=au%2Crdu&mv=m&mvi=8&pl=22&initcwndbps=807500&vprv=1&mime=audio%2Fwebm&gir=yes&clen=3409797&dur=208.461&lmt=1584130788919679&mt=1600116520&fvip=2&keepalive=yes&c=WEB&txp=5431432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAMaCZZYfxo7NCxSpW8lUg-RNF32iFCF9i57OdqeHhseVAiAXs7o9-jsqpDo468AePahhHaE-lyJOwMTu-rt9ZxzbhA%3D%3D&sig=AOq0QJ8wRgIhAM9a9laAJYfHZ5mvBJ7NHrii30b7K-Xvk2zABfOpdnfWAiEAknnBPdzrG7w41tyLdQMoAR4tLfr3n1UR5pMl5vDLWbI=), 0, 0, 0, 0)
4465[2d71]: nf=b52bc1c8/b52bc318
4479[2d71]: addr=176.126.58.211
4479[2d71]: socket=270
4479[2d71]: connect...
4484[2d71]: connected
4484[2d71]: SET_TLSEXT_HOSTNAME = 1
4511[2d71]: http[HTTP/1.1 200 OK]
4511[2d71]: http[Last-Modified: Fri, 13 Mar 2020 20:19:48 GMT]
4511[2d71]: http[Content-Type: audio/webm]
4511[2d71]: http[Date: Mon, 14 Sep 2020 20:50:24 GMT]
4511[2d71]: http[Expires: Mon, 14 Sep 2020 20:50:24 GMT]
4511[2d71]: http[Cache-Control: private, max-age=21299]
4511[2d71]: http[Accept-Ranges: bytes]
4511[2d71]: http[Content-Length: 3409797]
4511[2d71]: http[Connection: keep-alive]
4511[2d71]: http[Alt-Svc: h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"]
4511[2d71]: http[Vary: Origin]
4511[2d71]: http[X-Content-Type-Options: nosniff]
4511[2d71]: http[Server: gvs 1.0]
...
And songs can be played.
Unfortunately, links have got expiration dates and are filtered for specific IP addresses so I can't give just paste in because they will respond with 403 error code. But I downloaded two files which I had a problem and one working perfectly. Link:
https://1drv.ms/u/s!AhZzYQaFDepLgrV7gKEsL0g1knJ15g?e=gC6Jl5Summarizing, links works on PC but this same link freezes the bass library on BASS_StreamCreateURL() method when run on Raspberry Pi 4. Most of the links run perfectly but some of them cause the problem. And in the end, from time to time "broken" link will run easily without causing the problem, but if I try to play it next time by creating a new stream from this same URL it freezes.
P.S. I'm using radio42 Bass.Net wrapper.