Proxy server to support Youtube for Audioshield

Hi!

I have created an experimental proxy server to replace Soundcloud support with Youtube support for Audioshield. It works in conjunction with another program, called Fiddler, to essentially decrypt HTTPS traffic from Audioshield, redirect those searches to Youtube, and finally mp3-encode the selected videos to mp3 on-the-fly.

I can’t promise IT-support, or anything really, but I’ve written instructions on how to do this with Windows 7 if anyone wants to try it. You can find the instructions in pastebin: Audioshield-tubifier (revised instructions) - Pastebin.com. Of course it goes without saying that you do this at your own peril.

As with all things Vive, the setup is pretty convoluted, but once you get familiar with the launch process it really doesn’t take long. I’ve tested this now for a couple of days, and had a blast. There’s really nothing quite like jamming with your favorite songs in Audioshield.

Some misc notes:

  • The mp3-conversion process isn’t as fast as just downloading the song, but the wait is usually very manageable. When I select a song I don’t usually stick around for the preview part, but just start the gameplay straight away. This way the song is converted as the arena is being loaded, and I hardly have to wait any extra at all.

  • This doesn’t really bring Spotify -support any closer, since the crucial thing is being able to download the audio-content, not just record it as it’s being played back.

  • Youtube playlist support should be pretty easy to add.

  • The weak point in this setup is the official Youtube API that I have to use. There are great free video/audio-conversion libraries that handle everything once you know the direct URL of the video, but not really any un-official solutions to searching/browsing for content. One solution would be to just have the user list some Youtube-playlist URL’s in a file, and have them choose from those.

  • Fiddler provides a library for the core functions. If anyone has experience with Fiddlercore, I think the bulky setup process could be streamlined.

P.S. It’s late here in Finland, and I might not be able to provide much support tomorrow, so hold on to your hats. It took a while to get this thing researched, built and documented already. :slight_smile:

Edit: Revised the pastebin instructions to include ffmpeg installation.

Edit2: For a Google Play Music -version, see this thread (by /u/Dioxy): https://www.reddit.com/r/Vive/comments/4p6wlq/use_audioshield_with_google_play_music/

please consider making a Github repo for this so that other can contribute improvements and so that there is a place to for people to find updates!

You are officially a God among men. THANK YOU!!!

Is there any way to tweak this to support Google Play Music? I’ll try the YouTube thing tomorrow but I’d love to be able to access my GPM library/All Access

Holy fuck yessssssss

You champion of men!

“[Fiddler] The connection to ‘api.soundcloud.com’ failed.
Error: ConnectionRefused (0x274d).
System.Net.Sockets.SocketException No connection could be made because the target machine actively refused it 127.0.0.1:80”

I keep getting this error:

Got a stream request for Youtube id: A*********M
G:\SteamLibrary\steamapps\common\Audioshield\Youtube_proxy\index.js:104
                        if (err.message != "Output stream closed") throw err;
                                                                   ^

Error: Cannot find ffmpeg
    at G:\SteamLibrary\steamapps\common\Audioshield\Youtube_proxy\node_modules\fluent-ffmpeg\lib\processor.js:131:22
    at G:\SteamLibrary\steamapps\common\Audioshield\Youtube_proxy\node_modules\fluent-ffmpeg\lib\capabilities.js:123:9
    at G:\SteamLibrary\steamapps\common\Audioshield\Youtube_proxy\node_modules\async\lib\async.js:52:16
    at G:\SteamLibrary\steamapps\common\Audioshield\Youtube_proxy\node_modules\async\lib\async.js:1209:30
    at G:\SteamLibrary\steamapps\common\Audioshield\Youtube_proxy\node_modules\fluent-ffmpeg\lib\capabilities.js:116:11
    at G:\SteamLibrary\steamapps\common\Audioshield\Youtube_proxy\node_modules\fluent-ffmpeg\lib\utils.js:223:16
    at F (G:\SteamLibrary\steamapps\common\Audioshield\Youtube_proxy\node_modules\which\which.js:69:16)
    at E (G:\SteamLibrary\steamapps\common\Audioshield\Youtube_proxy\node_modules\which\which.js:81:29)
    at G:\SteamLibrary\steamapps\common\Audioshield\Youtube_proxy\node_modules\which\which.js:90:16
    at G:\SteamLibrary\steamapps\common\Audioshield\Youtube_proxy\node_modules\isexe\index.js:44:5

Any idea what the problem is and how to fix it please?

Edit : windows 10, npm install didnt show any error

oh very interesting. one questions:

with the ability to change hardcoded lines in audioshield would it be possible to make the process easier or even gain the ability to integrate other services?

Because i have limited access and can mod a few things in audioshield (not only the lua files!). But i dont know much abount mp3 encoding etc.

How I didn’t see this before? I need to try.

Would be awesome with spotify

Edit: Oh I see, I managed to skip a step with the YouTube Data API service. It all works now.

I get this issue when I try to do a search:

B:\Software\Audioshield Tubifier>node index.js
Server running
CTRL+C to shutdown
Got a search request: cascada
B:\Software\Audioshield Tubifier\index.js:41
        for(var i=0; i < results["items"].length; i++) {
                                         ^

TypeError: Cannot read property 'length' of undefined
    at parse_youtube_results (B:\Software\Audioshield Tubifier\index.js:41:35)
    at Request._callback (B:\Software\Audioshield Tubifier\index.js:139:18)
    at Request.self.callback (B:\Software\Audioshield Tubifier\node_modules\request\request.js:200:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (B:\Software\Audioshield Tubifier\node_modules\request\request.js:1067:10)
    at emitOne (events.js:82:20)
    at Request.emit (events.js:169:7)
    at IncomingMessage.<anonymous> (B:\Software\Audioshield Tubifier\node_modules\request\request.js:988:12)
    at emitNone (events.js:72:20)

B:\Software\Audioshield Tubifier>

Just playing the track using the API URL works fine, but searches are broken… I assume it has something to do with decrypting the https traffic?

I have followed the instructions and literally jus get a white screen when i try to do the soundcloud test - any ideas? No log in the Command promt window to show a search either.

I wish this were in the next update of audioshield

This is actually what I was doing anyways, thanks so much for this! much better than my process.

This is working perfectly. Thanks!

I keep getting the following error in fiddler:
HTTPS handshake to api.soundcloud.com (for #223) failed.
Something about a unrecognized package. Maybe it’s a firewall setting or some other security-related crap. But I cant figure it out.

I followed the steps and everything seemed to go well. However, when I try searching in Audioshield, nothing appears now and this is what appears in Fiddler.

If it’s possible to download the songs in a format that doesn’t include DRM or copyright restrictions, then it should be possible.

The port 80 in the address 127.0.0.1:80 means that this connection was made to regular http, not https. Did you maybe try to access the proxy server in the launch step and used http in the address instead of https?