Garry's Mod

Garry's Mod

3D Stream Radio
Grocel  [developer] 13 Sep, 2015 @ 6:45am
[Help] Error: 2 | Can't open the file
The given path of the file is not valid.

If you try to play an online file:
- Do not forget the protocol prefix such as 'http://'
- Make sure the file exist at the given URL. It should be downloadable.
- Make sure the format is supported and the file is not broken. (See below.)

If you try to play a local file:
- Make sure the file exist at the given path.
- Make sure the file is readable for Garry's Mod.
- The path must be relative your "<path to game>/garrysmod/sound/" folder. (See below.)
- The file must be in "<path to game>/garrysmod/sound/" folder. (See below.)
- You can play mounted stuff in "<path to game>/garrysmod/sound/".
- You can not play sound scripts or sound properties.
- Make sure the format is supported and the file is not broken. (See below.)

Supported formats:
MP3, OGG, AAC, WAV, WMA, FLAC
*.WAV files must be not self-looping in game as the API does not support these.[github.com]

How local or mounted file paths work:
- If you have a file located "<path to game>/garrysmod/sound/mymusic/song.mp3" you access it with these urls:
* file://mymusic/song.mp3
* mymusic/song.mp3

- For files in "<path to game>/garrysmod/sound/filename.mp3" you get them like this:
* file://filename.mp3
* filename.mp3

- Files outside the game folder are forbidden to be accessed by the game.
- Do not enter absolute paths.
- Only people who also have the same file localed there, will be able to hear the music too.
- Create folders if they are missing.
Last edited by Grocel; 17 Feb, 2016 @ 2:10am
< >
Showing 1-15 of 36 comments
amogus 11 Jan, 2016 @ 8:42am 
Thx^^
Aedremor 20 Jan, 2016 @ 11:26pm 
I get this error when trying to play local mp3 files, some will play but most of them won't, why is this?
Grocel  [developer] 21 Jan, 2016 @ 10:03am 
I guess that could be a bug of GMod. The GMod developers are trying a few things with BASS.dll to improve its MP3 support.

But could be also likely that you could just put in wrong pathes. Read the OP, if you didn't yet.
Last edited by Grocel; 3 Apr, 2017 @ 6:19am
Peekofwar 16 Feb, 2016 @ 1:17pm 
The following sound is playable via the in-game sound browser (accessible via the sound icon in the Radio Creator settings:

Error 2: Can't open the file
URL: music/mp_coop_lobby_2_c1.wav

Same thing if it is file://music/mp_coop_lobby_2_c1.wav


This file works though: music/radio1.mp3
Last edited by Peekofwar; 16 Feb, 2016 @ 1:31pm
Grocel  [developer] 16 Feb, 2016 @ 1:28pm 
Well that's a proper error report folks. :D

Your URL is valid, but the BASS API the game (and so the radio) can not read the file because it is self looping. Check OP.

As written in the OP:
Originally posted by Grocel:
*.WAV files must be not self-looping in game as the API does not support these.

The Sound Browser uses source's sound engine to playback the sounds, that's why it works.
Last edited by Grocel; 16 Feb, 2016 @ 1:48pm
Peekofwar 16 Feb, 2016 @ 1:33pm 
So, is there a way to make it work? Or would I have to make an entirely new sound?
Grocel  [developer] 16 Feb, 2016 @ 1:39pm 
No, that can't be made to work without a new sound file. Make one and upload it some where public, so you wouldn't need to upload via the game. I suggest you to read the FAQ and the discussions before continuing, as all the stuff has be answered before.

You can't get around API borders.
Last edited by Grocel; 16 Feb, 2016 @ 1:40pm
Wuzzle 26 Feb, 2016 @ 8:27am 
How would I add lots of songs all at once?
Grocel  [developer] 26 Feb, 2016 @ 8:40am 
There is no way of mass adding, you need to add them one by one using the addon's playlist editor. Make sure that the songs can be played in the radio first. The OP says what you need to know for that.

You can also edit the files by hand if you need to.
Last edited by Grocel; 1 Mar, 2016 @ 8:57am
geznervik 25 May, 2018 @ 8:17pm 
So uhh.. When I used YouTube, I get an error saying 'URL not valid'. I use certain songs and it allows them, but... Others it does not allow (I'm guessing the sound file is too big?) Anyways, I just wanted to know an answer. Like for example, the ROBLOX Sharknado Song! Very small file size, worked the first few times, but then later got screwed up and wouldn't work..
Why the hell is this happening? Does YouTube not count as a valid URL? I mean, I'm bein honest to God right now.. It's damn well not working.

Peace out, until I get an answer. At probably 3:00 AM. When I'm probably asleep.
Grocel  [developer] 26 May, 2018 @ 1:18am 
@Alphys:
Please put in the URL and the error code in the report. The addon description says these things for a reason...

You probaly forgot got to add a https:// at the beginning. Youtube URLs are usually valid.

But please don't be one of those guys about Youtube.

As you seen there: https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/246756300/360671352684917592/

Youtube support is limited and an optin feature for a reason. I originally planed to remove it with the last big update, because the converter API was first unreliable and then broken later. I decided not to remove it, because I found a better API. Sometimes these are unreliable as well.

Because of the bad experiences with bad comments, of my radio being "♥♥♥♥" for not fixing impossible Problems, I desided put in an activate first system, so people are forced acknowledge that I can not fix Youtube problems for said reasons without going things from free to very expensive.

That worked out quite well for now.
Last edited by Grocel; 26 May, 2018 @ 1:26am
CTOG 19 Jun, 2018 @ 12:38am 
It worked better when i put the music folder in GarrysMod/sourceengine/sound. Put file://(foldername)/(song name).mp3 (or whatever format your song is for) the local path. BTW for me the garrysmod folder did not have a sound folder. So if that's the case for others, just make one. I hope i help anyone still having a hard time with this.
Last edited by CTOG; 19 Jun, 2018 @ 12:41am
CTOG 19 Jun, 2018 @ 12:51am 
Oh, and if you want to pick songs without retyping the path, on the radio screen go-to gamesounds/(music folder name) it work if you put the music folder in GarrysMod/sourceengine/sound
surytrap 2 Oct, 2019 @ 5:23am 
Error 2: Can't open the file
URL: http://fallout.fm:8000/falloutfm3.ogg

There was no file or content found at the given path
Last edited by surytrap; 2 Oct, 2019 @ 5:24am
=MoonShard= 7 Apr, 2021 @ 12:42pm 
I cannot listen to majority of radio files. Some work most of them don't. They have proper link and everything but they just won't work. It just gives me error 2 could not play stream https:// link here.
< >
Showing 1-15 of 36 comments
Per page: 1530 50