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

Casey Price cprice1317 at gmail.com
Wed Dec 16 15:58:13 CET 2015


I'm running ffmpeg 2.8.1 (I think, I know its not the latest since I
grabbed it in October).

I was able to resolve the issue by turning off screen-scaling in windows.
By default its set to 150% on the surface Pro 3. If I didn't set a
video_size the recording with screen scaling on it would only record a
small portion of the top left hand corner of the screen (1280x853), so I
believe the issue is with Dshow and screen scaling in windows 10 not
playing together nicely.

This fix works for me, but it would be nice if capturing would work with
screen-scaling on since its quite hard to use the tablet with it off.

On Tue, Dec 15, 2015 at 7:22 PM, Roger Pack <rogerdpack2 at gmail.com> wrote:

> 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
> >
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20151216/7099c893/attachment.html>


More information about the Libav-user mailing list