--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1290,11 +1290,75 @@
 #endif
 }
 
+/* Everstra: the arguments over an inherited descriptor instead of the command
+ * line. "ffmpeg -everstra_args_fd N" reads every further argument from
+ * descriptor N, each one ended by a NUL byte, up to end of file; the camera
+ * login, the stream key and an audio token in them then never show in
+ * /proc/<pid>/cmdline, which other apps on the camera can read. */
+#define EVERSTRA_ARGS_MAX_BYTES 65536
+#define EVERSTRA_ARGS_MAX_COUNT 256
+
+static int everstra_args_from_fd(const char *fd_str, int *pargc, char ***pargv)
+{
+    char *end = NULL, *buf, **argv;
+    long fd = strtol(fd_str, &end, 10);
+    size_t len = 0, i;
+    int argc = 1;
+
+    if (!*fd_str || *end || fd < 3 || fd > 1023)
+        return -1;
+    buf = av_malloc(EVERSTRA_ARGS_MAX_BYTES + 1);
+    if (!buf) {
+        close((int)fd);
+        return -1;
+    }
+    for (;;) {
+        ssize_t r = read((int)fd, buf + len, EVERSTRA_ARGS_MAX_BYTES + 1 - len);
+        if (r < 0 && errno == EINTR)
+            continue;
+        if (r < 0)
+            goto fail;
+        if (r == 0)
+            break;
+        len += (size_t)r;
+        if (len > EVERSTRA_ARGS_MAX_BYTES)
+            goto fail;
+    }
+    close((int)fd);
+    if (!len || buf[len - 1] != '\0')
+        goto fail_closed;
+    for (i = 0; i < len; i++)
+        if (buf[i] == '\0' && ++argc > EVERSTRA_ARGS_MAX_COUNT)
+            goto fail_closed;
+    argv = av_malloc_array(argc + 1, sizeof(*argv));
+    if (!argv)
+        goto fail_closed;
+    argv[0] = (*pargv)[0];
+    argc = 1;
+    for (i = 0; i < len; i += strlen(buf + i) + 1)
+        argv[argc++] = buf + i;
+    argv[argc] = NULL;
+    *pargc = argc;
+    *pargv = argv;
+    return 0;
+fail:
+    close((int)fd);
+fail_closed:
+    av_free(buf);
+    return -1;
+}
+
 int main(int argc, char **argv)
 {
     int ret, err_rate_exceeded;
     BenchmarkTimeStamps ti;
 
+    if (argc == 3 && !strcmp(argv[1], "-everstra_args_fd") &&
+        everstra_args_from_fd(argv[2], &argc, &argv) < 0) {
+        fprintf(stderr, "Cannot read the arguments from descriptor %s\n", argv[2]);
+        return 1;
+    }
+
     init_dynload();
 
     setvbuf(stderr,NULL,_IONBF,0); /* win32 runtime needs this */
