[FFmpeg-trac] #4565(avformat:new): MP2 in AVI (possibly) wrong frame_size/blkalign
FFmpeg
trac at avcodec.org
Mon May 18 13:25:09 CEST 2015
#4565: MP2 in AVI (possibly) wrong frame_size/blkalign
-------------------------------------+-------------------------------------
Reporter: darkyp | Type: defect
Status: new | Priority: important
Component: avformat | Version:
Keywords: | unspecified
wav,header,mp2 | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
The background: I'm transcoding DVB MPEG2 Video stream on the Raspberry
platform to H.264 and the audio is left as is (various types of MP2 audio)
then both streams are muxed in the AVI container using libavformat.
The files play fine in most players, however some will play the audio
stutteringly. VirtualDubMod 1.5.10.1 will complain about audio being VBR
though it is CBR. If I manually hexedit the AVI and just fix the header
with the proper values the files will play fine and VDub will not produce
the warning.
I looked in the source and I think this could be a problem with
ff_put_wav_header or a combination with av_get_audio_frame_duration. For
MP2 audio streams blkalign = frame_size = 1152 (hard coded) while I think
if the encoder has reported block_align ff_put_wav_header might use it for
MP2 audio.
Am I wrong in assuming that the wav header block align should be different
for the following types of MP2 audio:
Bitrate: 64000, Sample rate: 48000, Channels: 1 Frame size: 192
Bitrate: 160000, Sample rate: 48000, Channels: 2 Frame size: 480
Bitrate: 192000, Sample rate: 48000, Channels: 2 Frame size: 576
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4565>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list