Yes, I had discovered the padding of files in the lame source
as mentioned in my previous message.

For the end, it looks like data is lost, but hopefully your
patch will be appropriate, however, I seem to recall seeing
the facility for id3 tags in the stream elsewhere in
liquidsoap. And in my case, (mp3 file to mp3 file)
I do want the tags to be present in my output.

In using an mp3 file source and and mp3 file output,
the result is actually double the padding... as the
padding was already there in the source... 

So I have tried to use eat_blank to account for this"
source = eat_blank(at_beginning=true,max_blank=0.05,source)
BUT it does not eat blank from the beginning, only from
the end, ignoring the at_beginning=true setting.
More work for you, sorry.


Apr 29, 2013 04:18:38 AM, [email protected] wrote:
>Hi,
>
>There are two issues here.
>
>1. For the beginning, I don't see anything obvious on our side, but
>lame's doc mentions some mandatory padding (
>http://lame.sourceforge.net/tech-FAQ.txt ) which might explain the
>problem?
>
>2. For the end, we effectively did not flush the encoder. I commited a
>patch ( https://github.com/savonet/liquidsoap/pull/68 ), which should
>hopefully integrated soon.
>
>++
>
>Sam.
>
>On Mon, Apr 29, 2013 at 12:40 AM, [email protected] [email protected]> wrote:
>> 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

Reply via email to