| Module | FFMpeg::VideoAdvancedOptions |
| In: |
lib/ffmpeg/video_advanced_options.rb
|
Use qp factor between P- and B-frames
# File lib/ffmpeg/video_advanced_options.rb, line 97
97: def b_frame_factor(factor)
98: FFMpegCommand << "-b_qfactor #{factor}"
99: end
Use qp offset between P- and B-frames
# File lib/ffmpeg/video_advanced_options.rb, line 107
107: def b_frame_offset(offset)
108: FFMpegCommand << "-b_qoffset #{offset}"
109: end
Use ‘frames’ B-frames (supported for MPEG-1, MPEG-2 and MPEG-4).
# File lib/ffmpeg/video_advanced_options.rb, line 188
188: def b_frames(frames)
189: FFMpegCommand << "-bf #{frames}"
190: end
Calculate PSNR of compressed frames.
# File lib/ffmpeg/video_advanced_options.rb, line 242
242: def calculate_psnr
243: FFMpegCommand << "-psnr"
244: end
Set DCT algorithm to algo. Available values are:
`0' FF_DCT_AUTO (default) `1' FF_DCT_FASTINT `2' FF_DCT_INT `3' FF_DCT_MMX `4' FF_DCT_MLIB `5' FF_DCT_ALTIVEC
# File lib/ffmpeg/video_advanced_options.rb, line 148
148: def dct_algorithm(algorithm)
149: FFMpegCommand << "-dct_algo #{algorithm}"
150: end
Deinterlace pictures.
# File lib/ffmpeg/video_advanced_options.rb, line 230
230: def deinterlace
231: FFMpegCommand << "-deinterlace"
232: end
Dump video coding statistics to `vstats_HHMMSS.log’ or the supplied file.
# File lib/ffmpeg/video_advanced_options.rb, line 247
247: def dump_video_statistics(file = nil)
248: unless file.nil?
249: FFMpegCommand << "-vstats_file #{file}"
250: else
251: FFMpegCommand << "-vstats"
252: end
253: end
Enable Advanced intra coding (h263+).
# File lib/ffmpeg/video_advanced_options.rb, line 220
220: def enable_advanced_intra_coding
221: FFMpegCommand << "-aic"
222: end
Enable Unlimited Motion Vector (h263+)
# File lib/ffmpeg/video_advanced_options.rb, line 225
225: def enable_unlimited_motion_vector
226: FFMpegCommand << "-umv"
227: end
Set error concealment to bit_mask. bit_mask is a bit mask of the following values:
`1' FF_EC_GUESS_MVS (default = enabled) `2' FF_EC_DEBLOCK (default = enabled)
# File lib/ffmpeg/video_advanced_options.rb, line 183
183: def error_concealment(mask)
184: FFMpegCommand << "-ec #{mask}"
185: end
Set error resilience to n.
`1' FF_ER_CAREFUL (default) `2' FF_ER_COMPLIANT `3' FF_ER_AGGRESSIVE `4' FF_ER_VERY_AGGRESSIVE
# File lib/ffmpeg/video_advanced_options.rb, line 175
175: def error_resilience(number)
176: FFMpegCommand << "-er #{number}"
177: end
Set the group of pictures size.
# File lib/ffmpeg/video_advanced_options.rb, line 14
14: def group_of_pictures_size(size)
15: FFMpegCommand << "-g #{size}"
16: end
Use qp factor between P- and I-frames
# File lib/ffmpeg/video_advanced_options.rb, line 102
102: def i_frame_factor(factor)
103: FFMpegCommand << "-i_qfactor #{factor}"
104: end
Use qp offset between P- and I-frames
# File lib/ffmpeg/video_advanced_options.rb, line 112
112: def i_frame_offset(offset)
113: FFMpegCommand << "-i_qoffset #{offset}"
114: end
Set IDCT algorithm to algo. Available values are:
`0' FF_IDCT_AUTO (default) `1' FF_IDCT_INT `2' FF_IDCT_SIMPLE `3' FF_IDCT_SIMPLEMMX `4' FF_IDCT_LIBMPEG2MMX `5' FF_IDCT_PS2 `6' FF_IDCT_MLIB `7' FF_IDCT_ARM `8' FF_IDCT_ALTIVEC `9' FF_IDCT_SH4 `10' FF_IDCT_SIMPLEARM
# File lib/ffmpeg/video_advanced_options.rb, line 165
165: def idct_algorithm(algorithm)
166: FFMpegCommand << "-idct_algo #{algorithm}"
167: end
Use initial complexity for single pass encoding
# File lib/ffmpeg/video_advanced_options.rb, line 92
92: def initial_complexity(complexity)
93: FFMpegCommand << "-rc_init_cplx #{complexity}"
94: end
Force interlacing support in encoder (MPEG-2 and MPEG-4 only). Use this option if your input file is interlaced and you want to keep the interlaced format for minimum losses. The alternative is to deinterlace the input stream with `-deinterlace’, but deinterlacing introduces losses.
# File lib/ffmpeg/video_advanced_options.rb, line 237
237: def interlacing_support
238: FFMpegCommand << "-ilme"
239: end
Macroblock decision mode
`0' FF_MB_DECISION_SIMPLE: Use mb_cmp (cannot change it yet in FFmpeg). `1' FF_MB_DECISION_BITS: Choose the one which needs the fewest bits. `2' FF_MB_DECISION_RD: rate distortion
# File lib/ffmpeg/video_advanced_options.rb, line 197
197: def macroblock_decision_mode(mode)
198: FFMpegCommand << "-mbd #{mode}"
199: end
Set motion estimation method to method. Available methods are (from lowest to best quality):
`zero' - Try just the (0, 0) vector. `phods' `log' `x1' `hex' `umh' `epzs' - (default method) `full' - exhaustive search (slow and marginally better than epzs)
# File lib/ffmpeg/video_advanced_options.rb, line 136
136: def motion_estimation_method(method)
137: FFMpegCommand << "-me_method #{method}"
138: end
Set pixel format. Use ‘list’ as parameter to show all the supported pixel formats.
# File lib/ffmpeg/video_advanced_options.rb, line 4 4: def pixel_format(format) 5: FFMpegCommand << "-pix_fmt #{format}" 6: end
Set rate control equation (see section 3.11 FFmpeg formula evaluator) (default = tex^qComp).
# File lib/ffmpeg/video_advanced_options.rb, line 117
117: def rate_control_equation(equation)
118: FFMpegCommand << "-rc_eq string"
119: end
Set rate control override for specific intervals
# File lib/ffmpeg/video_advanced_options.rb, line 122
122: def rate_control_override(override)
123: FFMpegCommand << "-rc_override #{override}"
124: end
Show QP histogram.
# File lib/ffmpeg/video_advanced_options.rb, line 265
265: def show_qp_histogram
266: FFMpegCommand << "-qphist"
267: end
How strictly to follow the standards.
# File lib/ffmpeg/video_advanced_options.rb, line 215
215: def strictness(strictness)
216: FFMpegCommand << "-strict #{strictness}"
217: end
Set SwScaler flags (only available when compiled with swscale support).
# File lib/ffmpeg/video_advanced_options.rb, line 9
9: def swscaler_flags(flags)
10: FFMpegCommand << "-sws_flags #{flags}"
11: end
Use data partitioning (MPEG-4 only).
# File lib/ffmpeg/video_advanced_options.rb, line 207
207: def use_data_partitioning
208: FFMpegCommand << "-part"
209: end
Use four motion vector by macroblock (MPEG-4 only).
# File lib/ffmpeg/video_advanced_options.rb, line 202
202: def use_four_motion_vector
203: FFMpegCommand << "-4mv"
204: end
Use only intra frames.
# File lib/ffmpeg/video_advanced_options.rb, line 19
19: def use_only_intra_frames
20: FFMpegCommand << "-intra"
21: end
Bitstream filters available are "dump_extra", "remove_extra", "noise", "h264_mp4toannexb", "imxdump" and "mjpegadump".
# File lib/ffmpeg/video_advanced_options.rb, line 271
271: def video_bitstream_filter(filter)
272: FFMpegCommand << "-vbsf #{filter}"
273: end
Discard threshold.
# File lib/ffmpeg/video_advanced_options.rb, line 24
24: def video_discard_threshold(number)
25: FFMpegCommand << "-vdt #{number}"
26: end
Use max video lagrange factor (VBR)
This option uses ‘lambda’ units, but you may use the QP2LAMBDA constant to easily convert from ‘q’ units:
ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
# File lib/ffmpeg/video_advanced_options.rb, line 71
71: def video_maximum_lagrange_factor(lambda)
72: FFMpegCommand << "-lmax #{lambda}"
73: end
Use maximum macroblock quantizer scale (VBR).
This option uses ‘lambda’ units, but you may use the QP2LAMBDA constant to easily convert from ‘q’ units:
ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
# File lib/ffmpeg/video_advanced_options.rb, line 87
87: def video_maximum_macroblock_scale(lambda)
88: FFMpegCommand << "-mblmax #{lambda}"
89: end
Use maximum difference between the quantizer scales (VBR)
# File lib/ffmpeg/video_advanced_options.rb, line 44
44: def video_maximum_quantizer_difference(diff)
45: FFMpegCommand << "-qdiff #{diff}"
46: end
Use maximum video quantizer scale (VBR)
# File lib/ffmpeg/video_advanced_options.rb, line 39
39: def video_maximum_quantizer_scale(scale)
40: FFMpegCommand << "-qmax #{scale}"
41: end
Use minimum video lagrange factor (VBR)
This option uses ‘lambda’ units, but you may use the QP2LAMBDA constant to easily convert from ‘q’ units:
ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
# File lib/ffmpeg/video_advanced_options.rb, line 63
63: def video_minimum_lagrange_factor(lambda)
64: FFMpegCommand << "-lmin #{lambda}"
65: end
Use minimum macroblock quantizer scale (VBR)
This option uses ‘lambda’ units, but you may use the QP2LAMBDA constant to easily convert from ‘q’ units:
ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
# File lib/ffmpeg/video_advanced_options.rb, line 79
79: def video_minimum_macroblock_scale(lambda)
80: FFMpegCommand << "-mblmin #{lambda}"
81: end
Use minimum video quantizer scale (VBR)
# File lib/ffmpeg/video_advanced_options.rb, line 34
34: def video_minimum_quantizer_scale(scale)
35: FFMpegCommand << "-qmin #{scale}"
36: end
Use fixed video quantizer scale (VBR).
# File lib/ffmpeg/video_advanced_options.rb, line 29
29: def video_quantizer_scale(scale)
30: FFMpegCommand << "-qscale #{scale}"
31: end
Use video quantizer scale blur (VBR) (range 0.0 - 1.0)
# File lib/ffmpeg/video_advanced_options.rb, line 49
49: def video_quantizer_scale_blur(blur)
50: FFMpegCommand << "-qblur #{blur}"
51: end