diff --git a/remux.c b/remux.c
index 4b2950f7de04efaa6cfee2c884d1d7b8762170a8..ef6c0d1d36321f344a915a7d11578233ab00c7a9 100644
--- a/remux.c
+++ b/remux.c
@@ -57,6 +57,8 @@ int main(int argc, char *argv[])
 		job_failed("Writing temporary file failed: %s", av_err2str(err));
 	while (!av_read_frame(demux, &pkt))
 	{
+		if (!checktime(30))
+			ping_job(jobid, "running", 0);
 		if (pkt.stream_index >= demux->nb_streams
 				|| idxmap[pkt.stream_index] == -1)
 			continue;
diff --git a/transcode.c b/transcode.c
index 090adcbaa918cd8a05e85f3ea59bfc8a28297e62..ab3581a2b3f0d8e1a39a166028c4740df6b01a16 100644
--- a/transcode.c
+++ b/transcode.c
@@ -1,6 +1,5 @@
 #include <stdio.h>
 #include <unistd.h>
-#include <time.h>
 #include <libavutil/opt.h>
 #include <libavcodec/avcodec.h>
 #include <libavformat/avformat.h>
@@ -245,22 +244,6 @@ void connect_pads(AVFilterInOut **ins, AVFilterInOut **outs)
 	}
 }
 
-int checktime(time_t min)
-{
-	static struct timespec prev = {};
-	time_t delta;
-	struct timespec t;
-	clock_gettime(CLOCK_MONOTONIC, &t);
-	if (t.tv_sec < prev.tv_sec)
-		delta = min;
-	else
-		delta = t.tv_sec - prev.tv_sec;
-	if (delta < min)
-		return 1;
-	memcpy(&prev, &t, sizeof(prev));
-	return 0;
-}
-
 int main(int argc, char *argv[])
 {
 	int err, i, progress, _progress;
diff --git a/util.h b/util.h
index ce56e12dafebc2fabea70ae8886747374ca901c7..434c32f38360e599f630d5a59db3e6cc9f9e6bef 100644
--- a/util.h
+++ b/util.h
@@ -17,6 +17,7 @@ double fileduration(char *path);
 size_t filesize(char *path);
 char *json_fileinfo(char *path);
 void overwrite_check(char *path);
+int checktime(time_t min);
 
 #define WORKER_APIKEY "WORKER_APIKEY"
 #define WORKER_APIBASE "WORKER_APIBASE"
diff --git a/util/checktime.c b/util/checktime.c
new file mode 100644
index 0000000000000000000000000000000000000000..9f28ee66ac00da3f6b21728cfe09814e98fa1fcf
--- /dev/null
+++ b/util/checktime.c
@@ -0,0 +1,21 @@
+#include <time.h>
+#include <string.h>
+
+#include "../util.h"
+
+int checktime(time_t min)
+{
+	static struct timespec prev = {};
+	time_t delta;
+	struct timespec t;
+	clock_gettime(CLOCK_MONOTONIC, &t);
+	if (t.tv_sec < prev.tv_sec)
+		delta = min;
+	else
+		delta = t.tv_sec - prev.tv_sec;
+	if (delta < min)
+		return 1;
+	memcpy(&prev, &t, sizeof(prev));
+	return 0;
+}
+