your input file is surround 5.1 and ffmpeg will not encode surround. Try to see if you can get the stereo file from the mts.
Main Topics
Browse All TopicsI'm trying to convert an 11MB MTS file into an FLV file using FFMPEG. I have installed FFMPEG on my CentOS 5.3 box via YUM.
When trying to convert a simple MTS file to FLV format an error occurs but I'm not sure why:
root@web3 [/usr/src]# ffmpeg -i 00103.mts -vcodec flv -f flv -r 25 -s 800x450 -aspect 16:9 -b 320k -g 160 -cmp 2 -subcmp 2 -mbd 2 -flags +aic+cbp+mv0+mv4 -trellis 2 -acodec libmp3lame -ac 2 -ar 44100 -ab 256k -y output.flv
FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include --enable-libamr-nb --enable-libamr-wb --enable-libdirac --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-x11grab
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Jul 24 2009 01:48:17, gcc: 4.1.2 20080704 (Red Hat 4.1.2-44)
Input #0, mpegts, from '00103.mts':
Duration: 00:00:10.95, start: 1.000067, bitrate: 8473 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264, yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], 50 tbr, 90k tbn, 50 tbc
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Output #0, flv, to 'output.flv':
Stream #0.0: Video: flv (hq), yuv420p, 800x450 [PAR 1:1 DAR 16:9], q=2-31, 320 kb/s, 90k tbn, 25 tbc
Stream #0.1: Audio: libmp3lame, 44100 Hz, stereo, s16, 256 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
[h264 @ 0x9b4a430]missing picture in access unit9.98 bitrate= 751.3kbits/s
Last message repeated 1 times
[libmp3lame @ 0x9c41300]lame: output buffer too small (buffer index: 8359, free bytes: 1433)
Audio encoding failed
root@web3 [/usr/src]#
Can anyone help me please?
Thanks in advance.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: IbanUlovPosted on 2009-10-19 at 14:41:51ID: 25609302
[libmp3lame @ 0x9c41300]lame: output buffer too small (buffer index: 8359, free bytes: 1433)
Audio encoding failed
It looks like when you are encoding you pass a buffer too small. Usually when you encode the size of the buffer to encode must be the size of the buffer decoded. So you will be sure you have sufficient space. Some codecs need this buffer be a 8 multiple (more for video than for audio).