As usual on these kind of forums, I will answer myself. It appears this issue is due to Lame. Depending on the type of mp3 being generated,Lame will skip n samples at the start and end of the pcm data it reads from the source file.
Using Lame 3.99.3 and 3.99.5 alone at the command line exhibits this behaviour (though it only introduces 50ms of silence at the beginning and chops 30ms from the end of the file). I note however, that Audacity is capable of using Lame to encode mp3s without this issue. So an examination of the Audacity code is in order, it looks like they have a solution or workaround for this issue. Apr 27, 2013 11:16:19 PM, [email protected] wrote: > >I am trying to manipulate sound files with liquidsoap and have >everything pretty much working the way I want it, but... > >%mp3 and %external encodings are adding around 100ms of silence >to the beginning of my output files and cutting about 60ms off the end >of the output files. > >One can test this with the demonstration script "reencoding.liq" and >just change the output encoding to %mp3. (%vorbis does not do this) > >I am running the native win32 builds posted. Both version 1.0.1 and >version 1.1.1-beta1 show this behaviour. > >Is there some setting I have missed that will correct this or have I >found a bug? I reviewed the ocaml-lame code but could not see >anything obvious... (since the %external encoding also shows this >problem the issue must lie elsewhere anyway) Also, setting the >clock sync to true has no effect on this, the problem persists >- don't know if that info helps any, but I tried it. > >Actually, when I use lame as an external encoder it still >introduces ~100ms of silence at the start of the file, but >chops less off the end of the file. > >Has anyone else encountered this or found a solution for it? > ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
