Hello!

I have been using this command line to cut a piece of .avi xvid and convert it to .flv format (from a terminal in mac os x or on freebsd server)


Code:
for f in *.avi; do mencoder -forceidx -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -of lavf -ss 00:10:00 -endpos 00:02:10 -ffourcc FLV1 -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:turbo:vbitrate=425:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf scale=480:320 $f -o done/$f.flv ; done
Everything was working like a charm! But sometime ago, i started getting 0Kb converted .flv files for like 80% of the movies i'm working on. I'm pretty sure that i haven't changed anything on my system, probably some new codec is used in those xvid avis

this is what i see in terminal


Code:
brandox:400plus brandox$ for f in *.avi; do mencoder -forceidx -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -of lavf -ss 00:18:00 -endpos 00:02:10 -ffourcc FLV1 -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:turbo:vbitrate=425:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf scale=480:320 $f -o done/$f.flv ; doneMEncoder dev-CVS-060307-04:23-4.0.1 (C) 2000-2006 MPlayer TeamMac OSX static build for ffmpegX
CPU: Intel  (Family: 6, Stepping: 6)
FIXME:Hardenabling SSE and SSE2 without detection
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

success: format: 0  data: 0x0 - 0x195c9706
AVI file format detected.
AVI: Generated index table for 148654 chunks!
VIDEO:  [XVID]  640x480  12bpp  30.303 fps  1568.0 kbps (191.4 kbyte/s)
[V] filefmt:3  fourcc:0x44495658  size:640x480  fps:30.30  ftime:=0.0330
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 32.0 kbit/2.08% (ratio: 4000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
** 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
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [scale w=480 h=320]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
Forcing output fourcc to 31564c46 [FLV1]
MP3 audio selected
Pos:   0.0s      1f (52%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
1 duplicate frame(s)!
VIDEO CODEC ID: 22
AUDIO CODEC ID: 15001, TAG: 0
Writing header...
[flv @ 0x896170]dimensions not set
Floating point exception
MEncoder dev-CVS-060307-04:23-4.0.1 (C) 2000-2006 MPlayer Team
Mac OSX static build for ffmpegX
CPU: Intel  (Family: 6, Stepping: 6)
FIXME:Hardenabling SSE and SSE2 without detection
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

success: format: 0  data: 0x0 - 0x1fe50bc6
AVI file format detected.
AVI: Generated index table for 185771 chunks!
VIDEO:  [XVID]  640x480  12bpp  30.303 fps  1577.9 kbps (192.6 kbyte/s)
[V] filefmt:3  fourcc:0x44495658  size:640x480  fps:30.30  ftime:=0.0330
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 32.0 kbit/2.08% (ratio: 4000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
** 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
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [scale w=480 h=320]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
Forcing output fourcc to 31564c46 [FLV1]
MP3 audio selected
Pos:   0.0s      1f (41%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
1 duplicate frame(s)!
VIDEO CODEC ID: 22
AUDIO CODEC ID: 15001, TAG: 0
Writing header...
[flv @ 0x896170]dimensions not set
Floating point exception
MEncoder dev-CVS-060307-04:23-4.0.1 (C) 2000-2006 MPlayer Team
Mac OSX static build for ffmpegX
CPU: Intel  (Family: 6, Stepping: 6)
FIXME:Hardenabling SSE and SSE2 without detection
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

success: format: 0  data: 0x0 - 0x1dc0782a
AVI file format detected.
^Znerating Index:  71 %     
[1]+  Stopped                 mencoder -forceidx -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -of lavf -ss 00:18:00 -endpos 00:02:10 -ffourcc FLV1 -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:turbo:vbitrate=425:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf scale=480:320 $f -o done/$f.flv
brandox:400plus brandox$
Please help! I think i need to change something in my command or try ffmpeg instead of mencoder, but i don't know the correct command string for ffmpeg