Skip to content

Commit

Permalink
Remove scaling for yuv420p pix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
kapoorlakshya committed Jul 21, 2024
1 parent e960020 commit 40e6cdf
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/screen-recorder/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,13 @@ class Options
DEFAULT_FPS = 15.0
DEFAULT_MAC_INPUT_PIX_FMT = 'uyvy422'.freeze # For avfoundation
DEFAULT_PIX_FMT = 'yuv420p'.freeze
YUV420P_SCALING = '"scale=trunc(iw/2)*2:trunc(ih/2)*2"'.freeze

def initialize(options)
# @todo Consider using OpenStruct
@all = verify_options options
advanced[:input] = default_advanced_input.merge(advanced_input)
advanced[:output] = default_advanced_output.merge(advanced_output)
advanced[:log] ||= DEFAULT_LOG_FILE

# Fix for using yuv420p pixel format for output
# @see https://www.reck.dk/ffmpeg-libx264-height-not-divisible-by-2/
advanced_output[:vf] = YUV420P_SCALING if advanced_output[:pix_fmt] == 'yuv420p'
end

#
Expand Down

0 comments on commit 40e6cdf

Please sign in to comment.