Euro Truck Simulator 2

Euro Truck Simulator 2

Not enough ratings
Adding unsupported radio station to ETS2 using VLC
By RoadAquila
An easy guide, showing how to add an unsupported radio station to ETS2 playlist.
   
Award
Favorite
Favorited
Unfavorite
How to use VLC for unsupported radio streams in ETS2
The purpose of this guide is to show an easy way to add a favorite radio channel to live_streams.sii, the file where ETS2 has its radio stations. This method works well for one favorite station, that you really want, but it doesn't broadcasts in .mp3, the format supported by ETS2. It can be extended to more radio stations, but this means running in background more instances of VLC player, and therefore things can get messy.

Here's what it needs to be done, step by step, to add one favorite, unsupported radio station to ETS2 playlist:

1. Acquire the URL to the online radio station you want. This can be done in several ways, I won't cover here as there are manny tutorials on how to do this on internet. Test it in \Documents\Euro Truck Simulator 2 \live_streams.sii. Just right click on live_streams.sii, select Open With and choose Notepad. Add the station last in the list like this: stream_data[station_number]: "URL to your station/|Station name|Genre|Language|Bitrate|favorite or not"
- station_number: for example if you already have 350 staions, your new station will be 351.
- URL to your station: ex. https://live.rockfm.ro/rockfm.aacp
- Station name: give the station the name you want, like in this case RockFM
- Genre: the genre of the station, in this example it's Rock
- Language:: the language of the station, like RU, PL, EN etc.
- Bitrate: the bitrate of the staion. If you don't know it, you can skip this field, or assume a value
like: 64, 128 or 320.
- favorite or not: the value 1 for favorite station and 0 if not.

If you've done everything right and you don't hear the station in ETS2 it means, the station broadcasts in another format than mp3. To test if you've got the proper station URL, open VLC than select from its menu Media > Open Network Stream. Enter the URL you have in the field under Please enter a network URL. If you hear something than the URL is correct and the problem is with ETS2 radio player, if you don't hear anything, and an error message pops up, than you don't have the right URL for the station. IMPORTANT, regarding VLC, if a message from Windows firewall pops up, than choose allow. Otherwise you'll have to enable VLC in your firewall through Control Panel.

2. If you have the right URL, meaning you can hear the station in VLC but not in ETS2, you need to make a .bat file that will tell VLC to convert the unsupported broadcast format to mp3, the format liked by ETS2 player. Here are the steps:
- Right click on Desktop, select New from the menu than choose Text Document
- Add the following code to the newly created text document:
C: cd C:\Program Files\VideoLAN\VLC vlc "URL_to_your_station" --sout=#transcode {vcodec=none,acodec=mp3,ab=128,channels=2,samplerate=44100,scodec=none}:http{mux=mp3,dst=:8080/} :no-sout-all :sout-keep
- In Notepad go to File > Save As and in the File name: field give a name like
radio_test.bat, and click Save. This will create the .bat file you need. You can delete the
text document now, created before saving as .bat. The batch file you've created can be edited
with Notepad.
- Double click the .bat file and it should open 2 windows: one with the command line interface
and another window of VLC.
- For the time being you won't hear anything, as for now VLC just does the conversion into mp3
format.
- To test if the conversion is happening, open another instance of VLC, go to Media > Open
Network Stream , but this time in the URL field put http://localhost:8080
- Add the station to live_streams.sii like this: stream_data[station number]:
"http://localhost:8080|RockFM|Rock|RO|64|1"

- Close that instance of VLC where you've tested if the conversion to mp3 is happening, and
open ETS2 and enjoy.

OPTIONAL
If you don't like the fact that the bat file also opens a command line interface window, you have to do a .vbs file like this:
- Make a new text file like I've specified before and put in it the following code:
Set oShell = CreateObject ("Wscript.Shell") Dim strArgs strArgs = "cmd /c radio_test.bat" oShell.Run strArgs, 0, false
- Again go to Save As and choose whatever name you like for your .vbs file, like radio.vbs
- Delete the text file previously created, but be carefull to put in the vbs file the exact name of
your bat file.
- If you change the name of your bat file than you have to also edit the vbs file with Notepad.
- Both files, .bat and .vbs must stay together, and now you can open the VLC conversion window
by double click the vbs file
- You can put the files in any directory on your hard drive and make a shortcut for the vbs file to
Desktop.

Remember to leave VLC conversion window open, while you play ETS2.

HAVE FUN
3 Comments
RoadAquila  [author] 23 Jan, 2022 @ 1:54pm 
Also if there are more than 5 requests, on how to open multiple instances of VLC with one click, for unsupported radio channels, I'll do a sequel for this guide, explaining just that. The thing is the more VLC conversion windows run in background the more processing power is needed. This being said is up to everybody to estimate how manny VLC conversion windows they can run in parallel with the game.

Cheers
RoadAquila  [author] 23 Jan, 2022 @ 9:30am 
What @enix214 said is a good addition to the guide. But do try to install VLC where Windows usually is, in C: partition. It's a fairly small program.

Please if you have any more questions, don't hesitate to ask.
enix 23 Jan, 2022 @ 9:11am 
For people who have their VLC on another disk rather than on the system disk and cant figure out how to make the .bat file work, change the "C" in the first line of code to the disk that ur VLC is in, for example mine is "D:", and then in the second line of code, change the "C:\Program Files\VideoLAN\VLC" to the location where ur VLC application folder is, for me it's "D:\Apps\VLC", to do that u first have to go inside the VLC folder, and then click the text box next to the search bar where it says something like "This PC > (your disk name) > ... ". Once the text is highlighted, copy that text and replace "C:\Program Files\VideoLAN\VLC" with the one you copied. I've spent around 10 minutes trying to figure this out lol