On Sat, Nov 07, 2015 at 10:22:34PM -0300, James Almer wrote: > On 11/7/2015 9:45 PM, Timothy Gu wrote: > > +#define OFFSET(x) offsetof(V210DemuxerContext, x) > > +#define DEC AV_OPT_FLAG_DECODING_PARAM > > +static const AVOption v210_options[] = { > > + { "video_size", "set frame size", OFFSET(width), > > AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0, DEC }, > > Isn't this what -s is for? > > ffmpeg -s 1280x720 -f v210 -i INPUT
Well -s is only available for ffmpeg.c, unless I'm mistaken. > > Also, in any case you're missing height. AV_OPT_TYPE_IMAGE_SIZE works in an unorthodox way: it fills *(&width) with the width and *(&width + 1) with the height. See https://github.com/FFmpeg/FFmpeg/blob/master/libavutil/opt.c#L269 In the struct an `int height;` follows `int width;`, so this should work fine. > > > + { "framerate", "set frame rate", OFFSET(framerate), > > AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, 0, DEC }, > > Same here, -r. Assuming it works for the input stream. Ditto. Timothy _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel