Bug 9677 - FLAC -> MP3 transcoding not fast enough
: FLAC -> MP3 transcoding not fast enough
Status: RESOLVED WORKSFORME
Product: Logitech Media Server
Classification: Unclassified
Component: Transcoding
: 7.3.0
: Macintosh MacOS X 10.5
: P4 normal (vote)
: Investigating
Assigned To: Alan Young
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-08 09:11 UTC by Annette Wise
Modified: 2011-01-13 02:00 UTC (History)
2 users (show)

See Also:
Category: Feature


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Annette Wise 2008-10-08 09:11:11 UTC
When transcoding is enabled and set to a very low bitrate (64k) there is a gap between playback of songs.

Albums are in flac and gapless playback works fine when transcoding is disabled or set to a higher bitrate.
Comment 1 Matt Wise 2008-10-08 09:13:29 UTC
I've verified this bug with Steven... Tried transcoding with both Lame 3.97 and 3.98 with the same behavior. 
Comment 2 Alan Young 2008-10-08 23:36:37 UTC
How much of a gap? Are we talking about < 100ms or something more?

I am wondering if this is some kind of failure of the Lame/MP3-gapless mechanism or more-simply that the cost of transcoding is sufficiently high that the next track is not ready in time.

Actually, maybe lame cannot add the necessary gapless header when transcoding from stdin. I suspect that true gapless may not be possible in this case.
Comment 3 Andy Grundman 2008-10-09 05:35:38 UTC
Without testing, I would guess LAME does not add any header in this case.  The header is usually added only after fully encoding a track, when it knows the padding (end) value.
Comment 4 Chris Owens 2008-10-13 09:47:57 UTC
Steven notes the gap is longer the smaller you make the bitrate, on the order of 2 seconds or more.
Comment 5 Andy Grundman 2008-10-14 07:56:19 UTC
I think the problem here is that the FLAC -> MP3 transcoding is not happening fast enough to fill the initial autostart buffer.  It should be transcoding as fast as possible to fill the buffer, but for some reason it's not.  That's why lower bitrate MP3 adds more of a delay.
Comment 6 Alan Young 2008-10-14 11:45:00 UTC
Lame is pretty CPU-intensive. On my slow system it struggled to encode in real time at any decent quality level.
Comment 7 Andy Grundman 2008-10-14 11:49:57 UTC
Really?  On my laptop it can encode to 64k MP3 about 12.5x real-time, using the same command line flags as convert.conf (-q 9 -v -B 64)
Comment 8 Alan Young 2008-10-14 21:41:19 UTC
The 'q9' is the key. I usually use at least '-q5' as find '-q9' sounds pretty poor.
Comment 9 Alan Young 2009-06-09 01:56:13 UTC
Steven, Annette, what quality level were you using?

Do you still see this with 7.3.3? There were some changes to the piplining usage for transcoding that could possibly have helped a bit.

But note, you will not get true gapless with this transcoding.