[Libav-user] Dshow errors when trying to record desktop in Win 10

Roger Pack rogerdpack2 at gmail.com
Wed Dec 16 01:22:02 CET 2015


What version of ffmpeg are you using here? You should not have to
specify video_size by default it should capture the whole thing.

On 12/14/15, Casey Price <cprice1317 at gmail.com> wrote:
> 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
>


More information about the Libav-user mailing list