Jump to content
EveMakya

Video Playback Drastically Sped Up when Using BIS_fnc_playVideo

Recommended Posts

I am designing a horror themed operation and needed a cut scene for my big bad's evil speech. I cut together a video and put it in the .ogv video format and am calling it via a trigger and a script.
The script moves the players to specific spots and faces them, disables their simulation and damage, plays the video, times music to play in sync with a specific point of the video, and then re-enables their damage and simulation. Everything is moving perfectly and is timed up with uIsleeps with the exception of the video itself.
The video appears to be playing back at a speed ratio of almost 2:1. The audio sounds normal, but the visuals are incredibly sped up and the video ends drastically ahead of schedule, cutting the audio out when the visuals finish.
I've tried calling the video in two different ways, the first being:
["videos\TimorSpeech.ogv"] call BIS_fnc_playvideo; 

and the second:
["videos\TimorSpeech.ogv"] remoteExec ["BIS_fnc_playVideo", ([0, -2] select isDedicated)];

Both work in calling the video, both result in the same issue. The playback of the video is remarkably consistent and is ending at about the same time each time. I have nothing in the script or the trigger that should be adjusting time speed or scale. 
Below is the entirety of the script. The script is called with  
execVM "scripts\BigBad.sqf";

Any idea why the video playback would be so accelerated or how I might remedy it? Also please forgive the lack of a for loop here, I know it's not as streamlined but I suck at building for loops and was just operating for something that worked out the gate.

//Set position and direction of hitman teams
zCurator setPos [2373, 6767, 5];
if (!isNil "H1Actual") then {H1Actual setDir 0; H1Actual setPos [2373, 6767, 0];} else {};
if (!isNil "H12IC") then {H12IC setDir 0; H12IC setPos [2373.5, 6765, 0]} else {};
if (!isNil "H1Medic") then {H1Medic setDir 0; H1Medic setPos [2373, 6769, 0]} else {};
if (!isNil "H1Operator") then {H1Operator setDir 0; H1Operator setPos [2372, 6763, 0]} else {};
if (!isNil "H2TL") then {H2TL setDir 0; H2TL setPos [2376.9, 6766.8, 0]} else {};
if (!isNil "H22IC") then {H22IC setDir 0; H22IC setPos [2375, 6766, 0]} else {};
if (!isNil "H2Medic") then {H2Medic setDir 0; H2Medic setPos [2374, 6764,0]} else {};
if (!isNil "H2Operator") then {H2Operator setDir 0; H2Operator setPos [2374, 6762,0]} else {};
//Disable Simulation of Hitman teams
if (!isNil "H1Actual") then {H1Actual enableSimulationGlobal False; H1Actual allowdamage False;} else {};
if (!isNil "H12IC") then {H12IC enableSimulationGlobal False; H12IC allowdamage false;} else {};
if (!isNil "H1Medic") then {H1Medic enableSimulationGlobal False; H1Medic allowdamage False;} else {};
if (!isNil "H1Operator") then {H1Operator enableSimulationGlobal False; H1Operator allowdamage False;} else {};
if (!isNil "H2TL") then {H2TL enableSimulationGlobal False; H2TL allowdamage False;} else {};
if (!isNil "H22IC") then {H22IC enableSimulationGlobal False; H22IC allowdamage False;} else {};
if (!isNil "H2Medic") then {H2Medic enableSimulationGlobal False; H2Medic allowdamage False;} else {};
if (!isNil "H2Operator") then {H2Operator enableSimulationGlobal False; H2Operator allowdamage False;} else {};
"Simulation Disabled, Video Playing" remoteExec ["Hint", zCurator];
//UiSleep combined duration of cut scene, broken up for timing of music track with video.
["videos\TimorSpeech.ogv"] remoteExec ["BIS_fnc_playVideo", ([0, -2] select isDedicated)];
uiSleep 254;
playMusic ["BossBattle", 1];
"Music Playing" remoteExec ["Hint", zCurator];
uiSleep 39;
//Enable Simulation and Damage of Hitman teams
if (!isNil "H1Actual") then {H1Actual enableSimulationGlobal True; H1Actual allowdamage True;} else {};
if (!isNil "H12IC") then {H12IC enableSimulationGlobal True; H12IC allowdamage True;} else {};
if (!isNil "H1Medic") then {H1Medic enableSimulationGlobal True; H1Medic allowdamage True;} else {};
if (!isNil "H1Operator") then {H1Operator enableSimulationGlobal True; H1Operator allowdamage True;} else {};
if (!isNil "H2TL") then {H2TL enableSimulationGlobal True; H2TL allowdamage True;} else {};
if (!isNil "H22IC") then {H22IC enableSimulationGlobal True; H22IC allowdamage True;} else {};
if (!isNil "H2Medic") then {H2Medic enableSimulationGlobal True; H2Medic allowdamage True;} else {};
if (!isNil "H2Operator") then {H2Operator enableSimulationGlobal True; H2Operator allowdamage True;} else {};
"Simulation Enabled" remoteExec ["Hint", zCurator];
uiSleep 1;
"BigBad Script has Executed" remoteExec ["Hint", zCurator];

 

Share this post


Link to post
Share on other sites

FOUND THE SOLUTION ON MY OWN. 

It's a framerate issue. I exported the video file at 30 FPS originally before conversion. The 60FPS file plays normally. I'm still working to confirm that it works for all players with the new export, will update this when I'm able. 

Share this post


Link to post
Share on other sites

Hey there.

 

I don't think it's an FPS related issue. I have the same problem here. My video is about 1 minute and 41 seconds long, and plays in 10 seconds by speeding up the video and not the audio. I exported the video in 24 FPS originally, then in 60 FPS (both of these were exported before being converted to OGVs) and both have the same issue. Did you change anything in your script or code? Or was it solely the framerate change?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×