[MPlayer-users] [BUG] mencoder coredump during lavc encoding

Alexei Khlebnikov a.khlebnikau at sam-solutions.net
Wed Jun 2 13:50:22 CEST 2004


Hello, mplayer-users.

I've tried to encode a movie and mencoder crashed.

My system, info:
Debian Woody(3.0)/Sarge mix
Kernel: 2.4.20-debianpatches-freeswan-lowlatency
Libc: 2.3.2.ds1-12
Mplayer: 1.0pre4-3.3.2

$gcc -v:
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.2/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linuxThread model: posix
gcc version 3.3.2 (Debian

$ld -v:
GNU ld version 2.14.90.0.7 20031029 Debian GNU/Linux

$ cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 15
model		: 1
model name	: Intel(R) Pentium(R) 4 CPU 1.80GHz
stepping	: 2
cpu MHz		: 1799.975
cache size	: 256 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 2
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips	: 3591.37

I used the following script (some comments cutted):
--- begin
#TIME="\nElapsed time: %E\n" time

#rm -f divx2pass.log
#rm -f xvid-twopass.stats

for pass in 1 2; do
    echo "=== Pass $pass ==="

    nice -n 5 mencoder dvd://2 -dvd-device /usr/local/video/khife.dvd \
	-o knife.avi \
    	-oac mp3lame -lameopts cbr:preset=128 \
	-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=941:vpass=$pass:vmax_b_frames=2:mbd=2:v4mv:vb_strategy=1:autoaspect:naq:trell:cbp:mv0:scplx_mask=0.3:psnr \
	-vf hqdn3d,scale -zoom -xy 512 -endpos 0:20:00
done
--- end

I launched script as follows:
$ TIME="\nElapsed time: %E\n" time sh mencode.sh

The output:
--- begin
=== Pass 1 ===
MEncoder 1.0pre4-3.3.2 (C) 2000-2004 MPlayer Team

CPU: Intel Pentium 4/Xeon Willamette 1921 MHz (Family: 8, Stepping: 2)
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 /home/khlebnikov/.mplayer/codecs.conf: Can't open '/home/khlebnikov/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: 61 audio & 157 video codecs
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file /home/khlebnikov/.mplayer/mencoder: No such file or directory
font: can't open file: /home/khlebnikov/.mplayer/font/font.desc
font: can't open file: /usr/share/mplayer/font/font.desc
Reading disc structure, please wait...
There are 10 titles on this DVD.
There are 19 chapters in this DVD title.
There are 1 angles in this DVD title.
DVD successfully opened.
success: format: 0  data: 0x0 - 0x1C49800
MPEG-PS file format detected.
VIDEO:  MPEG2  720x576  (aspect 2)  25.000 fps  8500.0 kbps (1062.5 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:720x576  fps:25.00  ftime:=0.0400
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
AC3: 2.0 (stereo)  48000 Hz  224.0 kbit/s
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 28000->192000 (224.0 kbit)
Selected audio codec: [a52] afm:liba52 (AC3-liba52)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
Opening video filter: [scale]
Opening video filter: [hqdn3d]
==========================================================================
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))
==========================================================================
MP3 audio selected
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
Writing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

preset=128

VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
SwScaler: reducing / aligning filtersize 7 -> 8
SwScaler: reducing / aligning filtersize 7 -> 8
SwScaler: reducing / aligning filtersize 7 -> 6
SwScaler: reducing / aligning filtersize 7 -> 6

SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2
videocodec: libavcodec (512x384 fourcc=58564944 [DIVX])
High quality encoding selected (non real time)!
Pos:   0.8s     22f ( 0%)  12fps Trem:   0min   0mb  A-V:0.084 [0:128]
Skipping frame!
Pos:   1.3s     35f ( 0%)  12fps Trem:   0min   0mb  A-V:0.083 [197:128]
Skipping frame!
knife.avi: Error writing file.ps Trem: 251min   0mb  A-V:0.061 [939:128]
Exiting...
=== Pass 2 ===
MEncoder 1.0pre4-3.3.2 (C) 2000-2004 MPlayer Team

CPU: Intel Pentium 4/Xeon Willamette 1800 MHz (Family: 8, Stepping: 2)
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 /home/khlebnikov/.mplayer/codecs.conf: Can't open '/home/khlebnikov/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: 61 audio & 157 video codecs
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file /home/khlebnikov/.mplayer/mencoder: No such file or directory
font: can't open file: /home/khlebnikov/.mplayer/font/font.desc
font: can't open file: /usr/share/mplayer/font/font.desc
Reading disc structure, please wait...
There are 10 titles on this DVD.
There are 19 chapters in this DVD title.
There are 1 angles in this DVD title.
DVD successfully opened.
success: format: 0  data: 0x0 - 0x1C49800
MPEG-PS file format detected.
VIDEO:  MPEG2  720x576  (aspect 2)  25.000 fps  8500.0 kbps (1062.5 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:720x576  fps:25.00  ftime:=0.0400
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
AC3: 2.0 (stereo)  48000 Hz  224.0 kbit/s
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 28000->192000 (224.0 kbit)
Selected audio codec: [a52] afm:liba52 (AC3-liba52)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
Opening video filter: [scale]
Opening video filter: [hqdn3d]
==========================================================================
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))
==========================================================================
MP3 audio selected
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
Writing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

preset=128

VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
SwScaler: reducing / aligning filtersize 7 -> 8
SwScaler: reducing / aligning filtersize 7 -> 8
SwScaler: reducing / aligning filtersize 7 -> 6
SwScaler: reducing / aligning filtersize 7 -> 6

SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2
videocodec: libavcodec (512x384 fourcc=58564944 [DIVX])
High quality encoding selected (non real time)!
Pos:   0.8s     22f ( 0%)   2fps Trem:   0min   0mb  A-V:0.084 [0:128]
Skipping frame!
Pos:   1.3s     35f ( 0%)   3fps Trem:   0min   0mb  A-V:0.083 [170:128]
Skipping frame!
mencoder: ratecontrol.c:618: ff_rate_estimate_qscale: Assertion `picture_number<rcc->num_entries' failed.
mencode.sh: line 23: 10575 Aborted                 (core dumped) nice -n 5 mencoder dvd://2 -dvd-device /usr/local/video/khife.dvd -o knife.avi -oac mp3lame -lameopts cbr:preset=128 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=941:vpass=$pass:vmax_b_frames=2:mbd=2:v4mv:vb_strategy=1:autoaspect:naq:trell:cbp:mv0:scplx_mask=0.3:psnr -vf hqdn3d,scale -zoom -xy 512 -endpos 0:20:00

Elapsed time: 1:48:21
--- end

I suspect, the reason is that during the first pass "Error writing file." occured
and during the second pass bad statistics resulted in coredump. I don't know why
mencoder could not write the file. Drive was full at the moment during the first pass,
but I quickly released space and the process did not stop.


Regards,
Alexei.




More information about the MPlayer-users mailing list