Skip to content

Commit 7a66db1

Browse files
committed
Apply patch to close #2842. Apply changes from patch to other files that used tcmplex, too, so that everything should now use mplex.
1 parent 2e13181 commit 7a66db1

File tree

4 files changed

+26
-25
lines changed

4 files changed

+26
-25
lines changed

nuvexport/export/transcode/DVCD.pm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ package export::transcode::DVCD;
3737
$self->init_transcode();
3838

3939
# Make sure that we have an mplexer
40-
find_program('tcmplex')
41-
or push @{$self->{'errors'}}, 'You need tcmplex to export a dvcd.';
40+
find_program('mplex')
41+
or push @{$self->{'errors'}}, 'You need mplex to export a dvcd.';
4242

4343
# Any errors? disable this function
4444
$self->{'enabled'} = 0 if ($self->{'errors'} && @{$self->{'errors'}} > 0);
@@ -81,10 +81,10 @@ package export::transcode::DVCD;
8181
# Execute the parent method
8282
$self->SUPER::export($episode, ".$$");
8383
# Multiplex the streams
84-
my $command = "$NICE tcmplex -m v $ntsc"
85-
.' -i '.shell_escape($self->get_outfile($episode, ".$$.m1v"))
86-
.' -p '.shell_escape($self->get_outfile($episode, ".$$.mpa"))
87-
.' -o '.shell_escape($self->get_outfile($episode, '.mpg'));
84+
my $command = "$NICE mplex -f 1 -C"
85+
.' -o '.shell_escape($self->get_outfile($episode, '.mpg'))
86+
.' '.shell_escape($self->get_outfile($episode, ".$$.m1v"))
87+
.' '.shell_escape($self->get_outfile($episode, ".$$.mpa"));
8888
system($command);
8989
}
9090

nuvexport/export/transcode/DVD.pm

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ package export::transcode::DVD;
4444
$self->init_transcode();
4545

4646
# Make sure that we have an mplexer
47-
find_program('tcmplex')
48-
or push @{$self->{'errors'}}, 'You need tcmplex to export a dvd.';
47+
find_program('mplex')
48+
or push @{$self->{'errors'}}, 'You need mplex to export a dvd.';
4949

5050
# Any errors? disable this function
5151
$self->{'enabled'} = 0 if ($self->{'errors'} && @{$self->{'errors'}} > 0);
@@ -134,7 +134,6 @@ package export::transcode::DVD;
134134
$self->{'width'} = 720;
135135
$self->{'height'} = ($standard eq 'PAL') ? '576' : '480';
136136
$self->{'out_fps'} = ($standard eq 'PAL') ? 25 : 29.97;
137-
my $ntsc = ($standard eq 'PAL') ? '' : '-N';
138137
# Build the transcode string
139138
$self->{'transcode_xtra'} = " -y mpeg2enc,mp2enc"
140139
.' -F 8,"-q '.$self->{'quantisation'}
@@ -146,10 +145,10 @@ package export::transcode::DVD;
146145
# Execute the parent method
147146
$self->SUPER::export($episode, ".$$");
148147
# Multiplex the streams
149-
my $command = "$NICE tcmplex -m d $ntsc"
150-
.' -i '.shell_escape($self->get_outfile($episode, ".$$.m2v"))
151-
.' -p '.shell_escape($self->get_outfile($episode, ".$$.mpa"))
152-
.' -o '.shell_escape($self->get_outfile($episode, '.mpg'));
148+
my $command = "$NICE mplex -f 8 -V"
149+
.' -o '.shell_escape($self->get_outfile($episode, '.mpg'))
150+
.' '.shell_escape($self->get_outfile($episode, ".$$.m2v"))
151+
.' '.shell_escape($self->get_outfile($episode, ".$$.mpa"));
153152
system($command);
154153
}
155154

nuvexport/export/transcode/SVCD.pm

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ package export::transcode::SVCD;
4343
# Initialize and check for transcode
4444
$self->init_transcode();
4545

46+
# Make sure that we have an mplexer
47+
find_program('mplex')
48+
or push @{$self->{'errors'}}, 'You need mplex to export an svcd.';
49+
4650
# Any errors? disable this function
4751
$self->{'enabled'} = 0 if ($self->{'errors'} && @{$self->{'errors'}} > 0);
4852
# Return
@@ -167,11 +171,10 @@ package export::transcode::SVCD;
167171
print "Not splitting because combined file size of chunks is < ".(0.97 * $self->{'split_every'} * 1024 * 1024).", which is the requested split size.\n";
168172
}
169173
# Multiplex the streams
170-
my $command = "$NICE tcmplex -m s $ntsc"
171-
.($split_file ? ' -F '.shell_escape($split_file) : '')
172-
.' -i '.shell_escape($self->get_outfile($episode, ".$$.m2v"))
173-
.' -p '.shell_escape($self->get_outfile($episode, ".$$.mpa"))
174-
.' -o '.shell_escape($self->get_outfile($episode, $split_file ? '..mpg' : '.mpg'));
174+
my $command = "$NICE mplex -f 4 -V"
175+
.' -o '.shell_escape($self->get_outfile($episode, $split_file ? '.%d.mpg' : '.mpg'));
176+
.' '.shell_escape($self->get_outfile($episode, ".$$.m2v"))
177+
.' '.shell_escape($self->get_outfile($episode, ".$$.mpa"));
175178
system($command);
176179
}
177180

nuvexport/export/transcode/VCD.pm

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ package export::transcode::VCD;
3737
$self->init_transcode();
3838

3939
# Make sure that we have an mplexer
40-
find_program('tcmplex')
41-
or push @{$self->{'errors'}}, 'You need tcmplex to export a vcd.';
40+
find_program('mplex')
41+
or push @{$self->{'errors'}}, 'You need mplex to export a vcd.';
4242

4343
# Any errors? disable this function
4444
$self->{'enabled'} = 0 if ($self->{'errors'} && @{$self->{'errors'}} > 0);
@@ -102,11 +102,10 @@ package export::transcode::VCD;
102102
print "Not splitting because combined file size of chunks is < ".(0.97 * $self->{'split_every'} * 1024 * 1024).", which is the requested split size.\n";
103103
}
104104
# Multiplex the streams
105-
my $command = "$NICE tcmplex -m v $ntsc"
106-
.($split_file ? ' -F '.shell_escape($split_file) : '')
107-
.' -i '.shell_escape($self->get_outfile($episode, ".$$.m1v"))
108-
.' -p '.shell_escape($self->get_outfile($episode, ".$$.mpa"))
109-
.' -o '.shell_escape($self->get_outfile($episode, $split_file ? '..mpg' : '.mpg'));
105+
my $command = "$NICE mplex -f 1 -C"
106+
.' -o '.shell_escape($self->get_outfile($episode, $split_file ? '.%d.mpg' : '.mpg'));
107+
.' '.shell_escape($self->get_outfile($episode, ".$$.m1v"))
108+
.' '.shell_escape($self->get_outfile($episode, ".$$.mpa"));
110109
system($command);
111110
}
112111

0 commit comments

Comments
 (0)