@@ -29,14 +29,10 @@ package export_SVCD;
2929 @_ # allows user-specified attributes to override the defaults
3030 };
3131 bless ($self , $class );
32- # Make sure that we have an mp2 encoder
33- $Prog {mp2_encoder } = find_program(' toolame' );
3432 # Make sure that we have an mplexer
3533 $Prog {mplexer } = find_program(' tcmplex' , ' mplex' );
3634 push @{$self -> {errors }}, ' You need tcmplex or mplex to export an svcd.' unless ($Prog {mplexer });
3735 # Make sure that we have the other necessary programs
38- find_program(' mpeg2enc' )
39- or push @{$self -> {errors }}, ' You need mpeg2enc to export an svcd.' ;
4036 find_program(' yuvscaler' )
4137 or push @{$self -> {errors }}, ' You need yuvscaler to export an svcd.' ;
4238 # Do we have yuvdenoise?
@@ -178,22 +174,9 @@ package export_SVCD;
178174 }
179175 }
180176 # Now we fork off a process to encode the audio
181- if ($Prog {mp2_encoder } =~ / \b toolame$ / ) {
182- # Resample audio?
183- if ($nuv_info {audio_sample_rate } != 44100) {
184- $command = " nice -n 19 sox -t raw -r $nuv_info {audio_sample_rate} -s -w -c 2 $self ->{fifodir}/audout -t raw -r 44100 -s -w -c 2 - resample"
185- ." | nice -n 19 toolame -s 44.1 -m j -b $self ->{a_bitrate} - $self ->{tmp_a}" ;
186- }
187- # Audio is the proper sample rate
188- else {
189- $command = " nice -n 19 toolame -s 44.1 -m j -b $self ->{a_bitrate} $self ->{fifodir}/audout $self ->{tmp_a}" ;
190- }
191- }
192- else {
193- $command = " nice -n 19 ffmpeg -f s16le -ar $nuv_info {audio_sample_rate} -ac 2 -i $self ->{fifodir}/audout -ar 44100 -ab $self ->{a_bitrate} -vn -f mp2 $self ->{tmp_a}" ;
194- }
177+ $command = " nice -n 19 ffmpeg -f s16le -ar $nuv_info {audio_sample_rate} -ac 2 -i $self ->{fifodir}/audout -ar 44100 -ab $self ->{a_bitrate} -vn -f mp2 $self ->{tmp_a}" ;
195178 if ($DEBUG ) {
196- print " \n toolame command:\n\n $command \n " ;
179+ print " \n audio command:\n\n $command \n " ;
197180 }
198181 else {
199182 push @{$self -> {children }}, fork_command($command );
@@ -208,25 +191,27 @@ package export_SVCD;
208191 $command = " nice -n 19 ffmpeg -f rawvideo -s $nuv_info {width}x$nuv_info {height} -r $nuv_info {fps} -i $self ->{fifodir}/vidout -f yuv4mpegpipe -" ;
209192 # Certain options for PAL
210193 if ($nuv_info {fps } =~ / ^2(?:5|4\. 9)/ ) {
211- $command .= " | nice -n 19 yuvdenoise -r 16" if ($self -> {noise_reduction });
194+ $command .= " | nice -n 19 yuvdenoise -F - r 16" if ($self -> {noise_reduction });
212195 $command .= " | nice -n 19 yuvscaler -v 0 -n p -M BICUBIC -O SVCD" ;
213196 $framerate = 3;
214197 }
215198 # Other options for NTSC
216199 else {
217200 # SOMEDAY I'd like to be able to get 3:2 pulldown working properly....
218201 # $command .= " | yuvkineco -F 1" if ($pulldown);
219- $command .= " | nice -n 19 yuvdenoise -r 16" if ($self -> {noise_reduction });
202+ $command .= " | nice -n 19 yuvdenoise -F - r 16" if ($self -> {noise_reduction });
220203 $command .= " | nice -n 19 yuvscaler -v 0 -n n -M BICUBIC -O SVCD" ;
221204 $framerate = 4;
222205 }
223206 # Finish building $command, and execute it
224207 $command .= " | nice -n 19 mpeg2enc --format 5 --quantisation $self ->{quantisation} --quantisation-reduction 2"
225208 ." --video-bitrate $self ->{v_bitrate} --aspect 2 --frame-rate $framerate "
226209 # .($pulldown ? ' --frame-rate 1 --3-2-pulldown' : " --frame-rate $framerate")
227- ." --interlace-mode 1 --motion-search-radius 24 --video-buffer 230"
210+ # ." --interlace-mode 1 --motion-search-radius 24 --video-buffer 230"
211+ ." --interlace-mode 0 --video-buffer 230"
228212 ." --nonvideo-bitrate $self ->{a_bitrate} --sequence-length 795"
229- ." --reduction-4x4 1 --reduction-2x2 1 --keep-hf"
213+ # ." --reduction-4x4 1 --reduction-2x2 1 --keep-hf"
214+ ." --reduction-4x4 2 --reduction-2x2 1"
230215 .($cpus > 1 ? " --multi-thread $cpus " : ' ' )
231216 ." -o $self ->{tmp_v}" ;
232217 if ($DEBUG ) {
0 commit comments