diff -Nru acidrip-0.14/debian/changelog acidrip-0.14/debian/changelog --- acidrip-0.14/debian/changelog 2008-04-06 21:09:14.000000000 -0400 +++ acidrip-0.14/debian/changelog 2008-04-06 21:09:14.000000000 -0400 @@ -1,3 +1,10 @@ +acidrip (0.14-0.2ubuntu6) hardy; urgency=low + + * debian/patches/04_add_x264_support adapted from LP: #182999 + * Thanks to Brian Neltner for the patch. + + -- Andy Matteson Sun, 06 Apr 2008 20:58:16 -0400 + acidrip (0.14-0.2ubuntu5) gutsy; urgency=low [ Paul David Bartell ] diff -Nru /tmp/rdyCeXIoL7/acidrip-0.14/debian/patches/00list /tmp/tZS95CFMWz/acidrip-0.14/debian/patches/00list --- acidrip-0.14/debian/patches/00list 2008-04-06 21:09:14.000000000 -0400 +++ acidrip-0.14/debian/patches/00list 2008-04-06 21:09:14.000000000 -0400 @@ -1,4 +1,5 @@ 01_xvid_options 02_fix_mencoder_output 03_crop_detection +04_add_x264_support diff -Nru /tmp/rdyCeXIoL7/acidrip-0.14/debian/patches/04_add_x264_support.dpatch /tmp/tZS95CFMWz/acidrip-0.14/debian/patches/04_add_x264_support.dpatch --- acidrip-0.14/debian/patches/04_add_x264_support.dpatch 1969-12-31 19:00:00.000000000 -0500 +++ acidrip-0.14/debian/patches/04_add_x264_support.dpatch 2008-04-06 21:09:14.000000000 -0400 @@ -0,0 +1,105 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_add_x264_support.dpatch by Andy Matteson , original patch author Brian Neltner from LP #182999 +## +## All lines beginning with ## DP:' are a description of the patch. +## DP: Add x264 video encoding support. + +@DPATCH@ + +diff -Nru acidrip-0.14.orig/AcidRip/acidrip.pm acidrip-0.14/AcidRip/acidrip.pm +--- acidrip-0.14.orig/AcidRip/acidrip.pm 2008-04-06 20:41:19.000000000 -0400 ++++ acidrip-0.14/AcidRip/acidrip.pm 2008-04-06 20:49:18.000000000 -0400 +@@ -218,10 +218,13 @@ + $menc{'video'} .= ":pass=$::settings->{'video_pass'}" if $::settings->{'video_passes'} > 1; + } + if ( $::settings->{'video_codec'} eq 'xvid' ) { +- $menc{'video'} = "-ovc xvid -xvidencopts bitrate=$::settings->{'video_bitrate'}"; +- $menc{'video'} .= ":$::settings->{'xvid_options'}" if $::settings->{'xvid_options'} ne ""; ++ $menc{'video'} = "-ovc xvid -xvidencopts $::settings->{'xvid_options'}:bitrate=$::settings->{'video_bitrate'}"; + $menc{'video'} .= ":pass=$::settings->{'video_pass'}" if $::settings->{'video_passes'} > 1; + } ++ if ( $::settings->{'video_codec'} eq 'x264' ) { ++ $menc{'video'} = "-ovc x264 -x264encopts $::settings->{'x264_options'}:bitrate=$::settings->{'video_bitrate'}"; ++ $menc{'video'} .= ":pass=$::settings->{'video_pass'}" if $::settings->{'video_passes'} > 1; ++ } + if ( $::settings->{'video_codec'} eq 'nuv' ) { + $menc{'video'} = "-ovc nuv -nuvopts $::settings->{'nuv_options'}"; + } +@@ -258,7 +261,7 @@ + $menc{'basename'} = substitute_filename( $::settings->{'filename'} ); + $menc{'basename'} = $menc{'basename'} . "-" . $::settings->{'this_block'} if $::settings->{'this_block'}; + +- $menc{'output'} = $::settings->{'video_pass'} == 1 ? "/dev/null" : $menc{'basename'} . ( $::settings->{'mpegfile'} ? ".mpg" : ".avi" ); ++ $menc{'output'} = $::settings->{'video_pass'} == 1 ? "temp.avi" : $menc{'basename'} . ( $::settings->{'mpegfile'} ? ".mpg" : ".avi" ); + + $menc{'af'} = $::settings->{'audio_gain'} == 0 ? "" : "-af volume=" . $::settings->{'audio_gain'} . ":sc"; + $menc{'af'} = '' if ( $::settings->{'selected_audio'} == -2 ); +@@ -681,7 +684,7 @@ + message( "Running " . get_command("cropdetect") ); + open( CROP, get_command("cropdetect") . " 2>&1 |" ); + while () { +- if ( $_ =~ /Crop area.*\s(crop=\d*:\d*:\d*:\d*)/ ) { $crop{$1}++ } ++ if ( $_ =~ /crop area.*\s(crop=\d*:\d*:\d*:\d*)/ ) { $crop{$1}++ } + $crop_output .= $_; + gui_check($_); + } +@@ -760,7 +763,7 @@ + my $message = "Encoding film"; + $message .= ", Block " . $::settings->{'this_block'} . " of " . $::settings->{'total_blocks'} if $::settings->{'this_block'} > 0; + +- my $twopassable = ( $::settings->{'video_codec'} eq "lavc" || $::settings->{'video_codec'} eq "divx4" || $::settings->{'video_codec'} eq "xvid" ); ++ my $twopassable = ( $::settings->{'video_codec'} eq "lavc" || $::settings->{'video_codec'} eq "divx4" || $::settings->{'video_codec'} eq "xvid" || $::settings->{'video_codec'} eq "x264"); + + $::playlist->append( "unlink frameno.avi 2> /dev/null", 'system', "Removing frameno.avi if it exists" ) + if $::settings->{'this_block'} == 1 || $::settings->{'total_blocks'} == 1; +@@ -864,7 +867,7 @@ + if ( $::settings->{'mencoder_pid'} = open( MENCODER, "$menc 2>&1 |" ) ) { + $/ = "\r"; + while () { +- if (/^Pos:\s*(\d+)(?:.\d)?s\s+(\d+)f\s+\(\s*(\d+)%\)\s+(\d+(?:\.\d+)fps)\sTrem:\s+(\d+min)\s+(\d+mb).+\[([\d:]+)\]/) { ++ if (/^Pos:\s*(\d+).\ds\s+(\d+)f\s+\(\s*(\d+)%\)\s+(\d+fps)\sTrem:\s+(\d+min)\s+(\d+mb).+\[([\d:]+)\]/) { + if ( $1 ne $sec ) { $sec = $1; $::widgets->{'menc_seconds'}->set_text( hhmmss($1) ) } + if ( $4 ne $fps ) { $fps = $4; $::widgets->{'menc_fps'}->set_text($4) } + if ( $6 ne $size ) { $size = $6; $::widgets->{'menc_filesize'}->set_text($6) } +@@ -914,8 +917,9 @@ + 'audio_lavc_options' => 'acodec=mp3:abitrate=128', + 'video_codec' => 'lavc', + 'lavc_options' => 'vcodec=mpeg4:vhq:v4mv:vqmin=2', ++ 'x264_options' => 'subq=6:me=3:frameref=5:bframes=3:weight_b:turbo=2:psnr:keyint=125', + 'divx4_options' => '', +- 'xvid_options' => 'chroma_opt:vhq=4:bvhq=1:quant_type=mpeg', ++ 'xvid_options' => '', + 'vuv_options' => '', + 'video_options' => '', + 'video_bitrate' => 0, +@@ -998,16 +1002,7 @@ + + sub save_settings { + my $settings = shift; +- my @save = ( +- 'dvd_device', 'filesize', 'filename', 'audio_codec', 'audio_mp3lame_options', 'audio_lavc_options', +- 'video_codec', 'scale_enable', 'autoload', 'mpegfile', 'eject', 'scale_auto', +- 'scale_height', 'scale_width', 'crop_enable', 'language', 'mencoder', 'mplayer', +- 'lsdvd', 'tooltips', 'video_passes', 'video_bitrate_lock', 'lavc_options', 'xvid_options', +- 'divx4_options', 'more_options', 'total_blocks', 'overwrite', 'cache', 'cache_directory', +- 'vf_pre_enable', 'audio_gain', 'vf_post_enable', 'vf_pre', 'vf_post', 'del_cache', +- 'ppc_bug', 'compact', 'flickbook_preview', 'enforce_space', 'vobsubout', 'video_bitrate', +- 'ui_language' +- ); ++ my @save = ( 'dvd_device', 'filesize', 'filename', 'audio_codec', 'audio_mp3lame_options', 'audio_lavc_options', 'video_codec', 'scale_enable', 'autoload', 'mpegfile', 'eject', 'scale_auto', 'scale_height', 'scale_width', 'crop_enable', 'language', 'mencoder', 'mplayer', 'lsdvd', 'tooltips', 'video_passes', 'video_bitrate_lock', 'lavc_options', 'xvid_options', 'x264_options', 'divx4_options', 'more_options', 'total_blocks', 'overwrite', 'cache', 'cache_directory', 'vf_pre_enable', 'audio_gain', 'vf_post_enable', 'vf_pre', 'vf_post', 'del_cache', 'ppc_bug', 'compact', 'flickbook_preview', 'enforce_space', 'vobsubout', 'video_bitrate', 'ui_language' ); + if ( open( CONFIGFILE, '>', "$ENV{HOME}/.acidriprc" ) ) { + foreach my $key (@save) { + print CONFIGFILE "$key = $settings->{$key}\n" if $settings->{$key} ne ''; + +diff -Nru acidrip-0.14.orig/AcidRip/signals.pm acidrip-0.14/AcidRip/signals.pm +--- acidrip-0.14.orig/AcidRip/signals.pm 2004-07-25 09:28:45.000000000 -0400 ++++ acidrip-0.14/AcidRip/signals.pm 2008-04-06 20:42:05.000000000 -0400 +@@ -332,7 +332,7 @@ + + if ( $name eq "video_codec" ) { + message( $::settings->{'available_video'}{$value} ); +- my $enable = ( $value eq "lavc" || $value eq "xvid" || $value eq "divx4" ); ++ my $enable = ( $value eq "lavc" || $value eq "xvid" || $value eq "divx4" || $value eq "x264"); + $::widgets->{'video_bitrate_entry'}->set_sensitive($enable); + $::widgets->{'video_bitrate_label'}->set_sensitive($enable); + $::widgets->{'video_bitrate_lock_check'}->set_sensitive($enable);