[FFmpeg-user] Help with -video_size
Moritz Barsnick
barsnick at gmx.net
Fri Jan 6 17:11:07 EET 2017
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.
> [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) [...]
If you only want a segment of your desktop, you can let dshow capture
the complete 1366x768, and have ffmpeg crop the video to the part you
want to preserve. Insert (e.g.) "-vf crop=x=0:y=0:w=1024:h=768".
Cheers,
hope this helps,
Moritz
More information about the ffmpeg-user
mailing list