violao
15th March 2004, 16:05
While encoding some short audio clips for making loops I noticed that most of the time AC3 file encoded from PCM with both BeSweet and ffmpeg is somewhat shorter than the original. What I do is:
1. Create PCM audio clip with CoolEdit such that it loops nicely without noticeable audio skips - basically I adjust beginning and ending samples according to rhythm/pitch/volume
2. Encode to AC3
3. Decode AC3 to PCM with azid
Resulting PCM is almost always few miliseconds shorter. Additionally the beginning few samples are mostly zero, so my previous looping adjusment do not work anymore. Same happens if I try to (loop)play AC3 result from 2, so I don't think it's azid's problem.
I tried with different bitrates and always got the same results. For example if the length of the original was 9.96 sec, the length of the result after step 3 would always be 9.952 sec.
So here is the question: is this the intrinsic property of AC3 encoding (due to the round to some predetermind packet size) or is it a bug in the encoder?
1. Create PCM audio clip with CoolEdit such that it loops nicely without noticeable audio skips - basically I adjust beginning and ending samples according to rhythm/pitch/volume
2. Encode to AC3
3. Decode AC3 to PCM with azid
Resulting PCM is almost always few miliseconds shorter. Additionally the beginning few samples are mostly zero, so my previous looping adjusment do not work anymore. Same happens if I try to (loop)play AC3 result from 2, so I don't think it's azid's problem.
I tried with different bitrates and always got the same results. For example if the length of the original was 9.96 sec, the length of the result after step 3 would always be 9.952 sec.
So here is the question: is this the intrinsic property of AC3 encoding (due to the round to some predetermind packet size) or is it a bug in the encoder?