Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Crash: ffmpeg 0.5 and lame
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1746

PostPosted: Fri Mar 27, 2009 3:34 pm    Post subject: [Solved] Crash: ffmpeg 0.5 and lame Reply with quote

I recently emerge --sync && emerge world and got the new ffmpeg 0.5, but whenever I try to encode anything with lame it crashes out with:

Code:
[libmp3lame @ 0x85e5280]lame: output buffer too small (buffer index: 9195, free bytes: 597)
Audio encoding failed


The version of lame has not changed, and the problem occurs on files that transcoded properly before.

Has anyone had this?


Edit/Update:
Problem is caused by lame-3.98.2 - Reverting to lame-3.98 works around the problem.


Last edited by Cyker on Sat Mar 28, 2009 2:20 am; edited 1 time in total
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Fri Mar 27, 2009 4:42 pm    Post subject: Reply with quote

Yah, happens to me all the time ... I think it's a known bug. But the MP3s are actually created just fine, so ... who knows. Works for me.
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1746

PostPosted: Fri Mar 27, 2009 6:07 pm    Post subject: Reply with quote

beandog wrote:
...But the MP3s are actually created just fine, so ...


:shock:

That's... quite impressive!

Unless you mean yours carries on encoding after that error.

Mine doesn't; It displays the input and output file details, then displays that error then returns to the cmmmand prompt! :(

I found some references to this error in Google, and some solutions suggest upping the buffer size used in the source, but this didn't do anything for me - Just made it take longer sitting at the output file details before crashing with the same error (Albeit with a bigger buffer size in the error...)
Back to top
View user's profile Send private message
justinkb
Apprentice
Apprentice


Joined: 23 Dec 2008
Posts: 161

PostPosted: Fri Mar 27, 2009 6:08 pm    Post subject: Reply with quote

cflags sane?
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Fri Mar 27, 2009 6:24 pm    Post subject: Reply with quote

Cyker wrote:
beandog wrote:
...But the MP3s are actually created just fine, so ...


:shock:

That's... quite impressive!

Unless you mean yours carries on encoding after that error.


No, I mean it encodes fine, finishes, but displays that error on exit.
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1746

PostPosted: Fri Mar 27, 2009 10:19 pm    Post subject: Reply with quote

justinkb wrote:
cflags sane?

Ah, thanks! Yup, they are reasonably sane :)

CFLAGS="-O2 -march=opteron -msse3 -mfpmath=sse -pipe -fomit-frame-pointer"

But you reminded me that I tried compiling lame without the mfpmath setting to see if it would be any faster; I have just recompiled it and ffmpeg with the above and now they work together properly again :D

Didn't occur to me that floating point calcs using x87 might be incompatible with SSE, so thanks for the hint!! ;)
Back to top
View user's profile Send private message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1746

PostPosted: Sat Mar 28, 2009 1:06 am    Post subject: Reply with quote

Bah, looks like I spoke too soon :(

Like with beandog's, the transcode goes all the way and I get the lame buffer error at the end. However, the AVI file is reported as unknown format by mplayer, vlc, WMP and MediaPlayer Classic.

If I encode the file with a raw wav, then it plays correctly.
If I encode the file with vorbis sound, it plays but without sound.

I think this is going to take a lot of zots to figure out...
Back to top
View user's profile Send private message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1746

PostPosted: Sat Mar 28, 2009 2:18 am    Post subject: Reply with quote

Right; It seems that the only thing that can play back half the things ffmpeg currently spits out is mplayer!
Even the most recent VLC is not working for me (I either get unrecognised file format, no sound and/or corrupted video).

I give up; Apparently I am back in good ol' Codec Hell again... yeesh, I thought I'd seen the end of this in Windows back when there were 5 bazillion incompatible mpeg4 codecs!

Until this sorts itself out, I'm reverting to ffmpeg 4.9; At least that works properly!

Edit: Or maybe not... ffmpeg 4.9 no longer works either! wtf?!

Edit2: Okay, I have found the problem - It is not ffmpeg, but lame! Some how, lame-3.98.2 is breaking ffmpeg's ability to encode mp3 streams, which is why we're getting that buffer error, and why the resulting AVI doesn't work in anything (Well, other than mplayer, but mplayer seems to be much more resiliant than any of the other players; Certainly more so than VLC which confuses Vorbis streams as mp4a!)

Regressing to lame-3.98 has fixed all the problems for me and gotten rid of that buffer error to boot! Woo! \o/
I'm masking it off until whatever's gone wrong gets sorted out.

How lame! :roll: :lol:
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Sun Mar 29, 2009 5:14 pm    Post subject: Reply with quote

Cyker wrote:
Regressing to lame-3.98 has fixed all the problems for me and gotten rid of that buffer error to boot! Woo! \o/
I'm masking it off until whatever's gone wrong gets sorted out.


Now, that I *didn't* know ... glad you found that.
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum