[MEncoder-users] Bug: floating point exception when converting to DV
Levente Novák
lnovak at dragon.unideb.hu
Wed Apr 25 22:28:08 CEST 2007
I would like to transcode a mpeg2 material to DV (raw DV, not DV Avi),
but mencoder gets a floating point exception before writing any frame.
This happens with all types of input files when output is set to DV;
however, DV Avi works OK (at least it gives playable files).
Here is my command line:
mencoder birthday.mpg -of lavf -lavfopts \
i_certify_that_my_video_stream_does_not_use_b_frames:format=dv \
-oac pcm -ovc lavc -lavcopts vcodec=dvvideo -o birthday.dv
Here is the gdb output:
gdb /tmp/trunk/mencoder
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db
library "/ lib/tls/i686/cmov/libthread_db.so.1".
(gdb) run -v birthday.mpg -of lavf -lavfopts
i_certify_that_my_video_stream_does_not_use_b_frames:format=dv -oac pcm
-ovc lavc -lavcopts vcodec=dvvideo -o birthday.dv
Starting program: /tmp/trunk/mencoder -v birthday.mpg -of lavf -lavfopts
i_certify_that_my_video_stream_does_not_use_b_frames:format=dv -oac pcm
-ovc lavc -lavcopts vcodec=dvvideo -o birthday.dv
[Thread debugging using libthread_db enabled]
[New Thread -1213974848 (LWP 28294)]
MEncoder dev-SVN-r23112-4.1.2 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Celeron(R) CPU 3.06GHz (Family: 15, Model: 4, Stepping: 1)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
Configuration: --enable-debug=3
init_freetype
get_path('font/font.desc') -> '/home/novakl/.mplayer/font/font.desc'
font: can't open file: /home/novakl/.mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
[file] File size is 800323584 bytes
STREAM: [file] birthday.mpg
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
success: format: 0 data: 0x0 - 0x2fb3f800
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for NuppelVideo
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename birthday.mpg ext: .mpg
LAVF_check: MPEG PS format
Checking for Nullsoft Streaming Video
Checking for MOV
Checking for VIVO
header block 1 size: 0
AVS: avs_check_file - attempting to open file birthday.mpg
AVS: File is too big, aborting...
Checking for PVA
Checking for MPEG-TS...
TRIED UP TO POSITION 66800, FOUND 47, packet_size= 0, SEEMS A TS? 0
Checking for LMLM4 Stream Format
Invalid packet in LMLM4 stream: ch=0 size=1140851704
LMLM4 Stream Format not found
system stream synced at 0xD (13)!
==> Found video stream: 0
==> Found audio stream: 0
MPEG-PS file format detected.
Searching for sequence header... OK!
VIDEO: MPEG2 720x576 (aspect 2) 25.000 fps 8000.0 kbps (1000.0
kbyte/s)
[V] filefmt:2 fourcc:0x10000002 size:720x576 fps:25.00 ftime:=0.0400
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: made decode tables with MMX optimization
mp3lib: using SSE optimized decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer II, 48000 Hz 192 kbit Single-Channel, BPF: 576
Channels: 1, copyright: No, original: Yes, CRC: No, emphasis: 0
AUDIO: 48000 Hz, 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
[file] File size is 0 bytes
STREAM: [file] birthday.dv
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
** MUXER_LAVF
*****************************************************************
You have certified that your video stream does not contain B frames.
REMEMBER: MEncoder's libavformat muxing is presently broken and will
generate
INCORRECT files in the presence of B frames. Moreover, due to bugs
MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit
ALLOCATED STREAM N. 1, type=0
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred colorspace: Mpeg PES)
Trying filter chain: expand lavc
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
Trying filter chain: scale expand lavc
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder
libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
==========================================================================
ALLOCATED STREAM N. 2, type=1
Building audio filter chain for 48000Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[libaf] Adding filter format
[format] Changing sample format from little-endian 16-bit signed int to
big-endian 8-bit signed int
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[format] Changing sample format from little-endian 16-bit signed int to
big-endian 8-bit signed int
Building audio filter chain for 48000Hz/2ch/s16le ->
48000Hz/2ch/s16le...
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[format] Changing sample format from little-endian 16-bit signed int to
big-endian 8-bit signed int
[libaf] Removing filter format
[dummy] Was reinitialized: 48000Hz/2ch/s16le
VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)
Trying filter chain: expand lavc
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO Config (720x576->768x576,flags=0,'MPlayer',0x32315659)
REQ: flags=0x401 req=0x0
videocodec: libavcodec (720x576 fourcc=69767664 [dvvi])
get_path('subfont.ttf') -> '/home/novakl/.mplayer/subfont.ttf'
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
*** [lavc] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes
*** [expand] Direct Rendering mp_image_t, 720x576x12bpp YUV planar,
622080 bytes
*** [lavc] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080
bytesms 18/45 D/B/S 0/1/0
*** [expand] Direct Rendering mp_image_t, 720x576x12bpp YUV planar,
622080 bytes
Muxer frame buffer sending 2 frame(s) to the muxer. A-V:0.004 [0:0]
A/Vms 18/33 D/B/S 0/2/0
VIDEO CODEC ID: 0
AUDIO CODEC ID: 10000, TAG: 0
MUXER_LAVF(audio stream) frame_size: 1, scale: 1, sps: 48000, rate:
48000, ctx->block_align = stream->wf->nBlockAlign; 0=4
stream->wf->nAvgBytesPerSec:192000
Writing header...
[dv @ 0x862fe48]Can't initialize DV format!
Make sure that you supply exactly two streams:
video: 25fps or 29.97fps, audio: 2ch/48Khz/PCM
(50Mbps allows an optional second audio stream)
Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread -1213974848 (LWP 28294)]
0x085f46f7 in __divdi3 ()
(gdb)
Backtrace:
(gdb) bt
#0 0x085f46f7 in __divdi3 ()
#1 0x081c26b1 in av_frac_add (f=0x8b97a64, incr=<value optimized out>)
at utils.c:2970
#2 0x081c39d6 in compute_pkt_fields2 (st=0x8b97a40, pkt=0xbfcdc760)
at utils.c:2212
#3 0x081c71d6 in av_interleaved_write_frame (s=0x8b88db0,
pkt=0xbfcdc760)
at utils.c:2325
#4 0x080b3e3c in write_chunk (stream=0x0, len=96000, flags=16, dts=0,
pts=0)
at muxer_lavf.c:288
#5 0x080ab139 in muxer_write_chunk (s=0x8b97168, len=144000, flags=16,
dts=-9.2233720368547758e+18, pts=-9.2233720368547758e+18) at
muxer.c:127
#6 0x080a3874 in encode_frame (vf=0x8b92540, pic=<value optimized out>,
pts=-9.2233720368547758e+18) at ve_lavc.c:802
#7 0x080a3cdc in put_image (vf=0x8b92540, mpi=0x0,
pts=-9.2233720368547758e+18) at ve_lavc.c:759
#8 0x080b774b in filter_video (sh_video=0x8b4dd48, frame=0x8b51178,
pts=-9.2233720368547758e+18) at dec_video.c:417
#9 0x0807f309 in main (argc=Cannot access memory at address 0x0
) at mencoder.c:1312
(gdb)
Disassemble:
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x85f46d7 to 0x85f4717:
0x085f46d7 <__divdi3+359>: lock ja 0x85f45f5 <__divdi3+133>
0x085f46de <__divdi3+366>: mov $0x1,%ecx
0x085f46e3 <__divdi3+371>: xor %eax,%eax
0x085f46e5 <__divdi3+373>: jmp 0x85f4600 <__divdi3+144>
0x085f46ea <__divdi3+378>: lea 0x0(%esi),%esi
0x085f46f0 <__divdi3+384>: mov $0x1,%eax
0x085f46f5 <__divdi3+389>: xor %edx,%edx
0x085f46f7 <__divdi3+391>: div %esi
0x085f46f9 <__divdi3+393>: mov %eax,%ecx
0x085f46fb <__divdi3+395>: jmp 0x85f45d8 <__divdi3+104>
0x085f4700 <__divdi3+400>: mov 0xfffffff0(%ebp),%eax
0x085f4703 <__divdi3+403>: movzbl 0xffffffe8(%ebp),%ecx
0x085f4707 <__divdi3+407>: shl %cl,%eax
0x085f4709 <__divdi3+409>: cmp %edi,%eax
0x085f470b <__divdi3+411>: jae 0x85f4691 <__divdi3+289>
0x085f470d <__divdi3+413>: mov 0xffffffc8(%ebp),%ecx
0x085f4710 <__divdi3+416>: xor %eax,%eax
0x085f4712 <__divdi3+418>: dec %ecx
0x085f4713 <__divdi3+419>: jmp 0x85f4600 <__divdi3+144>
End of assembler dump.
(gdb)
Info all registers:
(gdb) info all-registers
eax 0x1 1
ecx 0x0 0
edx 0x0 0
ebx 0x80befc00 -2134967296
esp 0xbfcdc5f0 0xbfcdc5f0
ebp 0xbfcdc628 0xbfcdc628
esi 0x0 0
edi 0x0 0
eip 0x85f46f7 0x85f46f7 <__divdi3+391>
eflags 0x210246 [ PF ZF IF RF ID ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
st0 -nan(0x47004300470055) (raw 0xffff0047004300470055)
st1 -nan(0x1b000b001b0000) (raw 0xffff001b000b001b0000)
st2 -nan(0x2100210021002d) (raw 0xffff002100210021002d)
st3 -nan(0xfff10001fff10010) (raw 0xfffffff10001fff10010)
st4 -nan(0x5fff500050000) (raw 0xffff0005fff500050000)
st5 -9223372036854775808 (raw 0xc03e8000000000000000)
st6 0 (raw 0x00000000000000000000)
---Type <return> to continue, or q <return> to quit---
st7 0.5 (raw 0x3ffe8000000000000000)
fctrl 0x37f 895
fstat 0x420 1056
ftag 0xffff 65535
fiseg 0x73 115
fioff 0x80b3e28 134954536
foseg 0x7b 123
fooff 0xbfcdc760 -1077033120
fop 0x784 1924
xmm0 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0,
0x0,
0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0,
0x0},
uint128 = 0x00000000000000000000000000000000}
xmm1 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0,
0x0,
0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0,
0x0},
uint128 = 0x00000000000000000000000000000000}
xmm2 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0,
0x0,
0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0,
0x0},
uint128 = 0x00000000000000000000000000000000}
xmm3 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0,
0x0,
---Type <return> to continue, or q <return> to quit---
0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0,
0x0},
uint128 = 0x00000000000000000000000000000000}
xmm4 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0,
0x0,
0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0,
0x0},
uint128 = 0x00000000000000000000000000000000}
xmm5 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0,
0x0,
0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0,
0x0},
uint128 = 0x00000000000000000000000000000000}
xmm6 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0,
0x0,
0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0,
0x0},
uint128 = 0x00000000000000000000000000000000}
xmm7 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0,
0x0,
0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0,
0x0},
uint128 = 0x00000000000000000000000000000000}
mxcsr 0x1f80 [ IM DM ZM OM UM PM ]
mm0 {uint64 = 0x47004300470055, v2_int32 = {0x470055,
0x470043},
v4_int16 = {0x55, 0x47, 0x43, 0x47}, v8_int8 = {0x55, 0x0, 0x47, 0x0,
0x43,
0x0, 0x47, 0x0}}
mm1 {uint64 = 0x1b000b001b0000, v2_int32 = {0x1b0000,
0x1b000b},
---Type <return> to continue, or q <return> to quit---
v4_int16 = {0x0, 0x1b, 0xb, 0x1b}, v8_int8 = {0x0, 0x0, 0x1b, 0x0,
0xb, 0x0,
0x1b, 0x0}}
mm2 {uint64 = 0x2100210021002d, v2_int32 = {0x21002d,
0x210021},
v4_int16 = {0x2d, 0x21, 0x21, 0x21}, v8_int8 = {0x2d, 0x0, 0x21, 0x0,
0x21,
0x0, 0x21, 0x0}}
mm3 {uint64 = 0xfff10001fff10010, v2_int32 = {0xfff10010,
0xfff10001}, v4_int16 = {0x10, 0xfff1, 0x1, 0xfff1}, v8_int8 =
{0x10, 0x0,
0xf1, 0xff, 0x1, 0x0, 0xf1, 0xff}}
mm4 {uint64 = 0x5fff500050000, v2_int32 = {0x50000, 0x5fff5},
v4_int16 = {0x0, 0x5, 0xfff5, 0x5}, v8_int8 = {0x0, 0x0, 0x5, 0x0,
0xf5,
0xff, 0x5, 0x0}}
mm5 {uint64 = 0x8000000000000000, v2_int32 = {0x0,
0x80000000},
v4_int16 = {0x0, 0x0, 0x0, 0x8000}, v8_int8 = {0x0, 0x0, 0x0, 0x0,
0x0, 0x0,
0x0, 0x80}}
mm6 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0,
0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm7 {uint64 = 0x8000000000000000, v2_int32 = {0x0,
0x80000000},
v4_int16 = {0x0, 0x0, 0x0, 0x8000}, v8_int8 = {0x0, 0x0, 0x0, 0x0,
0x0, 0x0,
0x0, 0x80}}
(gdb)
Hope this helps to locate the problem.
Levente
More information about the MEncoder-users
mailing list