[FFmpeg-user] 2 pass encoding with hevc_nvenc

Reindl Harald h.reindl at thelounge.net
Sun Sep 4 15:03:11 EEST 2016


Am 04.09.2016 um 14:00 schrieb Reindl Harald:
> Am 04.09.2016 um 13:57 schrieb Peter White:
>> But I never saw the point of running two passes to improve the quality
>> of a file encoded with CRF mode. The quality improvement must be very
>> small, I reckon. But the encoding time doubles--not worth it
>
> with smart params it don't double
>
> the first pass can be with a faster profile and skip audio entirely and
> so it's typically around 50% of a normal run and often far below

private $mp4_x264_fastpass_options = array
(
  array('param' => 'f',               'value' => 'ipod'),
  array('param' => 'preset',          'value' => 'veryfast'),
  array('param' => 'codec:v',         'value' => 'libx264'),
  array('param' => 'codec:a',         'value' => 'aac'),
  array('param' => 'strict',          'value' => 'experimental'),
  array('param' => 'cutoff',          'value' => '15000'),
  array('param' => 'flags',           'value' => '+loop+mv4'),
  array('param' => 'cmp',             'value' => '256'),
  array('param' => 'partitions',      'value' => 
'-parti8x8-parti4x4-partp8x8-partb8x8'),
  array('param' => 'me_method',       'value' => 'dia'),
  array('param' => 'me_range',        'value' => '16'),
  array('param' => 'subq',            'value' => '1'),
  array('param' => 'trellis',         'value' => '0'),
  array('param' => 'refs',            'value' => '1'),
  array('param' => 'g',               'value' => '250'),
  array('param' => 'keyint_min',      'value' => '25'),
  array('param' => 'sc_threshold',    'value' => '40'),
  array('param' => 'i_qfactor',       'value' => '0.71'),
  array('param' => 'qcomp',           'value' => '0.6'),
  array('param' => 'qmin',            'value' => '0'),
  array('param' => 'qmax',            'value' => '69'),
  array('param' => 'qdiff',           'value' => '4'),
  array('param' => 'bufsize',         'value' => '2M'),
  array('param' => 'pix_fmt',         'value' => 'yuv420p'),
  array('param' => 'multithreading',  'value' => true),
  array('param' => 'qt_faststart',    'value' => false),
  array('param' => 'flvtool2',        'value' => false),
  array('param' => 'twopass',         'value' => true),
);

private $mp4_x264_slowpass_options = array
  (
   array('param' => 'f',               'value' => 'ipod'),
   array('param' => 'preset',          'value' => 'slow'),
   array('param' => 'codec:v',         'value' => 'libx264'),
   array('param' => 'codec:a',         'value' => 'aac'),
   array('param' => 'strict',          'value' => 'experimental'),
   array('param' => 'cutoff',          'value' => '15000'),
   array('param' => 'flags',           'value' => '+loop+mv4'),
   array('param' => 'cmp',             'value' => '256'),
   array('param' => 'partitions',      'value' => 
'+parti4x4+parti8x8+partp4x4+partp8x8+partb8x8'),
   array('param' => 'me_method',       'value' => 'hex'),
   array('param' => 'me_range',        'value' => '16'),
   array('param' => 'subq',            'value' => '9'),
   array('param' => 'trellis',         'value' => '1'),
   array('param' => 'refs',            'value' => '5'),
   array('param' => 'g',               'value' => '250'),
   array('param' => 'keyint_min',      'value' => '25'),
   array('param' => 'sc_threshold',    'value' => '40'),
   array('param' => 'i_qfactor',       'value' => '0.71'),
   array('param' => 'qcomp',           'value' => '0.6'),
   array('param' => 'qmin',            'value' => '0'),
   array('param' => 'qmax',            'value' => '69'),
   array('param' => 'qdiff',           'value' => '4'),
   array('param' => 'bufsize',         'value' => '2M'),
   array('param' => 'pix_fmt',         'value' => 'yuv420p'),
   array('param' => 'multithreading',  'value' => true),
   array('param' => 'qt_faststart',    'value' => true),
   array('param' => 'movflags',        'value' => '+faststart'),
   array('param' => 'flvtool2',        'value' => false),
   array('param' => 'twopass',         'value' => true),
  );

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20160904/dfd5ce3b/attachment.sig>


More information about the ffmpeg-user mailing list