[FFmpeg-user] Help with -video_size

Roger Pack rogerdpack2 at gmail.com
Fri Jan 6 19:23:58 EET 2017


On 1/6/17, Moritz Barsnick <barsnick at gmx.net> wrote:
> On Fri, Jan 06, 2017 at 00:14:31 -0800, Tim Hiles wrote:
>> I've tried recording my screen set at 1366 x 768 and specified -video_size
>> to 1024x768. The command did create a recording however it did not change
>> the size. The output is below (further comments after the output).
>
> Can you be a bit more clear? Are you trying to record the full 1366x768
> and resize it to 1024x768, or are you trying to capture only 1024x768
> of your screen?
>
>> ffmpeg -rtbufsize 1000M -f dshow -i
>> video="screen-capture-recorder":audio="Internal Mic (IDT High Definiti"
>> -flags +global_header -vcodec libx264 -pix_fmt  yuv420p -video_size
>> 1024x768 -preset ultrafast -acodec aac -ac 1 -ar 22050 "Sessiontest2.mp4"
>
> Since -video_size is an input option, it won't work this way. If you
> want to tell the input to use this size, you need to place it *before*
> the respective "-i"; which you did in your second example:
>
>> ...which is switching -video_size parameter before the codec and apply it
>> to my command this is what I get.
>>
>> ffmpeg -rtbufsize 1000M -f dshow -video_size 1024x768 -i
>> video="screen-capture-recorder":audio="Internal Mic (IDT High Definiti"
>> -flags +global_header -vcodec libx264 -pix_fmt yuv420p -video_size
>> 1024x768 -preset ultrafast -acodec aac -ac 1 -ar 22050 "Sessiontest2.mp4"
>
> The second "-video_size" has no effect, as mentioned above.

Yeah I suppose in the perfect world FFmpeg would at least *complain*
about unused parameters, but it is as Maritz described.

>> [dshow @ 0000000000558fe0] Could not set video options
>> video=screen-capture-recorder:audio=Internal Mic (IDT High Definiti: I/O
>> error
>
> As the documentation says: "If the device does not support the
> requested options, it will fail to open."
>
> I would guess that the "-video_size" option is not supported by
> screen-capture-recorder. Reading about it does confirm this:
>
> https://github.com/rdp/screen-capture-recorder-to-video-windows-free
> See the section "Configuration":
>
>   By default, it captures the "full screen" of the main desktop monitor
>   [...] To configure it differently, run the provided "configuration
>   setup utilities/shortcuts" or adjust registry settings before
>   starting a run (advanced users only) [...]

I think it might respect video_size as well but I'm not certain, and
definitely not sure if it i truncates versus scaled or what not,
anyway you could try it.  Yes, I'm not sure and I wrote it  LOL, guess
it's been awhile.


More information about the ffmpeg-user mailing list