[Libav-user] Dshow errors when trying to record desktop in Win 10
Casey Price
cprice1317 at gmail.com
Mon Dec 14 20:18:08 CET 2015
Hello,
I'm currently trying to record the desktop of a surface pro 3 running
windows 10 using screen-capture-recorder and ffmpeg. The following works in
the command line.
ffmpeg -f dshow -video_size 1280x853 -i video=screen-capture-recorder
output.mpg
However when I try to do the same in code I get the error
'[dshow] Could not set video options'
Which only happens when set the video_size option by doing the following:
av_dict_set(&dictionary, "video_size", "1280x853", NULL);
if ((ret = avformat_open_input(&ifmt_ctx, input_device, inputFormat,
&dictionary)) < 0) {
printf("Cannot open input file\n");
return ret;
}
I've also noticed that screen-capture-recorder says it only supports up to
1280x853 video size when doing -list_options, even though the resolution of
the tablet in windows is 1920x1280, I think this is due to some software
scaling that is going on with the surface, but not entirely certain because
the command line arguments that I posted above that works only records the
top left portion of the screen.
Also, if I don't specify the video_size in the dictionary, the recording
works but only records a portion of the desktop.
Has anyone had an issue like this before? I'm not entirely certain if the
issue lies with windows 10, directshow, screen-capture-recorder, or if I'm
just doing something wrong in my code.
Thanks,
Casey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20151214/3c9941ff/attachment.html>
More information about the Libav-user
mailing list