How to record a specific window using ffmpeg?

前端 未结 6 829
说谎
说谎 2021-02-18 18:41

I use ffmpeg to record a window using this code:

ffmpeg.exe
-f dshow 
-y 
-i video=\"screen-capture-recorder\":audio=\"virtual-audio-capturer\":audio=\"Microphon         


        
6条回答
  •  眼角桃花
    2021-02-18 19:03

    It has mentioned in here:

    By default, it captures the "full screen" of the main desktop monitor (all windows, overlapping, from there, with aero if vista+, without transparent windows if non aero).

    To configure it differently, run the provided "configuration setup utilities/shortcuts" or adjust registry settings before starting a run (advanced users only):

    HKEY_CURRENT_USER\Software\screen-capture-recorder

    with DWORD keys respected of start_XXX etc …​ (see the included file {installdir}\configuration_setup_utility\setup_screen_tracker_params.rb for the full list of registry key values available, or see https://github.com/rdp/screen-capture-recorder-to-video-windows-free/blob/master/configuration_setup_utility/setup_screen_tracker_params.rb#L9 )

    ex: see configuration_setup_utility\incoming.reg file (though NB that those values are in hex, so editing that file is a bit tedious-- I always just use regedit or the accompanying script utilities and don’t edit it by hand).

    To "reset" a value delete its key.

    And you can see in here that there are these registery options:

    • capture_height
    • capture_width
    • start_x
    • start_y
    • default_max_fps
    • stretch_to_width
    • stretch_to_height
    • stretch_mode_high_quality_if_1
    • hwnd_to_track
    • disable_aero_for_vista_plus_if_1
    • track_new_x_y_coords_each_frame_if_1
    • capture_mouse_default_1
    • capture_foreground_window_if_1
    • dedup_if_1
    • millis_to_sleep_between_poll_for_dedupe_changes
    • capture_transparent_windows_including_mouse_in_non_aero_if_1_causes_annoying_mouse_flicker
    • hwnd_to_track_with_window_decoration

提交回复
热议问题