Skip to content

Commit

Permalink
fix some stuff missing from the previous commits (bug fixes, typos)
Browse files Browse the repository at this point in the history
  • Loading branch information
ex-nerd committed Dec 27, 2004
1 parent 9e9ece4 commit 71f9b82
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 7 deletions.
2 changes: 1 addition & 1 deletion trunk/export/DVCD.pm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ package export::DVCD;
# Add the temporary files that will need to be deleted
push @tmpfiles, $self->get_outfile($episode, ".$$.m1v"), $self->get_outfile($episode, ".$$.mpa");
# Execute the parent method
$self->SUPER::export($episode);
$self->SUPER::export($episode, ".$$");
# Multiplex the streams
my $command = "nice -n $Args{'nice'} tcmplex -m v"
.' -i '.shell_escape($self->get_outfile($episode, ".$$.m1v"))
Expand Down
2 changes: 1 addition & 1 deletion trunk/export/DVD.pm
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ package export::DVD;
# Add the temporary files that will need to be deleted
push @tmpfiles, $self->get_outfile($episode, ".$$.m2v"), $self->get_outfile($episode, ".$$.mpa");
# Execute the parent method
$self->SUPER::export($episode);
$self->SUPER::export($episode, ".$$");
# Multiplex the streams
my $command = "nice -n $Args{'nice'} tcmplex -m d"
.' -i '.shell_escape($self->get_outfile($episode, ".$$.m2v"))
Expand Down
20 changes: 18 additions & 2 deletions trunk/export/SVCD.pm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ package export::SVCD;
'crop' => 1,
# SVCD-specific settings
'quantisation' => 5, # 4 through 6 is probably right...
'split_every' => 795, # Split every 795 megs
'a_bitrate' => 192,
'v_bitrate' => 2500,
};
Expand Down Expand Up @@ -108,6 +109,11 @@ package export::SVCD;
}
}
}
# Split every # megs?
$self->{'split_every'} = query_text('Split after how many MB?',
'int',
$self->{'split_every'});
$self->{'split_every'} = 795 if ($self->{'split_every'} < 1);
}

sub export {
Expand All @@ -125,12 +131,22 @@ package export::SVCD;
# Add the temporary files that will need to be deleted
push @tmpfiles, $self->get_outfile($episode, ".$$.m2v"), $self->get_outfile($episode, ".$$.mpa");
# Execute the parent method
$self->SUPER::export($episode);
$self->SUPER::export($episode, ".$$");
# Create the split file?
my $split_file;
if ((-s $self->get_outfile($episode, ".$$.m2v") + -s $self->get_outfile($episode, ".$$.mpa") / 0.97 > $self->{'split_every'} * 1024 * 1024) {
$split_file = "/tmp/nuvexport-svcd.split.$$.$self->{'split_every'}";
open(DATA, ">$split_file") or die "Can't write to $split_file: $!\n\n";
print DATA "maxFileSize = $self->{'split_every'}\n";
close DATA;
push @tmpfiles, $split_file;
}
# Multiplex the streams
my $command = "nice -n $Args{'nice'} tcmplex -m s"
.($split_file ? ' -F '.shell_escape($split_file) : '')
.' -i '.shell_escape($self->get_outfile($episode, ".$$.m2v"))
.' -p '.shell_escape($self->get_outfile($episode, ".$$.mpa"))
.' -o '.shell_escape($self->get_outfile($episode, '.mpg'));
.' -o '.shell_escape($self->get_outfile($episode, $split_file ? '..mpg' : '.mpg'));
system($command);
}

Expand Down
21 changes: 19 additions & 2 deletions trunk/export/VCD.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ package export::VCD;
'denoise' => 1,
'deinterlace' => 1,
'crop' => 1,
# VCD-specific settings
'split_every' => 795, # Split every 795 megs
};
bless($self, $class);

Expand All @@ -46,6 +48,11 @@ package export::VCD;
my $self = shift;
# Load the parent module's settings
$self->SUPER::gather_settings();
# Split every # megs?
$self->{'split_every'} = query_text('Split after how many MB?',
'int',
$self->{'split_every'});
$self->{'split_every'} = 795 if ($self->{'split_every'} < 1);
}

sub export {
Expand All @@ -61,12 +68,22 @@ package export::VCD;
# Add the temporary files that will need to be deleted
push @tmpfiles, $self->get_outfile($episode, ".$$.m1v"), $self->get_outfile($episode, ".$$.mpa");
# Execute the parent method
$self->SUPER::export($episode);
$self->SUPER::export($episode, ".$$");
# Create the split file?
my $split_file;
if ((-s $self->get_outfile($episode, ".$$.m2v") + -s $self->get_outfile($episode, ".$$.mpa") / 0.97 > $self->{'split_every'} * 1024 * 1024) {
$split_file = "/tmp/nuvexport-svcd.split.$$.$self->{'split_every'}";
open(DATA, ">$split_file") or die "Can't write to $split_file: $!\n\n";
print DATA "maxFileSize = $self->{'split_every'}\n";
close DATA;
push @tmpfiles, $split_file;
}
# Multiplex the streams
my $command = "nice -n $Args{'nice'} tcmplex -m v"
.($split_file ? ' -F '.shell_escape($split_file) : '')
.' -i '.shell_escape($self->get_outfile($episode, ".$$.m1v"))
.' -p '.shell_escape($self->get_outfile($episode, ".$$.mpa"))
.' -o '.shell_escape($self->get_outfile($episode, '.mpg'));
.' -o '.shell_escape($self->get_outfile($episode, $split_file ? '..mpg' : '.mpg'));
system($command);
}

Expand Down
3 changes: 2 additions & 1 deletion trunk/nuvexport.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name: nuvexport
Version: 0.2
Release: cvs20041214
Release: cvs20041226
License: GPL
Summary: mythtv nuv video file conversion script
URL: http://forevermore.net/nuvexport/
Expand All @@ -16,6 +16,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch

# Standard nuvexport modules:
Requires: perl >= 5.6
Requires: transcode >= 0.6.12
Requires: ffmpeg >= 0.4.9
Requires: mjpegtools >= 1.6.2
Expand Down

0 comments on commit 71f9b82

Please sign in to comment.