diff --git a/libobs/obs-video.c b/libobs/obs-video.c
index f975f74acce33d7c3c1319f996fff5afe6613888..691ed08b3b47b8d6be7bf994392b11a5fca90af5 100644
--- a/libobs/obs-video.c
+++ b/libobs/obs-video.c
@@ -15,6 +15,9 @@
along with this program. If not, see .
******************************************************************************/
+#include
+#include
+
#include "obs.h"
#include "obs-internal.h"
#include "graphics/vec4.h"
@@ -599,6 +602,8 @@ void *obs_video_thread(void *param)
"obs_video_thread(%g"NBSP"ms)", interval / 1000000.);
profile_register_root(video_thread_name, interval);
+ srand((unsigned int)time(NULL));
+
while (!video_output_stopped(obs->video.video)) {
uint64_t frame_start = os_gettime_ns();
uint64_t frame_time_ns;