Euro Truck Simulator 2

Euro Truck Simulator 2

Not enough ratings
Watch Videos in ETS2
By Charon
(Updated Feb 22 fix) (Updated Mar 22 fix) This guide will show you how to watch video as an overlay while playing ETS2 or any game.
   
Award
Favorite
Favorited
Unfavorite
This only needs one section.
This guide will show you how to watch video as an overlay while playing ETS2. Some of you might be thinking "why?". This guide is not for you. For those thinking "Oh God, yes please.", I got you, you're not alone. :) Whatever your reason for requiring sensory overload to relax, this should help. You can apply this to pretty much any game or program as well, not just ETS, so any game or task that that doesn't fully utilise all those threads in your brain can benefit from this. You can also watch video from pretty much any source. I've already been enjoying using VLC, Youtube and Himovies. Here is a pic of how it looks.


That's me watching Dragonball Super on Himovies. This could be you!

That said, there are a couple of steps and some video sources are trickier than others.

Step 1.
The game needs to run in borderless windowed mode. In the case of ETS, we need some extra software to facilitate this. My solution is to use "Borderless Gaming". You can google this and download it for free on Github or Softpedia or simply pay a small fee for the steam version. Once you have it installed, enter your program files X86 folder and then borderless gaming. Find the two files that begin with "steam" and delete them. Why? Well this will simply stop Steam saying you are playing Borderless Gaming instead of ETS.
With that done, launch ETS. In the graphics options, untick fullscreen. Open Borderless gaming and find the ETS process. Simply highlight this and click the button in the middle that (when hovered over) says "Makes the currently selected application borderless". You may have to do this every time you launch the game but it's quite simple to do. The game will now run fullscreen borderless with no taskbar. Now we can overlay video onto it.

Step 2.
Google Ontopreplica (On Top Replica) and download it from Github/Softpedia. This program uses the windows thumbnail preview code to overlay a customisable window over your game. Simply launch the program and right click the window where it says. From here you can select your source video, crop the video area and resize and reposition the video overlay. This window will not play audio, so the audio will simply come from the source program. Think of it as a mirror of a video you are running elsewhere on your PC.

Will this affect my FPS?
Well yes. Depending on your rig it will impact performance to some degree. Youtube particularly seems to impact ETS, however, you can get round this by using VLC to play the YT video using the "open network stream" command. Google that if you need any help with it but it's pretty simple to do, just remember to paste your YT link without a timestamp.
You can see my rig stats on my profile page for comparison. When running VLC or Himovies in Brave my FPS is around 100-144 depending on area, time of day and weather. Youtube can drop that down to 90-100 presuming a 1080p vid. I've yet to test Twitch but I expect the performance to be on par with Youtube. There's probably a way to direct a Twitch stream through VLC though so try that.

Further information.
So you've hit some snags, let's see if I can help.

VLC is pausing video but not audio if you minimize it. This is a limitation of Ontopreplica. Simply keep VLC non minimized in the background.

When watching a video in a web browser, it turns grey when tabbing back into game. This is a "feature" of some browsers, notably Chrome and browsers based on it such as Brave, that won't render the video if the browser isn't in focus. This feature is known as Window Occlusion and can be disabled. Simply navigate to chrome://flags or brave://flags, ctrl F and find occlusion and disable the option. If you use another browser, I don't so can't really help. Google how to disable window occlusion in that browser or use Chrome or Brave for the purpose of watching vids while gaming.

If this helped, know that I'm glad to have shared the knowledge.

Charon.
Feb 2022 Chrome Update fix
So it's Feb 2022 and it just stopped working. You can blame the latest Chrome update for that. However, here we are with some fixes. (Thanks Reddit user q1k)

Option 1. Tested and working for me. Simply go into your browser's flags page and temporarily unexpire M96 flags. Restart your browser. Go back into flags and disable window occlusion as before. Done.

Option 2. In your browser shortcut target field add the following
--disable-backgrounding-occluded-windows
Untested but probably works.

Option 3 is a registry edit. Copypasta from Reddit.

Open Registry Editor
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome
if there are keys (folders) missing, just create a new key
Under Chrome key add new DWORD with name NativeWindowOcclusionEnabled and value 0
Create a second one with name WindowOcclusionEnabled and value 0
Or copy the following into a new Notepad document, save with a .reg extension and run

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome]
"NativeWindowOcclusionEnabled"=dword:00000000
"WindowOcclusionEnabled"=dword:00000000

-------------------------

Remember, Chrome will continue to break this from time to time because they don't seem to care that people might not want their windows occluded. If it breaks, I'll try find a fix.
If you're using brave, just replace any instances of Chrome with Brave, it functions the same.
Thanks. :)
March 2022 Chrome update fix.
Well dangit, Chrome went and removed the useful M96 flags huh and now your fun is ruined once again. Why can't they leave it alone?

Well, good news my dudes. We can fix this. Now we'll have to fall back on the shortcut trick.
Find the shortcut you use to launch your browser. Right click it and choose properties. Locate the "Target" field. It will have a bunch of text that ends in a "
After this " add a space and paste the following
--disable-backgrounding-occluded-windows

And boom, we're back, for now, but given Google's obsession with disabling this functionality it'll probably break again eventually.

Cheers everyone. Happy truckin'.
9 Comments
Charon  [author] 9 Apr, 2024 @ 7:26am 
Thanks for the heads up. XD
As more and more updates fiddle with this feature simply checking for occlusion on the flags of your chosen browser is the best way of staying on top of it.
zepos 8 Apr, 2024 @ 5:55pm 
Hi guys anyone who wants to do it now, can just go to chrome://flags/#calculate-native-win-occlusion and disable "calculate windows occlusions" im pretty sure it works on other browsers too.
spsps 13 Dec, 2022 @ 9:48am 
--disable-backgrounding-occluded-windows

this works in microsoft edge, just letting know, thx mate:)
Gear 6 Oct, 2021 @ 10:03pm 
good guide
HuGHOSTxてなし 13 Sep, 2021 @ 6:22pm 
asta
wilgotnyheniek 12 Sep, 2021 @ 11:14am 
:CorpsWarning: DO NOT TRY THIS AT HOME, YOU CAN CRASH YOUR VEHICLE :CorpsWarning:
😈_KAMIKADZE_😈 12 Sep, 2021 @ 5:47am 
,:hittheroad:
Charon  [author] 5 Sep, 2021 @ 2:40am 
Should be able to, yes.