[MPlayer-dev-eng] Fw: bug? which leads to vo/encoder reinit during playback / transcode

Stefan Seyfried seife at gmane0305.slipkontur.de
Fri Aug 6 17:06:58 CEST 2004


Hi,
i already sent this to mplayer-users but got no replies.
So if this may be of any interest for someone, here it is again.

---forwarded message from Stefan Seyfried, Thu, Jul 15, 2004------
Hi,

i found a dvd which causes some strange behaviour during transcoding
and viewing:
when viewing, the vo seems to be reinitialized every now and then and i
get something like that on the console:

Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
Starting playback...
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,78:1 - prescaling to correct movie aspect.
VO: [xv] 720x576 => 1024x576 Planar YV12 
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12) 1 0 0%
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,78:1 - prescaling to correct movie aspect.
VO: [xv] 720x576 => 1024x576 Planar YV12 
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12) 1 0 0%
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,78:1 - prescaling to correct movie aspect.
VO: [xv] 720x576 => 1024x576 Planar YV12 
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12) 1 0 0%
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,78:1 - prescaling to correct movie aspect.
VO: [xv] 720x576 => 1024x576 Planar YV12 
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12) 1 0 0%
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,78:1 - prescaling to correct movie aspect.
VO: [xv] 720x576 => 1024x576 Planar YV12 
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12) 1 0 0%
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,78:1 - prescaling to correct movie aspect.
VO: [xv] 720x576 => 1024x576 Planar YV12 
A: 124,5 V: 124,5 A-V: -0,000 ct:  0,087  613/613  11%  8%  2,3% 1 0 0%
Exiting... (Quit)

When transcoding, almost the same happens:

MEncoder dev-CVS-040713-17:13-3.3.3 (C) 2000-2004 MPlayer Team

CPU: Intel Pentium 4/Xeon/Celeron Foster 2807 MHz (Family: 8, Stepping: 9)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

Reading /suse/seife/.mplayer/codecs.conf: Can't open '/suse/seife/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open '/usr/local/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file /suse/seife/.mplayer/mencoder: No such file or directory
Font /suse/seife/.mplayer/font/font.desc loaded successfully! (206 chars)
success: format: 0  data: 0x0 - 0x2A58A800
MPEG-PS file format detected.
VIDEO:  MPEG2  720x576  (aspect 3)  25,000 fps  7500,0 kbps (937,5 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:720x576  fps:25,00  ftime:=0,0400
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
Opening video filter: [dsize=640:272]
Opening video filter: [scale w=640 h=272]
Opening video filter: [crop w=712 h=432]
Crop: 712 x 432, -1 ; -1
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred csp: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.3.1
Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2))
==========================================================================
Writing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,78:1 - prescaling to correct movie aspect.
SwScaler: reducing / aligning filtersize 6 -> 8
SwScaler: reducing / aligning filtersize 6 -> 8
SwScaler: reducing / aligning filtersize 8 -> 7
SwScaler: reducing / aligning filtersize 8 -> 7

SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2
videocodec: libavcodec (640x272 fourcc=58564944 [DIVX])
High quality encoding selected (non real time)!
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)780:0]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,78:1 - prescaling to correct movie aspect.
videocodec: libavcodec (640x272 fourcc=58564944 [DIVX])
High quality encoding selected (non real time)!
Could not open codec.
FATAL: Cannot initialize video driver.
Pos: 113,8s   2848f ( 1%)  28fps Trem:  96min 603mb  A-V:0,000 [780:0]
1 duplicate frame(s)!
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)790:0]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,78:1 - prescaling to correct movie aspect.
videocodec: libavcodec (640x272 fourcc=58564944 [DIVX])
High quality encoding selected (non real time)!
Could not open codec.
FATAL: Cannot initialize video driver.
Pos: 114,4s   2861f ( 1%)  28fps Trem:  95min 609mb  A-V:0,000 [790:0]
1 duplicate frame(s)!
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)802:0]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,78:1 - prescaling to correct movie aspect.
videocodec: libavcodec (640x272 fourcc=58564944 [DIVX])
High quality encoding selected (non real time)!
Could not open codec.
FATAL: Cannot initialize video driver.
Pos: 114,9s   2874f ( 1%)  28fps Trem:  95min 616mb  A-V:0,000 [802:0]
1 duplicate frame(s)!
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)932:0]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,78:1 - prescaling to correct movie aspect.
videocodec: libavcodec (640x272 fourcc=58564944 [DIVX])
High quality encoding selected (non real time)!
Could not open codec.
FATAL: Cannot initialize video driver.
Pos: 120,6s   3017f ( 1%)  28fps Trem:  92min 708mb  A-V:0,000 [932:0]
1 duplicate frame(s)!
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)956:0]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,78:1 - prescaling to correct movie aspect.
videocodec: libavcodec (640x272 fourcc=58564944 [DIVX])
High quality encoding selected (non real time)!
Could not open codec.
FATAL: Cannot initialize video driver.
Pos: 121,1s   3030f ( 1%)  28fps Trem:  92min 725mb  A-V:0,000 [956:0]
1 duplicate frame(s)!
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)1061:0]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,78:1 - prescaling to correct movie aspect.
videocodec: libavcodec (640x272 fourcc=58564944 [DIVX])
High quality encoding selected (non real time)!
Could not open codec.
FATAL: Cannot initialize video driver.
Pos: 136,7s   3420f ( 2%)  29fps Trem:  88min 801mb  A-V:0,000 [1061:0]

and so on.

commandline is:

LAVC="vcodec=mpeg4:vme=4:cmp=2:precmp=2:subcmp=2:dia=1:predia=1:vmax_b_frames=0:mbd=2:mv0:v4mv:vbitrate=724"
SCALE="-vf crop=712:432,scale=640:272,dsize=640:272" 
time mencoder -ovc lavc -lavcopts $LAVC:vpass=1 \
         -nosound $SCALE \
         -o ${N}_video1.avi stream.dump

and the same with vpass=2

The problem is, that with every time the encoder is reinitialized, it gives
a "visual  burp", like a missed keyframe or something like that.
a sample of the stream.dump is in 
ftp.mplayerhq.hu/MPlayer/incoming/stream-which-leads-to-encoder-reinit
I also put up a sample of the transcoded part as well.

I tried to recode the same stream with avidemux2 but it segfaulted after
the first pass :-) so there is no comparison. It does not matter if i rip
it directly from the dvd or from stream.dump. Also, dumping the dvd with
transcode shows the same behaviour.
-- 
Stefan Seyfried




More information about the MPlayer-dev-eng mailing list