[FFmpeg-devel] [RFC] ac3enc: how do I force ac3 encoder to output frames with the same size?
Piotr Bandurski
ami_stuff at o2.pl
Tue Dec 25 13:20:58 CET 2012
Hi,
The problem is that RealPlayer does not play correctly ac3 files with frequencies
11025/22050/44100Hz generated by FFmpeg, while 8000/16000/32000Hz files plays correctly.
I belive it maybe be because for 11025/22050/44100Hz FFmpeg uses not constant ac3 frame
sizes, while for 8000/16000/32000 it uses.
RealEncoder uses constant ac3 frame sizes for all of the frequenties.
Here is the output (whit attached patch) from the files generated by RealEncoder:
$ ffmpeg -i re_8.rm -f null -
Input #0, rm, from 're_8.rm':
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 192
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 192
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 192
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 192
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 192
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 192
$ ffmpeg -i re_11.rm -f null -
Input #0, rm, from 're_11.rm':
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 278
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 278
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 278
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 278
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 278
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 278
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 278
and the output from the files created with FFmpeg:
ffmpeg -i input.wav -ar 8000 -ac 1 -ab 8000 ff_8.rm
ffmpeg -i input.wav -ar 11025 -ac 1 -ab 16000 ff_11.rm
$ ffmpeg -i ff_8.rm -f null -
Input #0, rm, from 'ff_8.rm':
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 192
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 192
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 192
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 192
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 192
$ ffmpeg -i ff_11.rm -f null -
Input #0, rm, from 'ff_11.rm':
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 278
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 280
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 278
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 278
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 280
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 278
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 278
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 280
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 278
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 278
[ac3 @ 018ecba0] hdr.bitstream_id: 10
[ac3 @ 018ecba0] hdr.frame_size: 280
So the question is how do I force ac3 encoder to output constant ac3 frame sizes
for 11025/22050/44100 frequencies to match the output from RealEncoder?
Regards
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ac3dec.txt
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121225/cf9230d3/attachment.txt>
More information about the ffmpeg-devel
mailing list