[mythtv] nuvexport mpeg2cut doesn't work on dvb-t mpeg
Thomas Husemann
thomas at thusemann.dyndns.org
Thu Nov 18 07:22:36 UTC 2004
hi all,
I tried to cut my recording with nuexport. The recording was produced by
dvb-t card (AverMedia DVB-T 771). First problem was the Xvfb server. My
solution:
--- mpeg2cut 2004-11-17 11:00:03.000000000 +0000
+++ /usr/bin/mpeg2cut 2004-11-18 06:46:08.000000000 +0000
@@ -113,7 +113,7 @@
if [ .${MODE}. = .Xvfb. ]
then
# Let's start up the Xvfb server
- ${XVFB} :13 -screen 0 640x480x8 2> /dev/null > /dev/null &
+ ${XVFB} :13 -ac -screen 0 640x480x8 2> /dev/null > /dev/null &
XVFB_PID=$!
fi
*Now I run into the next problem:*
nuvexport --debug
...
system call:
mpeg2cut /mnt/store/1006_20041117101800_20041117104500.nuv "./King of
Queens -In Flagranti".mpg 2521-18637 30102-45445 45537-
mpeg2cut v1.6
Using mode Xvfb
Filename "/mnt/store/1006_20041117101800_20041117104500.nuv"
OutFile "./King of Queens -In Flagranti.mpg"
Last GOP index 2521-18637
Cutlist "30102-45445 45537-"
Finding the AV Offset to use with lvemux: -19
Finding framerate: 25.000
Last Frame -221123
Indexing the file with avidemux2
Cutting out commercials with avidemux2
/usr/bin/mpeg2cut: line 178: 28284 Aborted nice -n 19
avidemux2 --load-workbench ${BASENAME}.cut --audio-codec MP2
--save-raw-video ${BASENAME}.m2v --save-raw-audio ${BASENAME}.mp2 --quit
2>/dev/null >/dev/null
Remultiplexing video
GOP timestamps will be rebuild
ERROR: opening A/V streams (0/1)
Cleaning up
rm: cannot remove `1006_20041117101800_20041117104500.mp2': No such file
or directory
*more debug* (with set -x and stderror)
--- mpeg2cut 2004-11-17 11:00:03.000000000 +0000
+++ /usr/bin/mpeg2cut 2004-11-18 07:13:59.525866864 +0000
@@ -1,4 +1,5 @@
#! /bin/sh
+set -x
#
# vim:ts=4:sw=4:ai:et:si:sts=4
#
@@ -113,7 +114,7 @@
if [ .${MODE}. = .Xvfb. ]
then
# Let's start up the Xvfb server
- ${XVFB} :13 -screen 0 640x480x8 2> /dev/null > /dev/null &
+ ${XVFB} :13 -ac -screen 0 640x480x8 2> /dev/null > /dev/null &
XVFB_PID=$!
fi
@@ -121,7 +122,7 @@
then
echo Indexing the file with avidemux2
nice -n 19 avidemux2 --index-mpeg ${FILENAME} ${FILENAME}.idx C0 \
- --audio-codec MP2 --quit 2> /dev/null > /dev/null
+ --audio-codec MP2 --quit
fi
@@ -175,7 +176,7 @@
echo Cutting out commercials with avidemux2
nice -n 19 avidemux2 --load-workbench ${BASENAME}.cut \
--audio-codec MP2 --save-raw-video ${BASENAME}.m2v \
- --save-raw-audio ${BASENAME}.mp2 --quit 2> /dev/null > /dev/null
+ --save-raw-audio ${BASENAME}.mp2 --quit
# Shut down Xvfb if we used it
if [ .${MODE}. = .Xvfb. ]
*here is the output*
mpeg2cut /mnt/store/1006_20041117101800_20041117104500.nuv "./King of
Queens -In Flagranti".mpg 2521-18637 30102-45445 45537-
+ LOCAL_PRELOAD=
++ which Xvfb
+ XVFB=/usr/X11R6/bin/Xvfb
+ '[' ./usr/X11R6/bin/Xvfb. '!=' .. ']'
+ export DISPLAY=:13.0
+ DISPLAY=:13.0
+ MODE=Xvfb
+ FILENAME=/mnt/store/1006_20041117101800_20041117104500.nuv
++ basename /mnt/store/1006_20041117101800_20041117104500.nuv .nuv
+ BASENAME=1006_20041117101800_20041117104500
+ OUTFILE='./King of Queens -In Flagranti.mpg'
+ LASTGOP=2521-18637
++ echo '$Revision: 1.6 $'
++ sed -e 's/$Revision\(\: \)*\([^ $]*\).*$/\2/'
+ VERSION=1.6
+ echo mpeg2cut v1.6
mpeg2cut v1.6
+ echo Using mode Xvfb
Using mode Xvfb
+ echo Filename '"/mnt/store/1006_20041117101800_20041117104500.nuv"'
Filename "/mnt/store/1006_20041117101800_20041117104500.nuv"
+ echo OutFile '"./King' of Queens -In 'Flagranti.mpg"'
OutFile "./King of Queens -In Flagranti.mpg"
+ shift 3
+ CUTLIST='30102-45445 45537-'
+ echo Last GOP index 2521-18637
Last GOP index 2521-18637
+ echo Cutlist '"30102-45445' '45537-"'
Cutlist "30102-45445 45537-"
+ echo -n 'Finding the AV Offset to use with lvemux: '
Finding the AV Offset to use with lvemux: ++ tcprobe -i
/mnt/store/1006_20041117101800_20041117104500.nuv
++ grep av_fine_ms
++ sed -e 's/^.*av_fine_ms //'
++ cut -d ' ' -f 1
+ OFFSET=19
+ '[' .19. = .. ']'
+ OFFSET=-19
+ echo -19
-19
+ echo -n 'Finding framerate: '
Finding framerate: ++ tcprobe -i
/mnt/store/1006_20041117101800_20041117104500.nuv
++ grep 'frame rate'
++ sed -e 's/^.*-f //'
++ cut -d ' ' -f 1
+ FRAMERATE=25.000
+ echo 25.000
25.000
+ '[' .25.000. = .25.000. ']'
+ GOPSPACE=12
+ LASTFRAME=-221123
+ echo Last Frame -221123
Last Frame -221123
+ '[' .Xvfb. = .Xvfb. ']'
+ /usr/X11R6/bin/Xvfb :13 -ac -screen 0 640x480x8
+ XVFB_PID=28319
+ '[' '!' -f /mnt/store/1006_20041117101800_20041117104500.nuv.idx ']'
+ echo Indexing the file with avidemux2
Indexing the file with avidemux2
+ nice -n 19 avidemux2 --index-mpeg
/mnt/store/1006_20041117101800_20041117104500.nuv
/mnt/store/1006_20041117101800_20041117104500.nuv.idx C0 --audio-codec
MP2 --quit
LARGE FILE AVAILABLE : 1 offset
Locales for avidemux appear to be in /usr/share/locale
I18N : _File
*******************
Avidemux 2, v 2.0.32
*******************
http://fixounet.free.fr/avidemux
Code : Mean & JSC
GFX : Nestor Di , nestordi at augcyl.org
Testing : Jakub Misak
FreeBsd : Anish Mistry, amistry at am-productions.biz
MMX activated.
Registering Encoders
*********************
Mjpeg encoder registred
Xvid-4 encoder registred
FFMPEG encoder registred
3 encoder registered
Initializing global xvid 4
xvid build:xvid-1.0.2
xvid thread:0
xvid SIMD supported:(f7)
MMX
MMXEXT
SSE
3DNOW
3DNOWEXT
Checking cpu capabilities
Cpu has MMX
Cpu has 3DNOW
Cpu has MMXEXT
Cpu has SSE
End of cpu capabilities check
Initializing postproc
Deleting post proc
updating post proc
Enabled type:3 strength:3
Registering Filters
*********************
Preferences found and loaded
Using dummy audio device
**********OBSOLETE*********
Codec FFmpeg4 found
Global SDL init...
*** Automated : 45 entries*************
index-mpeg-->3
Auto adding :
trying /mnt/store/1006_20041117101800_20041117104500.nuv
trying /mnt/store/1006_20041117101800_20041117104501.nuv
Not found
found 1 files
file 0 :/mnt/store/1006_20041117101800_20041117104500.nuv size :
523560197
Done
Program stream
Program stream demuxer initialized with stream 1 = e0stream 2 = c0
Internal stream 1 = e0stream 1s= ff
Internal stream 2 = c0stream 2s= ff
Auto adding :
trying /mnt/store/1006_20041117101800_20041117104500.nuv
trying /mnt/store/1006_20041117101800_20041117104501.nuv
Not found
found 1 files
file 0 :/mnt/store/1006_20041117101800_20041117104500.nuv size :
523560197
Done
Size of PES stream : 523560197>>>First PTS = 3208977786
Demuxer : 20 first, e0
720 x 576 at 25000 fps
>>>Other PTS = 3208911210
could not get sync!
**error reading packet**
io error , aborting sync
end of stream...
Total : 44926 frames
>>Delta PTS = 739.733333 ms<<
>>Delta PTS = 739.733333 ms<<
XXX We have a shift of 739 ms between audio and video
XXX!!!
__
arg: 7 index 21
audio-codec-->1
quit-->0
Images stat:___________Max memory consumed (MB) : 0
Current memory consumed (MB) : 0
Max image used : 0
Cur image used : 0
Global mem stat
Memory consumed :248 (MB)
Goodbye...
+ cat
+ cat /dev/null
+ count=0
+ for i in '${CUTLIST}'
++ echo 30102-45445
++ cut -d - -f 1
+ START=30102
++ echo 30102-45445
++ cut -d - -f 2
+ END=45445
+ '[' .30102. = .. ']'
+ '[' 30102 -ge -221123 ']'
+ continue
+ for i in '${CUTLIST}'
++ echo 45537-
++ cut -d - -f 1
+ START=45537
++ echo 45537-
++ cut -d - -f 2
+ END=
+ '[' .45537. = .. ']'
+ '[' 45537 -ge -221123 ']'
+ continue
+ echo 0 segments
+ cat 1006_20041117101800_20041117104500.cut2
+ cat
+ echo Cutting out commercials with avidemux2
Cutting out commercials with avidemux2
+ nice -n 19 avidemux2 --load-workbench
1006_20041117101800_20041117104500.cut --audio-codec MP2
--save-raw-video 1006_20041117101800_20041117104500.m2v --save-raw-audio
1006_20041117101800_20041117104500.mp2 --quit
LARGE FILE AVAILABLE : 1 offset
Locales for avidemux appear to be in /usr/share/locale
I18N : _File
*******************
Avidemux 2, v 2.0.32
*******************
http://fixounet.free.fr/avidemux
Code : Mean & JSC
GFX : Nestor Di , nestordi at augcyl.org
Testing : Jakub Misak
FreeBsd : Anish Mistry, amistry at am-productions.biz
MMX activated.
Registering Encoders
*********************
Mjpeg encoder registred
Xvid-4 encoder registred
FFMPEG encoder registred
3 encoder registered
Initializing global xvid 4
xvid build:xvid-1.0.2
xvid thread:0
xvid SIMD supported:(f7)
MMX
MMXEXT
SSE
3DNOW
3DNOWEXT
Checking cpu capabilities
Cpu has MMX
Cpu has 3DNOW
Cpu has MMXEXT
Cpu has SSE
End of cpu capabilities check
Initializing postproc
Deleting post proc
updating post proc
Enabled type:3 strength:3
Registering Filters
*********************
Preferences found and loaded
Using dummy audio device
**********OBSOLETE*********
Codec FFmpeg4 found
Global SDL init...
*** Automated : 45 entries*************
load-workbench-->1
574d4441 -> 574d4441
Workbench file detected...
WKB Reading workbench, 1 videos to go
adding /mnt/store/1006_20041117101800_20041117104500.nuv.idx
4d584449 -> 4d584449
DVD2AVI Mpeg file detected...
opening d2v file : /mnt/store/1006_20041117101800_20041117104500.nuv.idx
44926 I-Frames
Nb files : 1
vob :/mnt/store/1006_20041117101800_20041117104500.nuv
Program stream demuxer initialized with stream 1 = e0stream 2 = c0
Internal stream 1 = e0stream 1s= ff
Internal stream 2 = c0stream 2s= ff
Auto adding :
trying /mnt/store/1006_20041117101800_20041117104500.nuv
trying /mnt/store/1006_20041117101800_20041117104501.nuv
Not found
found 1 files
file 0 :/mnt/store/1006_20041117101800_20041117104500.nuv size :
523560197
Done
Size of PES stream : 523560197>>>First PTS = 3208977786
Demuxer : 20 first, e0
720 x 576 25000 format
Dropping 0 last B/P frames
Creating start sequence (0)..
>>>Other PTS = 3208911210
0000 : ...�-.@#$�#�.... 00 00 01 b3 2d 02 40 23 24 9f 23 81 10 11 11 12
0010 : ................ 12 12 13 13 13 13 14 14 14 14 14 15 15 15 15 15
0020 : ................ 15 16 16 16 16 16 16 16 17 17 17 17 17 17 17 17
0030 : .. 18 18Image :39957, seqLen : 88 seq 0 0 1 b3
Frame dropped
Frame dropped
Audio bytes : 43130880
Creating audio stream..
opening d2v file for audio track :
/mnt/store/1006_20041117101800_20041117104500.nuv.idx
Program stream demuxer initialized with stream 1 = c0stream 2 = e0
Internal stream 1 = c0stream 1s= ff
Internal stream 2 = e0stream 2s= ff
Auto adding :
trying /mnt/store/1006_20041117101800_20041117104500.nuv
trying /mnt/store/1006_20041117101800_20041117104501.nuv
Not found
found 1 files
file 0 :/mnt/store/1006_20041117101800_20041117104500.nuv size :
523560197
Done
Size of PES stream : 523560197>>>Other PTS = 3208977786
>>>First PTS = 3208911210
Demuxer : 102e first, c0
looking up 3840 sync points
(fc a4 00)
Mpeg version :1 Layer version :2
Bitrt : 192
Fq : 48000
Mode : 2
Mode : Stereo
Mpeg audio initialized (43130880 bytes)
Mpeg index file successfully read
Deleting post proc
Initializing postproc
Deleting post proc
updating post proc
Enabled type:3 strength:3
Audio : 1797.120000 video : 1796.960000
Decoder FCC: MPEG (4745504D)
using Mpeg1/2 codec (libmpeg2)
initializing mpeg2 decoder 720 x 576
YV12 open called
Mpeg2dec: X86 CPU accel in use:
Mpeg2dec accel :MPEG2_ACCEL_X86_MMX
Mpeg2dec accel :MPEG2_ACCEL_X86_3DNOW
Mpeg2dec accel :MPEG2_ACCEL_X86_MMXEXT
done
checking for B-Frames...
Seq found
YV12 setup called
**********YV12 setup fbuf called : 720 x 576 (0)
**********YV12 setup fbuf called : 720 x 576 (1)
**********YV12 setup fbuf called : 720 x 576 (2)
5 is a b frame
and flags is ok
7 is a b frame
and flags is ok
8 is a b frame
and flags is ok
10 is a b frame
and flags is ok
11 is a b frame
and flags is ok
Mmm this appear to have b-frame...
And the index is ok
Frames re-ordered, B-frame friendly now :)
End of B-frame check
WKB Reading workbench, 0 segments to go
*** audioDelay not found !***
*** audioFreq not found !***
*** audioProcessMode not found !***
*** audioMP3mode not found !***
*** audioMP3bitrate not found !***
*** audioMP3preset not found !***
.. all loaded
________Video______________
Video : 0, nb video :44924, audio size:43130880 audioDuration:86254080
______________________
_________Clipboard_____________
Total frames : 0
I/O warning : failed to load external entity
"1006_20041117101800_20041117104500.cut.flt"
XXX Problem reading xml filters! XXX!!!
Trouble reading codec conf
Editor :Audio streamer initialized
Audio codec: MP2-3
Mpeg1/2 audio codec created
going out of bounds! :0 / 0
XXX Problem decompressing frame! XXX!!!
** conf updated **
audio-codec-->1
save-raw-video-->1
Frame 2 seg failed! (0)
Conversion failed !
Frame 2 seg failed! (0)
avidemux2: gtk_gui.cpp:1952: int ADM_saveRaw(char*): Assertion `0' failed.
/usr/bin/mpeg2cut: line 179: 28337 Aborted nice -n 19
avidemux2 --load-workbench ${BASENAME}.cut --audio-codec MP2
--save-raw-video ${BASENAME}.m2v --save-raw-audio ${BASENAME}.mp2 --quit
+ '[' .Xvfb. = .Xvfb. ']'
+ kill 28319
+ echo Remultiplexing video
Remultiplexing video
+ nice -n 19 lvemux -r -1 -sh -19 -v
1006_20041117101800_20041117104500.m2v -a
1006_20041117101800_20041117104500.mp2 -o './King of Queens -In
Flagranti.mpg'
GOP timestamps will be rebuild
ERROR: opening A/V streams (0/1)
+ echo Cleaning up
Cleaning up
+ rm /mnt/store/1006_20041117101800_20041117104500.nuv.idx
1006_20041117101800_20041117104500.m2v
1006_20041117101800_20041117104500.mp2
1006_20041117101800_20041117104500.m2v.idx
rm: cannot remove `1006_20041117101800_20041117104500.mp2': No such file
or directory
+ rm 1006_20041117101800_20041117104500.cut
1006_20041117101800_20041117104500.cut2
*tcprobe from mpegstream*
[tcprobe] MPEG program stream (PS)
[tcprobe] summary for /mnt/store/1006_20041117101800_20041117104500.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=35655.2287, frame_time=40 ms, bitrate=15000 kbps
audio track: -a 0 [0] -e 48000,16,2 [48000,16,2] -n 0x50 [0x2000] (*)
PTS=35654.5690, bitrate=192 kbps
-D 16 --av_fine_ms 19 (frames & ms) [0] [0]
detected (3) presentation unit(s) (SCR reset)
Any suggestions ?
Regards
Thomas
More information about the mythtv-dev
mailing list