YanYatCheng 96 Posted March 15, 2021 -SOLVED- I'd like to play a video on a screen in editor, I've searched for multiple sources and solutions and failed to make it work so far, so please don't reply "there's alot of tutorial if you just google it" I've tried to use scripts from: https://www.youtube.com/watch?v=Gewndfow7lk&ab_channel=KillzoneKid https://www.youtube.com/watch?v=Oypa1peiBYQ&ab_channel=ArturMerc but everytime I've tried to load I get a DirectX11 E_INVALIDARG crash instantly. Until I try this, and very old script: https://www.armaholic.com/page.php?id=29895 I've managed to play the sound with the video, but the video is corrupted like this below: The script have 3 ogv files for example, every one works as intended, but when I replace any ogv files with the video I want to use (ogv of course), the video corrupts, but will still play and you can see something moving in the video. Anyone know how to fix this? or have a better way to play a video in game? Thanks in advance. Share this post Link to post Share on other sites
stanhope 412 Posted March 15, 2021 Could you share the code you're using? It looks like you've copied some BB code from the error message. 1 Share this post Link to post Share on other sites
YanYatCheng 96 Posted March 16, 2021 On 3/15/2021 at 5:47 PM, stanhope said: Could you share the code you're using? It looks like you've copied some BB code from the error message. The code can be downloaded from the armaholic link, there's a bunch of scripts and files. And the same error code appears even when the video playes normally. So I guess there's nothing to do with that. Share this post Link to post Share on other sites
stanhope 412 Posted March 16, 2021 There's an error in the script TV\Youtube\Scripts\action1.sqf contains: tv setobjecttextureglobal [0,"TV\Youtube\Videos\action1.ogv"]; ["TV\Youtube\Videos\action1.ogv",[10,10]] spawn bis_fnc_playvideo; [/code] tv say3D 'bip'; that [/code] needs to be removed. Share this post Link to post Share on other sites
YanYatCheng 96 Posted March 16, 2021 On 3/16/2021 at 8:49 AM, stanhope said: There's an error in the script TV\Youtube\Scripts\action1.sqf contains: tv setobjecttextureglobal [0,"TV\Youtube\Videos\action1.ogv"]; ["TV\Youtube\Videos\action1.ogv",[10,10]] spawn bis_fnc_playvideo; [/code] tv say3D 'bip'; that [/code] needs to be removed. That error message is removed, but the video is still corrupted I've downloaded a ogv player and the video seems fine with the provided one Share this post Link to post Share on other sites
YanYatCheng 96 Posted April 8, 2021 still unsolved. Share this post Link to post Share on other sites
pierremgi 4926 Posted April 10, 2021 Digging in function viewer , author: Reyhard and following KK's blog, if your ogv is OK and the path (to root) is OK, then you can play any ogv vide on screens like: Land_TripodScreen_01_large_F or laptop like: Land_Laptop_03_olive_F, or.... even on the hull of a vehicle like Hunter.. 😉 if you pay attention for the texture number (0 or 1, or...). Of course the texture must be present in the config of the object (hiddenSelections). For example, the Land_MultiScreenComputer_01_black_F (Rugged Multi-Screen Computer (Black)) has 3 screens (so 3 textures) In config viewer, there are 4 hidden selections: hiddenSelections[] = {"Camo_1","Screen_1","Screen_2","Screen_3"}; So, for displaying something on its central screen, use the selection 2. (here 0 is the computer case) Now, - name your object (here TV, in init field of a Land_TripodScreen_01_large_F... or a hunter) - apply this kind of code in a radio trigger (or else) : TV call { params ["_TV"]; _TV setObjectTexture [0,"\a3\ui_f\video\spotlight_1_EastWind.ogv"]; comment '_TV say3d ["",50] // I didnt use it '; uiNameSpace setVariable ["myTVnbr1",_TV]; with uiNamespace do { disableSerialization; 1100 cutRsc ["RscMissionScreen","PLAIN"]; private _scr = BIS_RscMissionScreen displayCtrl 1100; _scr ctrlSetPosition [-10,-10,0,0]; _scr ctrlSetText "\a3\ui_f\video\spotlight_1_EastWind.ogv"; _scr ctrlCommit 0; _scr ctrlAddEventHandler ["VideoStopped", { private _TV = uiNameSpace getVariable ["myTVnbr1",objNull]; _TV setObjectTexture [0,"\a3\ui_f\video\spotlight_1_EastWind.ogv"]; uiNameSpace setVariable ["myTVnbr1",nil]; (uiNamespace getVariable "BIS_RscMissionScreen") closeDisplay 1; }]; }; }; So, the remaining question is: is your .ogv workable? See also. 1 Share this post Link to post Share on other sites
YanYatCheng 96 Posted April 11, 2021 On 4/10/2021 at 3:13 AM, pierremgi said: Digging in function viewer , author: Reyhard and following KK's blog, if your ogv is OK and the path (to root) is OK, then you can play any ogv vide on screens like: Land_TripodScreen_01_large_F or laptop like: Land_Laptop_03_olive_F, or.... even on the hull of a vehicle like Hunter.. 😉 if you pay attention for the texture number (0 or 1, or...). Of course the texture must be present in the config of the object (hiddenSelections). For example, the Land_MultiScreenComputer_01_black_F (Rugged Multi-Screen Computer (Black)) has 3 screens (so 3 textures) In config viewer, there are 4 hidden selections: hiddenSelections[] = {"Camo_1","Screen_1","Screen_2","Screen_3"}; So, for displaying something on its central screen, use the selection 2. (here 0 is the computer case) Now, - name your object (here TV, in init field of a Land_TripodScreen_01_large_F... or a hunter) - apply this kind of code in a radio trigger (or else) : TV call { params ["_TV"]; _TV setObjectTexture [0,"\a3\ui_f\video\spotlight_1_EastWind.ogv"]; comment '_TV say3d ["",50] // I didnt use it '; uiNameSpace setVariable ["myTVnbr1",_TV]; with uiNamespace do { disableSerialization; 1100 cutRsc ["RscMissionScreen","PLAIN"]; private _scr = BIS_RscMissionScreen displayCtrl 1100; _scr ctrlSetPosition [-10,-10,0,0]; _scr ctrlSetText "\a3\ui_f\video\spotlight_1_EastWind.ogv"; _scr ctrlCommit 0; _scr ctrlAddEventHandler ["VideoStopped", { private _TV = uiNameSpace getVariable ["myTVnbr1",objNull]; _TV setObjectTexture [0,"\a3\ui_f\video\spotlight_1_EastWind.ogv"]; uiNameSpace setVariable ["myTVnbr1",nil]; (uiNamespace getVariable "BIS_RscMissionScreen") closeDisplay 1; }]; }; }; So, the remaining question is: is your .ogv workable? See also. Thankyou very much, it works perfectly. Share this post Link to post Share on other sites