[mythtv] [PATCH] nuvexport mpeg2cut

maestro waggawagga at gmx.net
Sat Oct 16 18:18:50 UTC 2004


hi all, 

ok this is my first try with a patch at all so please be patient.
i created it through:

LC_ALL=C TZ=UTC0 diff -Naur mpeg2cut /usr/local/bin/mpeg2cut 

is this the prefered/correct action to create a patch?

so here's the story
i installed nuvexport and wanted to do a mpeg2->mpeg2 (recorded by a
pvr250) conversion but ended up with: 

Finding the AV Offset to use with lvemux:./mpeg2cut: line 86: -1 * :
syntax error: operand expected (error token is " ")

this is because OFFSET is an empty string as "grep av_fine_ms" doesnt
return a line of the tcprobe output.
tcprobe -i /var/lib/mythtv/1_20041010201500_20041010223000.nuv 
[tcprobe] MPEG program stream (PS)
[tcprobe] summary for
/var/lib/mythtv/1_20041010201500_20041010223000.nuv, (*) = not default,
0 = not detected
import frame size: -g 720x576 [720x576] 
     aspect ratio: 4:3 (*)
       frame rate: -f 25.000 [25.000] frc=3 
                   PTS=0.4004, frame_time=40 ms, bitrate=6000 kbps
      audio track: -a 0 [0] -e 48000,16,2 [48000,16,2] -n 0x50 [0x2000]
(*)
                   PTS=0.3206, bitrate=384 kbps

this patch simply checks if OFFSET contains anything and just in this
case multiplies it.

here we go:

--- mpeg2cut    2004-08-22 04:11:48.000000000 +0000
+++ /usr/local/bin/mpeg2cut     2004-10-16 18:10:11.000000000 +0000
@@ -83,7 +83,10 @@
 echo -n Finding the AV Offset to use with lvemux:
 OFFSET=`(tcprobe -i ${FILENAME} 2> /dev/null) | grep av_fine_ms | \
     sed -e 's/^.*av_fine_ms //' | cut -d " " -f 1`
+if [ .${OFFSET}. != .. ]
+then
 OFFSET=$((-1 * ${OFFSET}))
+fi;
 echo ${OFFSET}
 
 echo -n Finding framerate:

so long
maestro






More information about the mythtv-dev mailing list