Reported by jeppeoland on 2009-06-26 04:55 UTC
When muxing AC3 into an MP4 file, the bitrate is not specified correctly in the resulting file.
All the files I have looked at so far claim to be 32 lbit.
I'm not very familiar with the mp4box sources, but looking at the codem the problem may be in the function: gf_ac3_parser_bs
2361 if (full_parse) {
2362 hdr->bsid = bsid;
2363 hdr->bsmod = bsmod;
2364 hdr->acmod = ac3_mod;
2365 hdr->lfon = 0;
2366 hdr->fscod = fscod;
2367 hdr->brcode = hdr->bitrate/1000;
2368 }
If that "brcode" is the value that eventually gets written out, then it is not correct.
Maybe it should be:
hdr->brcode = frmsizecod / 2;
Reported by jeppeoland on 2009-06-26 04:55 UTC When muxing AC3 into an MP4 file, the bitrate is not specified correctly in the resulting file. All the files I have looked at so far claim to be 32 lbit.
I'm not very familiar with the mp4box sources, but looking at the codem the problem may be in the function: gf_ac3_parser_bs 2361 if (full_parse) { 2362 hdr->bsid = bsid; 2363 hdr->bsmod = bsmod; 2364 hdr->acmod = ac3_mod; 2365 hdr->lfon = 0; 2366 hdr->fscod = fscod; 2367 hdr->brcode = hdr->bitrate/1000; 2368 }
If that "brcode" is the value that eventually gets written out, then it is not correct. Maybe it should be: hdr->brcode = frmsizecod / 2;