Class: EhbrsRubyUtils::Videos2::Unsupported::Fixes::SupportedCodec::FfmpegArgs

Inherits:
Object
  • Object
show all
Defined in:
lib/ehbrs_ruby_utils/videos2/unsupported/fixes/supported_codec/ffmpeg_args.rb

Constant Summary collapse

FORMATS =
{
  i: :index,
  f: :target_codec,
  t: :codec_type_letter
}.freeze
SOURCE_COMMON_ARGS =
['-%tcodec:%i', '%f'].freeze
SOURCE_AUDIO_ARGS =
SOURCE_COMMON_ARGS
SOURCE_SUBTITLE_ARGS =
SOURCE_COMMON_ARGS
SOURCE_VIDEO_ARGS =
SOURCE_COMMON_ARGS + ['-crf', '17', '-filter:%t', 'format=yuv420p']
TARGET_CODECS =
{
  audio: 'aac',
  video: 'libx264',
  subtitle: 'ass'
}.freeze

Instance Method Summary collapse

Instance Method Details

#resultArray<String>

Returns:

  • (Array<String>)


30
31
32
# File 'lib/ehbrs_ruby_utils/videos2/unsupported/fixes/supported_codec/ffmpeg_args.rb', line 30

def result
  source_args_by_codec_type.map { |arg| target_arg(arg) }
end