[FFmpeg-user] ogg encoder always adds 128-255 extra samples

Basin Ilya basinilya at gmail.com
Thu Mar 2 18:19:18 EET 2017


Nevermind. The problem is not with quantization, I revised my question in "ogg encoder always adds 128-255 extra samples".

> Apart from "complete, uncut console output missing", I would
> have expected that you cannot concatenate ogg files: Am I
> wrong?
You can't concatenate .wav files, but .ogg files concatenate just fine.
(actually the ogg format allows this: cat test1.ogg test2.ogg >test3.ogg)

On 02.03.2017 18:49, Basin Ilya wrote:
> Hi.
> I'm trying to create a set of chainable ogg files out of a long wav file. However, the produced ogg files are always 128-255 samples longer than the source PCM data and the
> extra data looks like anti-click or fade-out.
> 
> See the attached image. test0 was made directly. test1 was made via an intermediate ogg file.
> 
> I tried to choose a duration whose sample count is divisible by 64 or 128, but that didn't help.
> 
>     # produce 10 seconds of noise
>     ffmpeg -y -t 10 -f lavfi -i aevalsrc="random(0)*2-1" -c:a pcm_s16le test.wav
> (
>     </dev/null ffmpeg -y -ss 0 -t 0.995567 -i test.wav -af "ashowinfo" test0.wav
>     </dev/null ffmpeg -y -ss 0 -t 0.995567 -i test.wav -af "ashowinfo" test1.ogg
>     # pts:43008 nb_samples:897
>     </dev/null ffmpeg -y -i "test1.ogg" -af "ashowinfo" test1.wav
>     # pts:44032 nb_samples:128
> )
> 
> _
> The only workaround I see is to make a slightly longer ogg, then use "-acodec copy" and "-t" to discard 1 or 2 unneeded ogg frames.


More information about the ffmpeg-user mailing list