ogg encoder always adds 128-255 extra samples
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.
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.
On 02 Mar 2017, at 17:19, Basin Ilya <basinilya@gmail.com> wrote:
You can't concatenate .wav files
Huh? Uncompressed PCM seems easy enough to cat, and I have done so a zillion times with FFmpeg… Bouke
I mean, with concat protocol On 02.03.2017 19:24, Bouke / VideoToolShed wrote:
On 02 Mar 2017, at 17:19, Basin Ilya <basinilya@gmail.com> wrote:
You can't concatenate .wav files
Huh? Uncompressed PCM seems easy enough to cat, and I have done so a zillion times with FFmpeg… Bouke _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
2017-03-02 17:19 GMT+01:00 Basin Ilya <basinilya@gmail.com>:
Nevermind. The problem is not with quantization, I revised my question in "ogg encoder always adds 128-255 extra samples".
What is an "ogg encoder"? If you want support on this mailing list, please: Test current FFmpeg git head Provide the command line you tested together with the complete, uncut console output Do not top-post Carl Eugen
participants (3)
-
Basin Ilya -
Bouke / VideoToolShed -
Carl Eugen Hoyos