aboutsummaryrefslogtreecommitdiff
path: root/args.c
diff options
context:
space:
mode:
Diffstat (limited to 'args.c')
-rw-r--r--args.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/args.c b/args.c
index 54fa956..124661a 100644
--- a/args.c
+++ b/args.c
@@ -36,12 +36,12 @@ void print_usage(char *name)
printf("\t%s\n", name);
printf("\t-c <codec> - The codec to be used for encoding\n");
printf("\t\t Available codecs: mpeg4, h264, h265, h263, xvid, mpeg2, mpeg1, vp8, vp9\n");
- printf("\t-d use dmabuf instead of mmap\n");
- printf("\t-m <device> - video encoder device (e.g. /dev/video33)\n");
+ printf("\t-d <device> - video encoder device (e.g. /dev/video0)\n");
printf("\t-w video width\n");
printf("\t-h video height\n");
printf("\t-f save encoded frames on disk\n");
printf("\t-g disable test pattern generator\n");
+ printf("\t-n number of frames to encode (default 100)");
printf("\t-v verbose mode\n");
printf("\t-B bitrate\n");
printf("\t-F framerate\n");
@@ -84,16 +84,16 @@ int parse_args(struct instance *i, int argc, char **argv)
init_to_defaults(i);
- while ((c = getopt(argc, argv, "w:h:c:d:m:f:n:gvB:F:b:")) != -1) {
+ i->video.name = "/dev/video0";
+ i->num_frames_to_save = 100;
+
+ while ((c = getopt(argc, argv, "w:h:c:d:f:n:gvB:F:b:")) != -1) {
switch (c) {
case 'c':
i->codec = get_codec(optarg);
i->codec_name = optarg;
break;
case 'd':
- i->use_dmabuf = 1;
- break;
- case 'm':
i->video.name = optarg;
break;
case 'w':
@@ -133,11 +133,6 @@ int parse_args(struct instance *i, int argc, char **argv)
}
}
- if (!i->video.name) {
- err("The following arguments are required: -m -c");
- return -1;
- }
-
if (!i->codec) {
err("Unknown or not set codec (-c)");
return -1;