avi to flv using ffmpeg

Got ffmpeg ?
ffmpeg -y -i files/input_file.avi -ar 22050 -f flv files/output_file.flv
problems ?
FFmpeg version SVN-r10964, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-libmp3lame --enable-shared --prefix=/usr --enable-libogg --enable-libvorbis
libavutil version: 49.5.0
libavcodec version: 51.48.0
libavformat version: 51.18.0
built on Nov 8 2007 14:12:36, gcc: 4.1.1 20061011 (Red Hat 4.1.1-30)
Input #0, avi, from 'files/3635634.avi':
Duration: 00:00:18.1, start: 0.000000, bitrate: 660 kb/s
Stream #0.0: Video: mjpeg, yuvj422p, 320x240 [PAR 0:1 DAR 0:1], 15.00 fps(r)
Stream #0.1: Audio: pcm_u8, 11024 Hz, mono, 88 kb/s
Output #0, flv, to 'files/3635634.flv':
Stream #0.0: Video: flv, yuv420p, 320x240 [PAR 0:1 DAR 0:1], q=2-31, 200 kb/s, 15.00 fps(c)
Stream #0.1: Audio: libmp3lame, 11024 Hz, mono, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
[flv @ 0x7c77d0]removing common factors from framerate
Error while opening codec for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height

After googling around reading ffmpeg documentation i found the solution. You need to manually set the sampling frequency like this:

ffmpeg -y -i files/input_file.avi -ar 22050 -f flv files/output_file.flv

James Horvath Gooey Website
James Horvath Gooey Oooey