summaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 2a7038b..40d7cc8 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -160,6 +160,7 @@ static int video_stream_copy = 0;
static char *video_grab_format = "video4linux";
static char *video_device = NULL;
+static int video_channel = 0;
static char *audio_grab_format = "audio_device";
static char *audio_device = NULL;
@@ -1872,6 +1873,11 @@ void opt_video_device(const char *arg)
video_device = strdup(arg);
}
+void opt_video_channel(const char *arg)
+{
+ video_channel = strtol(arg, NULL, 0);
+}
+
void opt_audio_device(const char *arg)
{
audio_device = strdup(arg);
@@ -2463,8 +2469,8 @@ void prepare_grab(void)
if (has_video) {
AVInputFormat *fmt1;
fmt1 = av_find_input_format(video_grab_format);
- vp->device = video_device;
- /* XXX: set DV video channel ? */
+ vp->device = video_device;
+ vp->channel = video_channel;
if (av_open_input_file(&ic, "", fmt1, 0, vp) < 0) {
fprintf(stderr, "Could not find video grab device\n");
exit(1);
@@ -2723,6 +2729,7 @@ const OptionDef options[] = {
{ "minrate", HAS_ARG, {(void*)opt_video_bitrate_min}, "set min video bitrate tolerance (in kbit/s)", "bitrate" },
{ "bufsize", HAS_ARG, {(void*)opt_video_buffer_size}, "set ratecontrol buffere size (in kbit)", "size" },
{ "vd", HAS_ARG | OPT_EXPERT, {(void*)opt_video_device}, "set video grab device", "device" },
+ { "vc", HAS_ARG | OPT_EXPERT, {(void*)opt_video_channel}, "set video grab channel (DV1394 only)", "channel" },
{ "dv1394", OPT_EXPERT, {(void*)opt_dv1394}, "set DV1394 grab", "" },
{ "vcodec", HAS_ARG | OPT_EXPERT, {(void*)opt_video_codec}, "force video codec ('copy' to copy stream)", "codec" },
{ "me", HAS_ARG | OPT_EXPERT, {(void*)opt_motion_estimation}, "set motion estimation method",
OpenPOWER on IntegriCloud