Skip to content

Commit 56cd3f6

Browse files
committed
better way to detect mpeg stream type that should be language independent
1 parent 5dda1e7 commit 56cd3f6

File tree

4 files changed

+15
-20
lines changed

4 files changed

+15
-20
lines changed

trunk/export/transcode.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ package export::transcode;
246246
# Is an mpeg
247247
else {
248248
$transcode .= " -i $episode->{'filename'} -x ";
249-
if ($episode->{'finfo'}{'mpeg_stream_type'} eq 'pes') {
249+
if ($episode->{'finfo'}{'mpeg_stream_type'} eq 'mpegpes') {
250250
$transcode .= 'vob';
251251
}
252252
else {

trunk/mythtv/nuvinfo.pm

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -184,28 +184,23 @@ package mythtv::nuvinfo;
184184
($info{'audio_bitrate'}) = $data =~ m/^ID_AUDIO_BITRATE=(\d+)/m;
185185
($info{'audio_bits_per_sample'}) = $data =~ m/^AUDIO:.+?ch,\s*[su](8|16)/mi;
186186
($info{'audio_channels'}) = $data =~ m/^ID_AUDIO_NCH=(\d+)/m;
187-
($info{'mpeg_stream_type'}) = $data =~ m/^ID_VIDEO_FPS=(\d+(?:\.\d*)?)/m;
187+
($info{'fps'}) = $data =~ m/^ID_VIDEO_FPS=(\d+(?:\.\d*)?)/m;
188188
($info{'aspect'}) = $data =~ m/^ID_VIDEO_ASPECT=(\d+(?:[\.\,]\d*)?)/m;
189189
($info{'audio_type'}) = $data =~ m/^ID_AUDIO_CODEC=(\d+(?:\.\d*)?)/m;
190+
($info{'mpeg_stream_type'}) = $data =~ m/^ID_DEMUXER=(\w+)/mi;
190191
# Stream type
191-
if ($data =~ m/\bMPEG-(PE?S) file format detected/m) {
192-
$info{'mpeg_stream_type'} = lc($1);
193-
}
194-
elsif ($data =~ m/^TS file format detected/m) {
195-
$info{'mpeg_stream_type'} = 'ts';
196-
}
197-
# French localisation
198-
elsif ($data =~ m/Fichier de type MPEG-(PE?S) détecté./m) {
199-
$info{'mpeg_stream_type'} = lc($1);
200-
}
201-
elsif ($data =~ m/Fichier de type TS détecté./m) {
202-
$info{'mpeg_stream_type'} = 'ts';
192+
$info{'mpeg_stream_type'} = lc($info{'mpeg_stream_type'});
193+
if ($info{'mpeg_stream_type'} && $info{'mpeg_stream_type'} !~ /^mpeg/) {
194+
die "Stream type '$info{'mpeg_stream_type'}' is not an mpeg, and will\n"
195+
."not work with this program.\n";
203196
}
204197
else {
205-
die "Unrecognized mpeg stream type. Please execute the following and see if you\n"
206-
."notice errors (make sure that you don't have the \"really quiet\" option set\n"
207-
."in your mplayer config). If not, email the output to the nuvexport author.\n\n"
208-
." $program -v -v -v -v -nolirc -nojoystick -vo null -ao null -frames 0 -identify '$file'\n\n";
198+
die "Unrecognized stream type. Please execute the following and see if you\n"
199+
."notice errors (make sure that you don't have the \"really quiet\" option\n"
200+
."set in your mplayer config). If not, create a ticket at\n"
201+
."http://svn.mythtv.org/trac/newticket and attach the output from:\n\n"
202+
." $program -v -v -v -v -nolirc -nojoystick -vo null -ao null \\\n"
203+
." -frames 0 -identify '$file'\n\n";
209204
}
210205
# Cleanup
211206
$info{'aspect'} = aspect_str($info{'aspect'});

trunk/nuvexport

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# $Author$
66

77
# Version
8-
$VERSION = '0.3 0.20060419.svn';
8+
$VERSION = '0.3 0.20060420.svn';
99

1010
# Autoflush buffers
1111
$|++;

trunk/nuvexport.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Name: nuvexport
66
Version: 0.3
7-
Release: 0.20060419.svn
7+
Release: 0.20060420.svn
88
License: GPL
99
Summary: mythtv nuv video file conversion script
1010
URL: http://forevermore.net/nuvexport/

0 commit comments

Comments
 (0)