Ticket #3064: mencoder-xvid.patch

File mencoder-xvid.patch, 2.2 KB (added by devsk, 17 years ago)

Xvid.pm patch for mencoder

  • mencoder/XviD.pm

    old new  
    119119        my $self    = shift;
    120120        my $episode = shift;
    121121    # Build the mencoder string
    122         my $params = " -ovc xvid -vop scale=$self->{'width'}:$self->{'height'}"
     122        my $params = " -ovc xvid -vf scale=$self->{'width'}:$self->{'height'}"
     123
    123124        #." -N 0x55" # make *sure* we're exporting mp3 audio
    124125
    125126        #." -oac mp3lame -lameopts vbr=3:br=$self->{'a_bitrate'}"
     
    138139            print "First pass...\n";
    139140            $self->{'mencoder_xtra'} = "  $params"
    140141                                       ." -passlogfile /tmp/xvid.$$.log"
    141                                        ." -nosound"
    142                                        ." -xvidencopts bitrate=$self->{'v_bitrate'}:pass=1 ";
     142                                       ." -oac copy"
     143                                       ." -xvidencopts bitrate=$self->{'v_bitrate'}:pass=1:quant_type=mpeg:threads=2:keyframe_boost=10:kfthreshold=1:kfreduction=20 ";
    143144            $self->SUPER::export($episode, '', 1);
    144145        # Restore the path
    145146            $self->{'path'} = $path_bak;
    146147        # Second pass
    147148            print "Final pass...\n";
    148149            $self->{'mencoder_xtra'} = " $params"
    149                                        ." -oac mp3lame -lameopts vbr=3:br=$self->{'a_bitrate'}"
     150                                       ." -oac mp3lame -lameopts cbr:br=$self->{'a_bitrate'}"
    150151                                       ." -passlogfile /tmp/xvid.$$.log"
    151                                        ." -xvidencopts bitrate=$self->{'v_bitrate'}:pass=2 ";
     152                                       ." -xvidencopts bitrate=$self->{'v_bitrate'}:pass=2:quant_type=mpeg:threads=2:keyframe_boost=10:kfthreshold=1:kfreduction=20 ";
    152153        }
    153154    # Single pass
    154155        else {
    155156            $self->{'mencoder_xtra'} = " $params"
    156                                        ." -oac mp3lame -lameopts vbr=3:br=$self->{'a_bitrate'}";
     157                                       ." -oac mp3lame -lameopts cbr:br=$self->{'a_bitrate'}";
    157158            if ($self->{'quantisation'}) {
    158159                $self->{'mencoder_xtra'} .= " -xvidencopts fixed_quant=".$self->{'quantisation'};
    159160            }