Apparently you can use .ogv (video) files as textures on objects that support custom textures, such as laptop, TV, PC monitor or some notice boards. Until recently trying to use .ogv as object texture could result in crash, but not anymore. There are however a few things to remember, so it might not actually appear as attractive as it sounds.

1. BIS do not officially use/support this even though the functionality is there, so you are on your own (they did however fix the crash pretty quickly).
2. The sound in not positional and the volume is the same if you are next to the object or miles away.
3. You cannot stop the video once it started playing, but you can know when it is finished.
4. There is currently no way to make video to start on its own on the object, additional UI element must be used to trigger playback.
5. Depending on codec used you might have desync between video and sound.


Ok, here is working code you can just copy paste and start from here:

with uiNamespace do { _tv = "Land_FlatTV_01_F" createVehicle (player modelToWorld [0,0.5,0]); _tv setObjectTexture [0,"\A3\Missions_F_EPA\video\A_in_intro.ogv"]; 1100 cutRsc ["RscMissionScreen","PLAIN"]; _scr = BIS_RscMissionScreen displayCtrl 1100; _scr ctrlSetPosition [-10,-10,0,0]; _scr ctrlSetText "\A3\Missions_F_EPA\video\A_in_intro.ogv"; _scr ctrlAddEventHandler ["VideoStopped", { (uiNamespace getVariable "BIS_RscMissionScreen") closeDisplay 1; }]; _scr ctrlCommit 0; };

When you setObjectTexture on TV, no playback happens, but the texture is loaded. In order to start playback the same texture has to be loaded into RscPicture control, and not just any RscPicture control, but the one that has autoplay = 1; RscMissionScreen display has such control with idc 1100:

class RscMissionScreen { idd = -1; movingEnable = 1; duration = 1e+011; fadein = 0; fadeout = 1; onload = "uinamespace setvariable ['BIS_RscMissionScreen',_this select 0];"; class controls { class Picture_0: RscPicture { idc = 1100; text = ""; x = "safezoneX"; y = "safezoneY"; w = "safezoneW"; h = "safezoneH"; autoplay = 1; loops = 1; }; --- snip ---

Not only this will start your playback automatically, it will also store display object in BIS_RscMissionScreen variable for later use. I’ve also added “VideoStopped” EH to close display. One thing I found out, this EH will start executing each frame after video stopped, so in order to make it execute only once, EH has to be removed or display has to be closed, and this is what I did.

What would I like to see in the future for this functionality? Commands objectTexturePlay and objectTextureStop so there is no need for UI trickery. Positional sound and some way of controlling it, like videoVolume and fadeVideo. Maybe some way of getting current time code of a video and ability to skip to desired time code when starting playback. Anyway, there are probably more important issues that needs to be addressed first, so for now…


P.S. BTW downloaded this big .ogv file and was able to play it, but I think it got out of sync towards the middle.